ForgeDocs

Queue-switch bench, 2026-11-17 to 2026-11-19

Bench A/B for incident Item 5e3c3a3c (passed landings waited 60–100 min behind a parked or re-checking head). It tests three queue switches, each off by default and set as a Convex environment variable on the bench deployment only:

SwitchVariableWhat it changes
N1FORGE_QUEUE_NEW_RUN_WAKEwakes a passed follower when its order holder binds a new check run
O3FORGE_QUEUE_COHORT_KEEP_HEALTHYwhen a shared cohort check fails (or a member withdraws), keeps members whose own admission check passed
O4FORGE_QUEUE_CANCEL_HONOURS_FASTspares a running solo check that a main move would retire, under landingMode: "fast"

Arms: A = all off, B = N1, C = N1 + O3 + O4. Arms are compared only at the same N and the same queue policy. All quantiles are interpolated p50/p90. Every cell is a dry (scripted) Forge cell on the t3code bench fork unless marked live. Each cell's own result.json under BENCH_ROOT/runs/<cell>/ is the one source of truth for its row.

Verdict per switch

SwitchBench verdictJudged by
N1Path not reached in any healthy switch-on cell, on either policy. No regression in any cell where it was on.Unit tests + incident replays
O3Not reachable on either bench policy: it keeps only members with a passed admission check inside a shared cohort. The accepted policy has no admission check; the dogfood policy almost never forms a cohort.Unit tests + incident replays
O4Precondition met only in A′ main-move 154507 (by chance), and in no C′ cell. No regression where it was on.Unit tests + incident replays

"Precondition" means the situation the switch acts on happened (either arm can show it); "reached" means the switch-on behaviour is visible (scripts/bench-t3code/path-evidence.mjs). Under the dogfood policy (full admission + fast) almost every landing lands on its own admission run, so the queue situations the three switches change are rare: 0–1 landings per cell take a solo queue check, and shared cohorts formed in 0–1 cells of 5. So the bench cannot decide these switches; the decision to keep or delete each one (Item 4647d45b) rests on the unit tests and the incident replays. The bench result is that turning all three on caused no regression.

What this bench could and couldn't prove

  • Proven: no regression from N1, O3 or O4. With all three on (C′), no healthy cell was worse than its all-off pair on the server-side metrics, and the replay of the accepted traces was identical across arms. Where C′ looked worse (pass-to-land in withdraw-join and parked-head), the receipts trace it to landings bunching behind one main move, which happens the same way in A′.
  • Not provable here: that the fixes help. Their queue situations were not reachable. Under the dogfood policy almost every landing lands on its own admission run, so a passed follower behind a re-checking holder (N1), an admitted member of a failed shared cohort (O3) and a running solo check overtaken by an overlapping landing (O4) occur rarely or never at N=10. Under the accepted policy nothing waits after its check, and O3 needs an admission check the policy doesn't run. These fixes are judged by their unit tests and the incident replays.
  • Found on the way: the bunched CHANNEL_CHANGED tail. When several landings pass right after main moves, each recomposes onto the new main and lands one after another, at ~30 s per serialized commit. That gives 2–6 min pass-to-land tails in both arms. It goes to the claw-back Item 4e013cdb.

Offline replay (before any cell)

tests/queue-sim/replay-runner.mjs replays the 12 accepted bench traces through the real queue handlers, once per arm (A, B, C and O3+O4). Results were byte-identical across all four arms (same output hash), 11 pass and 1 fail in every arm. The one failure is a data gap in one trace ("bench replay N=5 rep=3: Incomplete trace: check-11 timing-or-cost"), not a queue result. The incident fixture (tests/hosted-landing-queue-sim.test.mjs, pattern 5e3c3a3c) passed 2/2 in every arm. So on the accepted traces the switches change nothing, which matches the path checks below.

Baseline: N=3 like for like

CellCLIWall to all landedCheck wall p50 / p90CI runs / billed minConvex
accepted forge-n3-r1-dry-a9-20261115T105211aea14821866 s158 / 173 s10 / 30$0.0494
accepted forge-n3-r1-dry-a8-20261115T035820aea14821883 s—10 / 31$0.0493
now forge-n3-r1-dry-a1-20261118T06060714a26884901 s155 / 164 s10 / 30$0.0456

Wall is 2% over the a8 run and 4% over a9; the two accepted runs differ by 2% between themselves. That is within noise. CI use is the same and Convex is 8% lower. (An earlier comparison against an N=10 cell compared different shapes, see comment 9d1c067b on 5e3c3a3c; the N=3 cell is the like-for-like baseline.)

Policy before and after

The incident happened on the dogfood project's policy. The bench project ran the accepted bench policy. For the switch A/B only, the bench project was switched to the dogfood queue settings and then restored after the A/B (owner-approved each time):

FieldAccepted (before)Dogfood (A′/C′ cells)Restored
acceptance.admissionCheckabsent (= false)"full"false
acceptance.landingModeabsent (= "strict")"fast""strict"
every other policy field—unchangedbyte-identical to before

set-policy merges acceptance fields, so the restore writes the two fields explicitly. The code reads them as admissionCheck ?? false and landingMode ?? 'strict', so behaviour equals the accepted policy; only the stored text differs.

Cost of the dogfood queue settings (A′ data)

Smoke, N=10, all switches offAccepted policy (120909)Dogfood policy (140145)
CI runs / billed min8 / 2420 / 61 (×2.5)
Billed min per landing2.46.1
Convex per cell$0.0673$0.0849 (+26%)
Convex per 1,000 landings$6.73$8.49
Wall597 s965 s

Each landing runs its full admission check and then, if main moved, a queue check, so the dogfood settings cost about 2.5× the CI minutes. The site's CI-minutes claim holds only on the accepted policy. Full admission also doubles exposure to upstream flakes (see t23938 below).

Arms × scenarios

Accepted policy (queue-only checks), N=10

ScenarioAB (N1)Path
smoke074907: wall 669 s, 8 runs, 23 min, $0.0654093841: wall 595 s, 9 runs, 27 min, $0.0654none
cohort-fail v1081301: wall 912 s, 26 min, $0.0709100118: wall 856 s, 26 min, $0.0693O3 not reachable (no admission)
withdraw-join063508: INVALID (late join only)102836: INVALID (late join only)withdraw never fired
main-move091352: wall 702 s, 30 min, $0.0735105348: wall 639 s, 27 min, $0.0725not reached
parked-head v1084040: wall 1021 s, 6 runs, 42 min, $0.0633111708: wall 1039 s, 7 runs, 50 min, $0.0629N1 path not reached
  • Pass-to-land is 3 s at p50 in every accepted-policy cell: nothing waits after its check.
  • Parked-head v1: N1 path not reached. The extra CI run in B (7 vs 6, +8 billed min) is batch-boundary jitter; 0 runner minutes were discarded in either arm. Every run took 393–431 s because the followers' trees contained the head's 240 s slow test.
  • Withdraw-join on this policy tested only the late join: the scripted withdraw polled for a status shape the reply does not have and withdrew too late (LANDING_NOT_LIVE). The B-vs-A gap there is dispatch order inside a shared-package pair, not N1 (comment 9d1c067b's attribution). The fixed withdraw (123218) was voided by its own role guard: the withdraw body also sent reason, which the CLI refuses for a withdraw by submissionId (BAD_ARGUMENT). INVALID.

Dogfood policy (full admission + fast), N=10

ScenarioA′ (all off)C′ (all on)Target path
smoke140145182347none
cohort-fail v1143142: retired—O3
cohort-fail v2171552: VOID—O3
withdraw-join151049011406 (re-run; 190044 I/O-degraded)O3
main-move154507234056 (re-run; 221108 INVALID, I/O)O4
parked-head v2163401002929 (re-run)N1

Server-side metrics (the switches are judged on these only):

CellArmCLIPass-to-land all p50 / p90 (n)Held-only p50 (held)Runner queueCheck wall p50 / p90WallRunsBilled / discarded minConvex
smoke 140145A′df8d615738.0 / 100.1 s (10)83 s (4)40 s168 / 184 s965 s2061 / 0$0.0849
smoke 182347C′f1126ef935.2 / 113.1 s (10)153 s (4)77 s170 / 188 s1184 s2162 / 1.3$0.0837
withdraw-join 151049A′df8d615720.9 / 64.8 s (8)73 s (3)38 s164 / 174 s1091 s2059 / 1.5$0.0841
withdraw-join 190044C′f66abe7334.2 / 46.3 s (10)— (0)42 s181 / 196 s1223 s1958 / 1.6$0.0780
withdraw-join 011406C′f66abe7357.7 / 343.2 s (10)172 s (5)37 s167 / 177 s935 s2061 / 0$0.0804
main-move 154507A′df8d615736.5 / 127.2 s (9)177 s (4)38 s167 / 187 s1076 s2060 / 3.9$0.0897
main-move 221108C′f66abe7333.6 / 45.8 s (10)111 s (1)37 s162 / 184 s2944 s1649 / 0$0.0651
main-move 234056C′f66abe7337.3 / 52.8 s (10)65 s (1)42 s167 / 177 s957 s2163 / 0$0.0787
parked-head 163401A′aa7e7a2445.3 / 137.6 s (8)180 s (5)29 s168 / 242 s1403 s1554 / 5.4$0.0695
parked-head 002929C′f66abe7369.5 / 194.4 s (10)145 s (5)33 s147 / 203 s1423 s1761 / 0$0.0626
cohort-fail 143142A′df8d615730.4 / 114.2 s (9)193 s (2)40 s164 / 174 s1444 s2060 / 2.0$0.0810
cohort-fail 171552A′aa7e7a24VOID50 s1503 s2472 / 2.1$0.0927

No cell had runner queue above 120 s, so none is marked CI contention.

Path results on the dogfood policy:

  • N1 precondition met only in A′ parked-head 163401, through incidental waits (the holder waited 690 s for a check slot; two other landings re-checked 3 times). The scripted situation never happened in either arm: the head's dependent followers pass admission in 130–190 s and land while the head's 240 s check still runs, so the head gets COMPOSITION_CONFLICT twice and lands last (~1420 s in both cells). C′ 002929: not reached (no holder re-checked).
  • O3: no admitted member of a failed shared check in any cell; no shared batch at all in the C′ withdraw-join re-run.
  • O4 precondition met only in A′ main-move 154507 (one landing re-checked after an overlapping commit). C′ 234056: 9 of 10 landed on their admission run; the one queue-checked landing met no overlap. Not reached.

Pass-to-land metric note

scenario-report's pass-to-land uses heldAfterCheck[0].from, so it covers only landings held after a passed check (the "held-only" column). The all-landings figure is each landing's last operation ciEndedAt → committedAt from the cell's own record timing. Both are reported; the switches are read on both.

Pass-to-land differences are bunching, not switches

C′ withdraw-join 011406 and parked-head 002929 have worse all-landing pass-to-land than A′. The receipts show why, and it is the same mechanism in both arms:

  • back-to-back commits are serialized at ~30 s each (median gap 29 s A′, 30 s C′ in parked-head; 46–59 s in main-move);
  • a passed landing whose main moved goes through CHANNEL_CHANGED (recompose onto the new main, then land), one after another. Holds of 124–337 s appear in C′ 011406 and of 152–294 s in A′ cells (143142, 154507, 163401, 171552);
  • in 011406, 5 landings passed admission within 7 s right after the first landing moved main, so the serial chain was longer than in A′ 151049. There was no batch, so O3 could not act, and the N1 and O4 preconditions were false.

Both are claw-back lines for Item 4e013cdb (~30 s per serialized commit; serial recompose-and-land after a main move).

Client side vs server side

Client time is the land command's own steps (landTiming.stepsMs) from the agents' replies.

PairClient total p50 / p90 A′C′Read
smoke 140145 / 18234728.8 / 35.1 s30.3 / 34.5 snoise (+1.5 s)
withdraw-join 151049 / 01140629.2 / 33.5 s27.2 / 30.4 snoise
main-move 154507 / 23405627.4 / 32.2 s25.9 / 30.1 snoise
parked-head 163401 / 00292935.6 / 73.0 s26.3 / 32.1 sA′ slower (capture 2.25 vs 1.20 s, gates 1.93 vs 0.96 s); different CLI and an I/O-heavy afternoon, not like for like
withdraw-join 151049 / 19004429.2 / 33.5 s63.4 / 100.0 sI/O-degraded cell (capture 12.4 s)
main-move 154507 / 22110827.4 / 32.2 s169.5 / 407.5 sI/O-degraded cell

In the healthy pairs the client steps differ by no more than noise, so the server-side columns above carry the comparison.

I/O-degraded cells and the disk-speed gate

C′ withdraw-join 190044 and C′ main-move 221108 ran while the machine's disk I/O was degraded. The Lane checkout's file copy (checkout.phasesMs.copyHash, normally 2–4 s) took 3–56 s in 190044 and 21–529 s in 221108; dispatch spread was 15–292 s and 48–1557 s against about 40 s normally. With agents starting minutes apart, every landing landed on its own admission run, so no switch situation could arise. Both cells were re-run in a quiet window with a disk-speed gate: the series runner reads the reset Lane's copyHash and refuses a cell above 10 s. The re-runs read 2.8, 2.8 and 2.1 s.

CLI drift caveat

The bench CLI (the client) auto-updated during the series, so client builds differ across cells: A′ main-move on df8d6157, A′ parked-head and cohort-fail on aa7e7a24, C′ smoke on f1126ef9, the rest of C′ on f66abe73. A measurement hold kept the CLI fixed from 19:06 UTC on 2026-11-18. The bench deployment's server code is deployed only on purpose, so the queue code under test is the same in every A′/C′ cell. Each cell's result.versions names its CLI.

Harness

The dogfood cells ran on harness pin a4268228. From C′ main-move 221108 on, by lead ruling, only scripts/bench-t3code/gates.mjs was replaced by main's version (the macOS important-usage disk probe), run with --unpinned. The gate only decides whether a cell may start and never touches timing.

Retired, void and invalid cells

CellStatusWhy
withdraw-join 063508 (A), 102836 (B)INVALID, late join onlyscripted withdraw never fired (status-shape bug)
withdraw-join 123218 (A)INVALIDrole guard: withdraw reply BAD_ARGUMENT (reason sent with a submissionId)
cohort-fail 143142 (A′)retired: "scenario cannot reach O3 under admission"a change whose own test fails is stopped by its admission check and never joins a cohort; numbers kept as a cost point
cohort-fail v2 171552 (A′)VOIDfail-once fired at the admission check, not in the queue (scenario design)
main-move 221108 (C′)INVALID for O4I/O-degraded
withdraw-join 190044 (C′)not like for likeI/O-degraded prep
parked-head 162746not a cellreset finish failed on the server (HOSTED_ACTION_FAILED)

Findings for other Items

  • t27456 late conflict notice (cohort-fail 143142). Dispatched 22 s, land submitted 71 s. No compose, selection or check reservation happened until 1096 s. COMPOSITION_CONFLICT came at 1116 s, but it was knowable when t22302 committed at 195 s. Second attempt conflicted again at 1181 s; after sync/resolve the third landed at 1444 s.
  • t23938 upstream flake (Item 4a83a41f). Admission run on the bench fork failed src/preview/ServerBrowserPage.test.ts > server browser element refs > redacts a data: link whose scheme a password value would mask with Page.captureScreenshot: Unable to capture screenshot. Full admission runs the whole check twice per landing, so flake exposure doubles.
  • t26770 passed, then waited 11 min (C′ smoke 182347; Done-when of 5e3c3a3c). It passed admission, waited 150 s behind an accepting holder with disjoint files, then main moved, its analysis expired and it ran a second check.
  • Semantic conflict across disjoint files (cohort-fail v2 design). Two changes that each pass alone, on disjoint files, can both land through clean-disjoint and leave main with a failing test. This is the documented clean-disjoint trade-off and is not counted against any switch (Item ddf43617).
  • Claw-back (Item 4e013cdb): ~30 s per serialized commit; serial recompose-and-land after a main move (60–340 s holds).

Live cell: moved to the end-of-phase full bench

The planned live gpt-6.1-sol Forge N=10 cell, and its qualifying dry smoke, were cancelled by owner decision on 2026-11-19. The bench runs once, in full, at the end of the phase on the final code, after the switches become permanent code or are deleted. That run compares against the accepted cell 8c9b84fc (forge-n10-r1-a1-20261115T120716: wall 860.677 s, Convex $0.0484) and the site's claims (median 6:00, all ten 12:43, 24 CI min, 19.1M cached input tokens).

State left for that run:

  • bench project on the restored accepted policy (owner-approved);
  • all three switches unset on the bench deployment;
  • bench deployment at Git 24ea63a1;
  • bench CLI on main State f578943d (mirror: 24ea63a1);
  • a clean harness pin at 24ea63a1 with its own stable build copy.

The qualifying smoke (forge-n10-r1-dry-a1-20261119T071317) was stopped mid-cell when the decision came. It is not a result: its in-flight landings finished on their own, and none was withdrawn.