Skip to content

ci: gate dogfood workflow drift and sync promote.yaml - #154

Merged
joshua-temple merged 1 commit into
mainfrom
ci/dogfood-workflow-drift-gate
Jun 14, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
ci/dogfood-workflow-drift-gate

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

cascade dogfoods its own generated GitHub Actions workflows under .github/workflows/, but promote.yaml had drifted from generator output across several merged changes, and no CI check caught it:

  • source_image_tag preflight output (missing)
  • source_image_digest preflight output (missing)
  • mode injected via env: instead of inline interpolation in the validate step (missing)

Fix

  • Regenerated the dogfood workflows from .github/manifest.yaml with cascade generate-workflow --force. Only promote.yaml was stale (orchestrate.yaml and the manage-release composite action were already in sync). The synced file now carries the three items above.
  • Added a Workflow Drift Check job to .github/workflows/pr.yaml that builds the CLI, runs cascade generate-workflow --config .github/manifest.yaml --force, then git diff --exit-code -- .github/workflows/ .github/actions/, so CI fails whenever committed dogfood workflows no longer match generator output. The job is wired into the PR Gate aggregate.
  • Quoted a pre-existing word-split in the unit-tests step so the file passes actionlint cleanly.

Verification

  • Generation is deterministic (identical across repeated runs, no embedded timestamps); generated file content contains no machine-specific paths.
  • Gate proof: on the synced tree the gate command exits 0; on a deliberately drifted commit (a generated line removed) the same command exits non-zero, then exits 0 again once restored.
  • go build ./... && go test ./... green (1231 tests), golangci-lint run ./... clean, actionlint .github/workflows/pr.yaml exit 0.

New required action pins reuse the existing repo-pinned SHAs for checkout and setup-go.

Add a Workflow Drift Check job to PR validation that rebuilds the CLI,
regenerates the dogfood workflows from .github/manifest.yaml, and fails if
the committed files differ from generator output. Sync promote.yaml, which
had drifted across merged changes (source_image_tag, source_image_digest
outputs, and mode injected via env).

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 8588466 into main Jun 14, 2026
7 checks passed
@joshua-temple joshua-temple added the ci CI/CD pipeline and workflow changes label Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD pipeline and workflow changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant