Public: anyone can read this; the crew can change it.
The merge queue says why a gate went red, and never bisects a merge conflict or an install failure (8-pull batch red in 6 s, then bisected) #5293
Parked 44d 13h ago
Every gated … red line in the merge queue now gives its reason, and a gate whose install broke is retried once instead of being bisected. If it breaks a second time the gate is logged as infrastructure and no pull is marked red.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew deploy 17d87eb
-
History
- Merge main into mason/5276-the-merge-queue-says-why-a-gate-went-red 17d87eb
- A test fails when a new /api/v1 route is registered without an OpenAPI row (#5134) fdd3df9
- The OpenAPI document describes a repository's code writes: create and delete a branch, write a file (#5125) 616e90b
- MCP `invites`: list the outstanding invites and revoke one, beside `mint_invite` (#5124) 3085e38
- A run that ends on the forge's own clone failure is interrupted, not a park against the issue (#5123) dff5db4
- A crew clone that fails on a broken mirror drops the mirror and clones plain, so one bad object never stops a run (#5120) 947cb02
- The app's owner hides a note or bans its sender from a screen, not only through `POST /__forge/note/moderate` (#5100) ed7bc94
- Concurrent check installs race on the shared bun cache ("Fail extracting tarball"): good pulls look red and stall the merge queue (#5094) 5725c03
- Errors on the crew page are §5's field error, not .error-note (#5091) f9b53a6
- Errors on the origins and migrate pages are §5's field error, not .error-note (#5090) ec14b86
- Errors on reports, the sandbox page and the fleet graph are §5's field error, not .error-note (#5089) df8e641
- A mirror's fetch error on the repository page and the browse page's error are §5's notice, not .error-note (#5088) d448e1b
- GET a repository's branches answers `{ items, next_cursor }`, and every test that reads it is updated (#5085) a5aa24a
- Errors on sign-in, passkeys, the first-admin form and the claim page are §5's field error, not .error-note (#5077) 9f4d7f3
- The merge queue logs each red's reason, retries a broken install once, and names in-batch conflicts (#5276) e465247
- A full gate on land says why it was red: install, typecheck, tests, timeout (#5276) dbe7de4
- Release 0.7.249: A test fails when a new GET list in the API answers a bare array (#5084) 9900e4b
- A test fails when a new GET list in the API answers a bare array (#5084) dd515be
- Release 0.7.248: The OpenAPI document describes the caller's password change and email verification (#5056);The admin's accounts, people and invites lists answer `{ items, next_cursor }` (#5052);The OpenAPI document describes the forge's front reads: health, here, front, forge and contribute (#5049);MCP `confirm_wai 8eff2be
- The OpenAPI document describes the caller's password change and email verification (#5056) 0e5d402
2 earlier comments
Every gated … red line in the merge queue now gives its reason, and a gate whose install broke is retried once instead of being bisected. If it breaks a second time the gate is logged as infrastructure and no pull is marked red. Bisection still runs for test and typecheck reds, and also for timeouts and unexplained check failures (see below).
Reasons (new src/checks/gate_reason.ts). The reason is worked out once from what the gate already has:
install: the gate failed before the check step (checkout, history or install), or its lines showFail extracting tarball/EINTEGRITY/ECONNRESET. The line match is there because a cluster Job runs install and check as one step.timeout: the check step ran past the manifest timeout.tests: N failed: frombun test's summary, or by counting failed test names.typecheck:error TS…lines.check failed: anything else.
src/checks/service.ts marks setup failures (setup) and check timeouts (timedOut) in runTier and passes them out of gate() (a new GateDone type). gateCandidate (src/checks/landing.ts) attaches the reason to a red verdict. For install it answers "interrupted" with the reason instead, because that is no verdict on the code.
Queue (src/checks/queue.ts).
- The log reads
gated 8 pulls: red (tests: 3 failed). - A broken install logs
gate infrastructure (install): gating once moreand gates the same candidate again. A second failure logsgated 8 pulls: infrastructure (install): nobody is handed back, there is no search, the batch doesn't count towards the red-batch rate, and the next sweep gates the pulls again.
Merge conflicts. On main, build already left a pull out of the candidate when it conflicted with an earlier step, and gated the rest — but it said nothing. It now logs left out: merge-conflict (#a × #b), finding #a as the first step whose tip #b no longer merges onto. Once #a lands, the next sweep sees #b conflict with main and its existing conflict path hands it to its builder to bring up to date.
Judgement calls:
- Timeouts still bisect, against the issue's "bisection only for test or typecheck reds". A whole-check timeout is as often a slow or hanging change as a slow machine. Treating it as no verdict would let one such pull re-gate the same batch forever.
- Unexplained check failures also still bisect. Lint or a step that ran out of memory is the code's red.
- An infrastructure gate is not counted or capped. A batch that keeps breaking at install is re-gated every sweep, the same as a gate cut off by the forge stopping. #5093 (the shared bun cache race behind it) is still open and not touched here.
- Probably no in-batch conflict in the probe. Conflicts were already dropped before the gate, so the 6-second red in the probe was most likely a setup or install failure. That case is now retried rather than bisected.
Tests. bun x tsc --noEmit is clean. test/gate-reason.test.ts and test/merge-queue.test.ts pass, as do the other merge-queue suites, landing, gate-interrupted, check-tiers and the five cross files (241 tests, 0 fail).
- New
test/gate-reason.test.tscovers each reason and its words. test/merge-queue.test.tsadds:- the red reason on the log line;
- the existing conflict test now checks for the
merge-conflict (#1 × #2)line; - a new test where
#bconflicts with#a: everything else lands in one gate, nobody is handed back, and#bthen conflicts with main; - install failing once (retried, lands);
- install failing twice (infrastructure, nobody red, two gates, lands on the next sweep).
No existing test was changed. The one that already covered the conflict only gained assertions.
To try it, run bun test test/gate-reason.test.ts test/merge-queue.test.ts. On a running forge, a red gate's [queue] gated … line now ends with its reason.
🤖 Generated with Claude Code
When the merge queue's gate on land goes red, the log now says why: red (install), red (typecheck), red (tests: 3 failed), red (timeout) or red (check failed). Two other changes come with it:
- Broken install: a gate whose install broke is gated once more, and a second break is logged as
infrastructure (install). No pull goes red for it and no search runs. - In-batch conflict: a pull that conflicts with an earlier pull in its batch is left out and named in the log (
left out: merge-conflict (#A × #B)), and the rest of the batch gates at once.
The reason is worked out in src/checks/gate_reason.ts from what the gate already has: whether it failed before the check step (setup), whether the check step timed out, and the check's own output lines. landing.ts attaches that reason to the verdict, and queue.ts writes it in the log and decides whether to gate again.
This push merges main, which had added locked installs that retry once (#5094), into src/checks/service.ts. To resolve it, TierOutcome now also carries main's infrastructure flag, check() returns TierOutcome, and the install step uses main's version but still marks a red as setup so the reason reads install. An install that fails twice for the machine is still "cut off" (interrupted) as on main. The type check is clean and the 145 tests across the checks, landing, gate-reason and merge-queue suites pass.
One thing to look at: the two retries now overlap. With main's install retry in, a gate whose install hits a temporary failure is tried up to four times: twice by the install step and once more by the queue. Also, an install that fails for a reason in the code itself is still never counted as red by the queue. I left that design as it was on this branch rather than change it in a merge; whether the queue's own retry should only cover the machine's failures is a follow-up.
To try it, run bun test test/gate-reason.test.ts test/merge-queue.test.ts and read the [queue] gated … lines.
🤖 Generated with Claude Code
Every
gated … redline in the merge queue now gives its reason, and a gate whose install broke is retried once instead of being bisected. If it breaks a second time the gate is logged as infrastructure and no pull is marked red. Bisection still runs for test and typecheck reds, and also for timeouts and unexplained check failures (see below).Reasons (new
src/checks/gate_reason.ts). The reason is worked out once from what the gate already has:install: the gate failed before the check step (checkout, history or install), or its lines showFail extracting tarball/EINTEGRITY/ECONNRESET. The line match is there because a cluster Job runs install and check as one step.timeout: the check step ran past the manifest timeout.tests: N failed: frombun test's summary, or by counting failed test names.typecheck:error TS…lines.check failed: anything else.src/checks/service.tsmarks setup failures (setup) and check timeouts (timedOut) inrunTierand passes them out ofgate()(a newGateDonetype).gateCandidate(src/checks/landing.ts) attaches the reason to a red verdict. Forinstallit answers "interrupted" with the reason instead, because that is no verdict on the code.Queue (
src/checks/queue.ts).gated 8 pulls: red (tests: 3 failed).gate infrastructure (install): gating once moreand gates the same candidate again. A second failure logsgated 8 pulls: infrastructure (install): nobody is handed back, there is no search, the batch doesn't count towards the red-batch rate, and the next sweep gates the pulls again.Merge conflicts. On main,
buildalready left a pull out of the candidate when it conflicted with an earlier step, and gated the rest — but it said nothing. It now logsleft out: merge-conflict (#a × #b), finding#aas the first step whose tip#bno longer merges onto. Once#alands, the next sweep sees#bconflict with main and its existing conflict path hands it to its builder to bring up to date.Judgement calls:
Tests.
bun x tsc --noEmitis clean.test/gate-reason.test.tsandtest/merge-queue.test.tspass, as do the other merge-queue suites, landing, gate-interrupted, check-tiers and the five cross files (241 tests, 0 fail).test/gate-reason.test.tscovers each reason and its words.test/merge-queue.test.tsadds:merge-conflict (#1 × #2)line;#bconflicts with#a: everything else lands in one gate, nobody is handed back, and#bthen conflicts with main;No existing test was changed. The one that already covered the conflict only gained assertions.
To try it, run
bun test test/gate-reason.test.ts test/merge-queue.test.ts. On a running forge, a red gate's[queue] gated …line now ends with its reason.🤖 Generated with Claude Code
Closes #5276