Skip to content

[PR] release gate: approval-pending PR runs no longer kill the release CI gate 26 seconds in - #6568

Merged
ranxianglei merged 1 commit into
masterfrom
2026-11-14_release-gate-action-required
Nov 14, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-11-14_release-gate-action-required

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

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 --wait supervision 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 --wait refused 26 seconds later and gave up, leaving the release with no working CI gate:

15:31:56 attempt 2: running ci-e2e-dsh.yml … | RED at the publish sha: ci.yml, ci-e2e.yml, ci-e2e-fake.yml, …
         CI lane(s) RED at the publish sha: … — refusing to publish.

Root cause

GitHub auto-creates pull_request runs the moment a PR opens. 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 — while carrying run ids newer than the real dispatch runs.

latestRunAt() in scripts/release-ci-gate.mjs sorts a sha's runs by run id and returns the newest; action_required is in RED_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 --dispatch would equally have skipped a lane whose only run is an action_required run. The 60-minute supervision never ran.

Fix

Treat terminal action_required runs as non-runs in latestRunAt(): the gate falls through to the run that actually executed — or to "missing", which dispatches. Real red runs stay red (a newer action_required run can no longer shadow them in either direction). per_page 5→10 so a stack of approval noise can't mask a real run.

  • scripts/release-ci-gate.mjs — latestRunAt() filters completed/action_required, documented in the header.
  • tests/release-ci-gate.test.ts — 3 regression tests against the mock API:
    • wait: newer action_required run does not mask a still-running dispatch → passes when the dispatch turns green;
    • wait: real red run stays red even when a newer action_required run shadows it;
    • dispatch: lane whose only run is action_required is 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. waitForPersistedSession assertion, 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.

…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.
@ranxianglei ranxianglei changed the title release gate: approval-pending PR runs no longer kill the release CI gate 26 seconds in [PR] release gate: approval-pending PR runs no longer kill the release CI gate 26 seconds in Nov 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-14_release-gate-action-required (4733de6)

Latest build — install this exact version

npm install -g billion-context@0.0.9613-pr.6568.d48a368

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
4733de6 billion-context@0.0.9613-pr.6568.d48a368 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr6568.tgz
npm install -g package

Install instructions are refreshed on each push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant