Repository navigation
ci: release the matrix when a Fast Gate run's status lags its finished green jobs - #25609
Conversation
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. Releasing the matrix does not replace Fast Gate's own check, which still has to conclude green. A wrong release only costs a wasted matrix run; it does not admit unjudged code. Notes
[DESIGN-REVIEWED] 1c57345 Description read[DESCRIPTION-READ] e94e3b6734505d408a0e87c60204619ae3242c55b2de995d5fd34adfd6fa951b That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
402ee9f to
8cbeb99
Compare
8cbeb99 to
a8d4bbb
Compare
a8d4bbb to
6f18e8b
Compare
|
GPT 6.1 BLOCK at 6f18e8b (a green partial rerun releases the matrix over a still-failing job from attempt 1): fixed in 35a74a1, using the fix the finding names.
|
6f18e8b to
35a74a1
Compare
35a74a1 to
1c57345
Compare
iamwhatever
left a comment
There was a problem hiding this comment.
Approve at 1c57345792804d4ee2c4bfdd9b7903e2b978554b.
The new release path runs only when the 720s budget is spent and the run is neither completed nor awaiting approval. It reads the jobs of attempt 1 only. It requires the listed count to match total_count, every job to be success or skipped with at least one success, and the newest job to have finished at least 60s earlier. Any read or parse failure keeps the old fail-closed exit (await-fast-gate.sh#L184-L233, #L332-L345). The earlier GPT BLOCK about partial reruns is fixed by the attempt-1 guard. Every call is still a GET, and the PR changes no permissions. CI and every AI lane are green on this head.
AI findings judged non-blocking
- Design Review (Note): the 60s settle may not cover a late-created
needs:aggregator. Does not block: Fast Gate forbidsneeds:on its gate jobs (fast-gate.yml#L77). A false release would also only start the matrix, because Fast Gate's own conclusion still gates readiness.
— crew-pr-reviewer (r135)
Problem / Motivation
Goal:
Await Fast Gatestops failing a PR whose Fast Gate jobs all passed but whose run-level status has not caught up.The barrier reads only the Fast Gate run's
status. On fork PR #9750 all 16 Fast Gate jobs finishedsuccessby 13:32:33, but the run kept readingin_progressuntil about 14:05. The barrier hit its 720s budget at 13:43:15 and failed closed, so the whole test matrix was skipped and Coverage Gate went red.Why it matters
A green gate fails the matrix, and on a fork PR the author cannot rerun the job: the only recovery is a new push or a maintainer rerun.
Not a goal
action_requiredhandling.Intended? / Repro
Intended? No. The barrier's job is to confirm the gate passed (
.github/scripts/await-fast-gate.sh:1-5on main); a run whose every job passed has passed, and GitHub's rollup lag is not a verdict on the code.Repro: Await Fast Gate job 122218407972 (run 40511382311) logs
Fast Gate still 'in_progress' after 721s, while Fast Gate run 40511382148 shows every jobsuccessby 13:32:33 and the runupdated_at14:05:41.What changed (motivation → approach → change)
Symptom: a fail-closed exit on a green gate. Cause: run-level status only. Change: at the TOTAL budget, before failing closed, check the run's jobs once.
.github/scripts/await-fast-gate.sh: newjobs_all_passed(a GET ofruns/{id}/attempts/{attempt}/jobs). It answers yes only when the attempt has jobs, all of them are listed, every one iscompletedwithsuccessorskipped, at least one issuccess, and the newest finished at leastROLLUP_SETTLE(60s) ago, so a job thatneeds:the others has had time to appear. Then the barrier exits 0 with a warning naming the lag. A failed read, an unfinished or failed job, all-skipped, or a fresh finish all keep the existing fail-closed exit. A run awaiting fork approval is never checked.docs/ci/ci-and-reviews.md: theawait-fast-gaterow states the rule.Security
The barrier stays read-only (
actions: read, GET only). It now trusts GitHub's own per-job conclusions, the same data the run-level conclusion is rolled up from; nothing a PR author writes is read.Backwards compatibility
Compatible: every path that passed or failed before does the same, except a run stuck
in_progressat 720s whose jobs all passed, which now releases the matrix.Removes nothing.
Tests
test/test_await_fast_gate_poll.pyTestARunWhoseStatusLagsItsJobs, through the real script with the stubbedghand fake clock:runs/16/attempts/1/jobs;The existing
test_a_run_that_stays_in_progress_fails_at_the_total_budgetstill passes: its jobs read fails, so it fails closed as before. On main the first new test fails (exit 1).Proof: not provable -- other: this host runs no local tests; CI runs the new tests
Manual verification
bash -non the script. The jq verdict expression was run by hand against job lists for each case above (green settled →yes 2; failed, running, empty, just finished →no). Static gates: black, flake8,scripts/docs_lint.py,scripts/check_comment_history.py.Related Issues
Fixes #24890
Sibling sweep
Swept: git grep -n "await-fast-gate.sh" -- .github
Sibling: .github/workflows/ci.yml
await-fast-gatejob -- not affected (runs this file unchanged)Sibling: .github/scripts/cancel-superseded-run.sh -- not affected (runs this file as a probe; a release exits 0, which it already treats as nothing to cancel)
Pattern harvest
Not generalizable: one barrier.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.