feat: add cascade verify command to detect workflow drift - #225
Merged
Merged
Conversation
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Generated workflows are marked cascade-owned, but nothing lets a user prove a committed workflow still matches what its manifest would generate. The only drift check today is a hand-rolled regenerate-and-diff step in CI. Closes #177.
Fix
A new read-only
cascade verifycommand. It regenerates from the manifest in memory and compares against the committed .github/workflows files byte-for-byte, reporting per-file drift.Keystone refactor: a side-effect-free
generate.Plan(opts)is now the single source of truth for the generated file set and content, consumed by both generate and verify, so the two cannot diverge. Existing generate output stays byte-identical.Exit-code contract (follows diff):
Scope is plan-set-only for now; flagging stray cascade-owned files no longer in the plan is a separate follow-up.
Verification
TestPlan_MatchesGeneratedBytesasserts Plan equals exactly what generate writes across a multi-env fixture; generate golden and determinism tests stay green.go build ./... && go test ./... && golangci-lint run ./...green; e2e module builds and vets.