Repository navigation
Stop the merge queue from calling a head green while a check on it failed (GST-2167) - #4235
Merged
Merged
Conversation
…iled (GST-2167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
|
😎 This pull request was merged. |
…den-failed-ci-runs
…, and keep a jobless failure counted until its replacement starts (GST-2167) A concurrency group cancels a pending run when a newer one at another SHA arrives, so the main backstop at 526f604 and 5fdfa14 would have read red forever. A replacing run that is still queued with no jobs no longer hides the failure before it. Adds a test that an unreadable workflow-runs list is unknown. Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/red-team#2 reader=red-team Review-Finding: p1/specialist-batched#1 reader=testing Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…n clears a dropped matrix failure and an empty failed rerun stays red (GST-2167) ciAtHead now reads check runs with the default filter and with filter=all. A suite the default list names is judged by that list alone; a suite only filter=all names is judged by its earlier attempts, and its workflow run counts as a failed check with no jobs when it failed and nothing in the suite already counts the failure. Review-Finding: v1/outside-voice#1 reader=outside-voice Review-Finding: v1/outside-voice#2 reader=outside-voice Review-Finding: v1/adversarial-native#1 reader=adversarial-native Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…nce in it (GST-2167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…T-2167) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
3 tasks done
This was referenced Nov 9, 2026
capy-ai Bot
added a commit
that referenced
this pull request
Nov 17, 2026
… head green while a check on it failed (GST-2252) (#4257) * Make gstack-pr-wait, gstack-ci-gate and the release cut count a failed check hidden behind an empty rerun (GST-2252) GitHub rollup and default check-runs list hold only each check suite latest attempt, so a rerun attempt with no jobs hid the failed run before it, and a workflow run that failed before any job never appeared. All three readers now add CI at the commit as the merge queue reads it (ciAtHead via lib/ci-head-checks.ts) and keep the worse bucket per check. Tests reuse the gstack-evals#303 recording from #4235. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Have the release cut read every check attempt only for commits that pass its named checks (GST-2252) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Say in the changelog that the release cut now counts failed commit statuses (GST-2252) Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Let the release cut set its own jobs aside in the every-attempt check read too (GST-2252) After #4297 the cut sets aside check runs from its own workflow and the Windows nightly by job id, but the rows from lib/ci-head-checks.ts skipped that filter, so the cut waited on its own run. headCheckRows now takes the set-aside check run and workflow run ids and removes them from every list before ciAtHead reads it. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
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.
The merge queue no longer calls a pull request's CI green while one of its checks actually failed. This serves the goal of only ever merging work whose tests passed.
What changed
The queue's CI read, on three real heads where verdicts changed (from a live probe over 65 recent heads):
Before and after, as text
Before (main):
After (this branch):
Why
gstack-evals#303 went READY at
6b30aaewithpassed=1 failed=0while itschecksjob had failed. The queue now sees failed runs that GitHub's default list hides, so a head like that stays red andlandrefuses it.Blast radius
ready,land, train land, wave and the post-merge watch all read CI throughciAtHeadinlib/ship-queue.ts, so they all change together and nothing else does. A live probe ran the old and new read over 65 real heads, and only three verdicts changed, each to a correct red (script ran).Summary
GitHub's check-runs list shows only each workflow run's newest attempt by default. On #303 the
cirun was rerun, the second attempt created no jobs, and the failedchecksrun from the first attempt dropped out of the list. The read now asks for every attempt, judges each check suite by its latest attempt that ran jobs, and keeps the newest run per check name as before.A workflow run that ends before starting any job has no check run at all. The read now also lists the head's workflow runs. A failed run with no jobs counts as a failed check named
<workflow> (run <id>, no jobs)unless a later run of the same workflow replaced it. A run cancelled before any job isn't counted. An unreadable list makes the result unknown, never green. docs/ship-policy.md now describes this.Test Coverage
New ready cases use the #303 shape and its cancelled, timed_out and action_required versions. They also cover a jobless failure with and without a later run, a run cancelled before any job, a stale matrix job, an empty failed rerun and an unreadable runs list. Hold cases check that a green head, a pending check, a skipped check and a rerun that later passed read as before. A land case shows
land --pinmerged the #303 shape before this change and now refuses with QUEUE_LAND_CHECKS.Regression proof: the #303 fixture read green and merged on main b51925e. The stale-matrix fixture read
ci: red at 1d506e90fa40 (passed=2 failed=1 …)and the empty-failed-rerun fixture readci: green at e208720cb0a6 (passed=2 failed=0 …)on 7036ee1. All pass after the fix.Tests: 218 pass, 0 fail across 9 focused files.
Tests ran: tests 1655
Pre-Landing Review
Round 1 found one blocking defect (a run cancelled before any job read as failed), which was fixed with its test. Round 2 and the Step 11 voices found nothing blocking. One granted fix-check found nothing. After review, one scoped reader checked the docs/ship-policy.md edit and found it clean.
REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=3 fixed=3 scope=frozen unbound=3 fix_checks=1 dispatches=8
Gate edits: UNAVAILABLE — this run's record did not keep Step 9's line.
Outside review: GPT-6.1 Sol outside voice completed; its notes are listed below.
Review notes
Below the blocking floor (advisory, informational, test-gap or wording items); recorded here and not fixed in this PR.
lib/ship-queue.ts:167No test pins that a completed-cancelled jobless rerun does not replace an earlier jobless failure.lib/ship-queue.ts:169A workflow run not finished and with no jobs yet adds nothing to the verdict (neither pending nor failed); same as main before this PR.lib/ship-queue.ts:158A run cancelled before any job at the judged PR head is dropped rather than read as not-run; main before this PR also never saw it.Exploratory QA
Not run: no user-facing surface. The live probe over 65 real heads stands in for it.
Design Review
No frontend files changed — design review skipped.
Eval Results
No prompt-related files changed — evals skipped.
Review bot comments
No review bot comments.
Issues
Refs v1/outside-voice#1
Refs v1/outside-voice#2
Verification Results
Not run: no Step 8.1 obligations were declared for this bug fix.
TODOS
No TODO items completed in this PR.
Documentation
Scope: repair re-audit (attempt 2) of attempt 1's blocker, the ci: counting paragraph in docs/ship-policy.md, checked against lib/ship-queue.ts ciAtHead at a6a32e3.
Result: updated. The paragraph now says ci: reads every attempt of each check suite, judges a suite by its latest attempt that has jobs (earlier attempts only when the latest has none), and keeps the newest run per check name with the existing tie-break, two-apps and commit-status rules. A workflow run that failed with no jobs counts as a failed check
<workflow> (run <id>, no jobs)unless a later run of the same workflow replaced it, a run cancelled before any job is not counted, and an unreadable list is unknown, never green.Debt: none known from this edit. The unreadable-list wording was taken from the brief and not traced in code this round.
Test plan
Agent notes
ci: green at … (passed=1 failed=0 pending=0 skipped=0)for the feat: plan file review report + enriched JSONL logging (v0.9.7.0) #303 fixture, and land exited 0 (merged).red (passed=1 failed=2):checks=failureandsealed (run 42671854799, no jobs)=failure.gstack-pr-wait(parseHeadChecksin lib/gh-poll.ts viafetchChecksin lib/pr-wait-github.ts) andci-gate(gh pr checks) still read only each workflow run's latest attempt, the same blind spotciAtHeadhad.Approvals
Approved: yes (record r-5a351186a754). The full approval record stays private.
Plan: exempt: bug fix
Plan check: exempt bug fix
REVIEW_LOOP: passes=2 blocking_found=1 deferred=0 noted=3 fixed=3 scope=frozen unbound=3 fix_checks=1 dispatches=8
Refs GST-2167