fix(release): run dispatch recovery from the current default branch - #16
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d981535a38
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // the exact release commit, so this stays fail-closed. It also | ||
| // performs no ref writes, which some repos' Actions tokens reject | ||
| // for older commits whose workflow files differ from the head. | ||
| let dispatchRef = process.env.DEFAULT_BRANCH; |
There was a problem hiding this comment.
Preserve exact source when dispatching recovery releases
When Trigger release is re-dispatched after the default branch has advanced past the release commit, this dispatches stage 3 from the branch head instead of an exact release ref. The release workflow still builds releaseSha, but its resolve job records source-sha from github.sha and publish verifies attestations with that digest, so the published assets can be attested against an unrelated later default-branch commit rather than the commit that was actually checked out and built. Please keep the attestation source tied to releaseSha for this recovery path, or avoid using the moving branch ref as the attested source.
Useful? React with 👍 / 👎.
Supersedes the tag-source dispatch from #15, which was wrong: dispatching stage 3 on
refs/tags/<version>(orrelease-run/<version>) executes the consumer's caller stub as it existed at the release commit - the historical toolkit pins - so a recovery could never pick up the very pin bump it exists for. Verified on PodNotes: the tag-dispatched release run called the reusable workflow at the old SHA.Validate now selects the dispatch source by event:
release-run/<version>branch and dispatch there, so a failed release stage is replayable at the exact source.createRefat older commits with differing workflow files (observed deterministically on PodNotes).README recovery section updated to match.
Refs #9