You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
release.yml: the documented dispatch recovery path cannot reach the builder #42
Found while retrying v0.5.0-rc.3 (run 33740759604).
RELEASING.md:78 says:
To resume a run whose builder dispatch failed or timed out, re-run the workflow from the Actions tab with the same tag. Every job is idempotent.
That path cannot work as configured, and never has.
Why. The release environment's deployment policy is a single entry, tag v* — tags only, no branches. A workflow_dispatch run executes at refs/heads/main, so the deployment is rejected before the reviewer gate:
Branch "main" is not allowed to deploy to release due to environment protection rules.
Only the push: tags trigger produces an allowed ref. rc.2 succeeded for that reason alone.
Why the obvious workaround isn't one. Dispatching or re-running at the tag ref would satisfy the policy, but GitHub executes the workflow file as of that ref. So a fix to release.yml can never apply to an already-cut tag — the tag carries the pre-fix file by construction. Concretely, #41's check-run filter is on main but not on v0.5.0-rc.3, so a re-run at that tag still fails on the previous attempt's residue.
Consequences today
The only recovery from a failed or timed-out builder dispatch is a new tag.
Add a branch policy to the release environment so dispatch works as documented. Widens what can reach the Mac (the required reviewer still gates it), and bakes in a divergence: workflow + .macos-builder/config would come from main while the builder checks out the tag.
Leave the policy alone and correct RELEASING.md to say recovery means a new tag.
Have verify read .macos-builder/config from the tag rather than the checkout, so at least the contract cannot diverge under option 1.
Reopened: #44 closed this automatically via its Closes #42, but it completed only the code half.
Done in #44. The contract is now read from the tag (git show "${TAG}:.macos-builder/config") while the workflow and scripts/release/ come from the checkout. That removes the divergence that made branch-dispatch unsafe: a dispatch from main would previously have built the tag's commit against main's contract.
Still outstanding, and not a code change. The release environment's deployment policy is a single entry, tag v*. A workflow_dispatch run executes at refs/heads/main, so it is rejected before the required reviewer ever sees it:
Branch "main" is not allowed to deploy to release due to environment protection rules.
Until a branch is added to that policy, recovery from a failed or timed-out builder dispatch still requires cutting a new tag, and RELEASING.md → Recovery describes something that cannot happen.
This is a repository setting on the environment guarding the Developer ID machine, so it is deliberately not changed by any PR.
Verification once it is changed: dispatch the workflow against the already-populated v0.5.0-rc.5 draft.
gh workflow run release.yml --repo stuffbucket/monimal -f tag=v0.5.0-rc.5
It should reach the approval gate and then succeed idempotently, reusing the draft and re-verifying the four attached assets rather than rebuilding them. That costs no new tag and no builder time, and is the direct proof this is closed.
Code half (#44): the contract is read from the tag via git show, while the workflow and scripts/release/ come from the checkout. This removes the divergence that made branch-dispatch unsafe.
Policy half: the release environment's deployment policy now carries branch main alongside tag v*.
Verification. The same command, before and after the policy change, against the already-populated v0.5.0-rc.5 draft:
gh workflow run release.yml --repo stuffbucket/monimal -f tag=v0.5.0-rc.5
job
run 33925690997 (before)
run 33925864145 (after)
verify tag
success
success
draft release
success
success
dispatch macos-builder
failure — Branch "main" is not allowed to deploy to release
waiting — held at the reviewer gate
Before, the deployment was refused by policy before the required reviewer was consulted. After, it is held for approval like any tag-triggered run.
The run was cancelled at the gate deliberately: approving would re-dispatch the builder and overwrite rc.5's four verified assets with fresh equivalents, and everything past the gate is the code path rc.5 already completed successfully. The rejection was the defect, and it is gone.
Worth recording from run 33925690997, which executed at ref=main (34dd8b6, carrying #44) against tag v0.5.0-rc.5 (8fbe94a, which does not): the extracted contract.sh resolved the tag's contract, not main's.
prev-tag.sh also resolved v0.5.0-rc.4 correctly in the same run. That is the tag/checkout split working in production rather than only against fixtures.
Activity
fix(release): stop SIGPIPE failing the checks that just succeeded (#43)
ci: run the release shell on every PR instead of on every tag (#44)
stuffbucket commentedon Sep 4, 2026
Reopened: #44 closed this automatically via its
Closes #42, but it completed only the code half.Done in #44. The contract is now read from the tag (
git show "${TAG}:.macos-builder/config") while the workflow andscripts/release/come from the checkout. That removes the divergence that made branch-dispatch unsafe: a dispatch frommainwould previously have built the tag's commit againstmain's contract.Still outstanding, and not a code change. The
releaseenvironment's deployment policy is a single entry,tag v*. Aworkflow_dispatchrun executes atrefs/heads/main, so it is rejected before the required reviewer ever sees it:Until a branch is added to that policy, recovery from a failed or timed-out builder dispatch still requires cutting a new tag, and
RELEASING.md→ Recovery describes something that cannot happen.This is a repository setting on the environment guarding the Developer ID machine, so it is deliberately not changed by any PR.
Verification once it is changed: dispatch the workflow against the already-populated
v0.5.0-rc.5draft.It should reach the approval gate and then succeed idempotently, reusing the draft and re-verifying the four attached assets rather than rebuilding them. That costs no new tag and no builder time, and is the direct proof this is closed.
stuffbucket commentedon Sep 4, 2026
Fixed and verified end to end.
Code half (#44): the contract is read from the tag via
git show, while the workflow andscripts/release/come from the checkout. This removes the divergence that made branch-dispatch unsafe.Policy half: the
releaseenvironment's deployment policy now carriesbranch mainalongsidetag v*.Verification. The same command, before and after the policy change, against the already-populated
v0.5.0-rc.5draft:Branch "main" is not allowed to deploy to releaseBefore, the deployment was refused by policy before the required reviewer was consulted. After, it is held for approval like any tag-triggered run.
The run was cancelled at the gate deliberately: approving would re-dispatch the builder and overwrite rc.5's four verified assets with fresh equivalents, and everything past the gate is the code path rc.5 already completed successfully. The rejection was the defect, and it is gone.
Worth recording from run 33925690997, which executed at
ref=main(34dd8b6, carrying #44) against tagv0.5.0-rc.5(8fbe94a, which does not): the extractedcontract.shresolved the tag's contract, not main's.prev-tag.shalso resolvedv0.5.0-rc.4correctly in the same run. That is the tag/checkout split working in production rather than only against fixtures.fix(deps): update fast-uri to 3.1.6 (#85)