Repository navigation
[PR] release gate: approval-pending PR runs no longer kill the release CI gate 26 seconds in - #6568
Merged
Merged
Conversation
…ing the latest run at the sha (#6552) v0.1.214 one-click release: after the bot opened the fallback PR #6552, GitHub auto-created pull_request runs at the publish sha. Because the PR author is the github-actions app, those runs sit behind manual approval (#772) and complete 'action_required' without executing a single job — but with run ids NEWER than the workflow_dispatch compensation runs fired by release-manual.yml. latestRunAt() sorted by run id and returned runs[0], so the gate picked the approval noise as 'the latest run at the publish sha'. classify() has 'action_required' in RED_CONCLUSIONS, so --wait refused 26 seconds after the PR opened and the 60-minute supervision never ran; --dispatch would equally have skipped lanes whose only run was an action_required run. Treat terminal action_required runs as non-runs: the gate falls through to the run that actually executed, or to 'missing', which dispatches. per_page 5->10 so a stack of approval noise cannot mask a real run. Three regression tests against the mock API.
Contributor
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9613-pr.6568.d48a368This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6568.tgz
npm install -g packageInstall instructions are refreshed on each push. |
This was referenced Nov 14, 2026
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.
What broke (v0.1.214 one-click release, PR #6552)
The one-click release falls back to a bot-authored PR when it can't push to master directly (GITHUB_TOKEN pushes never deliver push events, #1744). It compensates with
scripts/release-ci-gate.mjs --dispatch(9 full-CI lanes on the publish sha) and then a 60-minute--waitsupervision before publish.For #6552 the dispatch fired all 9 lanes at 15:31, the bot opened the PR at 15:31:27 — and the gate's
--waitrefused 26 seconds later and gave up, leaving the release with no working CI gate:Root cause
GitHub auto-creates
pull_requestruns the moment a PR opens. Because the PR author is thegithub-actionsapp, those runs sit behind manual approval (#772) and completeaction_requiredwithout executing a single job — while carrying run ids newer than the real dispatch runs.latestRunAt()inscripts/release-ci-gate.mjssorts a sha's runs by run id and returns the newest;action_requiredis inRED_CONCLUSIONS. So "the latest run at the publish sha" = the approval noise, not the dispatches that actually certify the sha. The gate went RED 26s after the PR opened, and--dispatchwould equally have skipped a lane whose only run is anaction_requiredrun. The 60-minute supervision never ran.Fix
Treat terminal
action_requiredruns as non-runs inlatestRunAt(): the gate falls through to the run that actually executed — or to "missing", which dispatches. Real red runs stay red (a neweraction_requiredrun can no longer shadow them in either direction).per_page5→10 so a stack of approval noise can't mask a real run.scripts/release-ci-gate.mjs—latestRunAt()filterscompleted/action_required, documented in the header.tests/release-ci-gate.test.ts— 3 regression tests against the mock API:action_requiredrun does not mask a still-running dispatch → passes when the dispatch turns green;action_requiredrun shadows it;action_requiredis dispatched.All 19 tests in the file pass locally (
node --import tsx --test tests/release-ci-gate.test.ts).Not fixed here (separate)
5 of the 9 dispatches in the incident run failed on flaky e2e tests (e.g.
waitForPersistedSessionassertion,tests/e2e/e2e-native-dsh.test.ts:597) — they all passed on the manual re-run. That flakiness is independent of this gate bug.Relevant: #6552, #772, #1744, #3539, #3534.