feat(generate): emit the opt-in reconcile companion - #478
Merged
Merged
Conversation
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
act strips the reserved $GITHUB_API_URL from run: step shells for a synthetic workflow_run event, so the mock resolve step's curl saw an empty base URL and exited 3 (malformed URL). Pass the Gitea API base as CASCADE_API_URL, the same custom-name mechanism the repo full name already uses, so it survives into the shell. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
act cannot emulate a workflow_run companion end to end: it resolves no marketplace or composite action without a real server to clone from, and it does not carry a run: step's API base for a synthetic workflow_run event, so the mock resolve step's curl exits 3. The emitted companion is covered by the generator unit tests plus actionlint, with true end-to-end proof from the fleet and cascade's own self-heal companion on real GitHub. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
… act scenario 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
The
reconcilecommand exists, but a user repo had no automated way to run it when an external bump changed a governed action pin in a generated workflow. They had to invoke it by hand.Fix
Adds an opt-in
reconcile:config block and, when enabled, emits two workflow files:cascade-reconcile-check.yaml: a fork-safepull_requestdetector that runscascade reconcile --checkand uploads a data-only relevance artifact with a read-only token.cascade-reconcile-companion.yaml: aworkflow_runcompanion that runs against the base definition when the detector reports a governed pin changed. It resolves the PR from trustedworkflow_runmetadata, fetches a pinned released binary, reads the head files as data, runsreconcile, and pushes the regenerate commit.Commit routing:
append(default) pushes onto the PR head branch, with a sticky-comment fallback for forks;followupopens a separate PR from a cascade-owned branch. A fork PR is never pushed in place. The companion carries the three loop guards (idempotent apply, push-only-if-diff, fresh-tip non-fast-forward abort).The block is additive at
schema_version: 1.sourceselects the change source (dependabotdefault) and keeps the lane adapter-shaped.Verification
go build ./...,go test ./...(2431 passed),golangci-lint run ./...clean; actionlint clean across all three commit modes.TestReconcileCompanionAppendsOnSameRepoPRdrives the emitted companion through a real Gitea PR andworkflow_runevent and asserts the bump is pushed and survives regeneration (runs in the CI e2e shard).configuration.md(reconcile block),workflows.md(detector and companion),coverage-matrix.md(rows),README.md. Docs site builds.Closes #443. Part of #440.