ci: self-heal action-pin drift on cascade's own repo - #477
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
When an external bump changes a governed action pin in one of cascade's own generated workflows, the pins drift from the manifest and a maintainer had to reconcile by hand.
Fix
Deploys the
reconcilecommand as cascade's own self-heal:cascade reconcile --checkdetector to the PR-validation workflow that uploads apin-reconcile-resultartifact (advisory, never fails the gate, fork-safe).pin-reconcile.yaml, aworkflow_runcompanion that runs when the detector reports a governed pin changed. It resolves the PR fromworkflow_runmetadata only, fetches a pinned released binary, runscascade reconcile --own-repoover the head files as data, and pushes the regenerate commit to the PR head branch.Safety: the default token stays read-only and the single write path uses the trigger-capable state token; head files are read as data and never executed; the emitted bot commit is DCO signed-off; fork PRs are skipped; and the push is guarded by a staged-diff check plus a fresh-tip non-fast-forward abort.
Verification
actionlintclean on both workflows.reconcileis published; end-to-end validation follows that release.Closes #438. Part of #440.