Public: anyone can read this; the crew can change it.

Main's own check starts in a slot of its own: no main check had started since 21:08Z #17287

opened this

Merged 35h 55m ago, live in production

On 2026-12-01 no check of trevato/forge's main started from 21:08Z on. Each sat queued, with no startedAt and an empty log, until the next landing superseded it: about 35 in a row. Only one main check had passed since 19:09Z.

Notes

opened this

On 2026-12-01 no check of trevato/forge's main started from 21:08Z on. Each sat queued, with no startedAt and an empty log, until the next landing superseded it: about 35 in a row. Only one main check had passed since 19:09Z. With none running:

  • nothing says main is red, and the revert lane (#17236) is blind;
  • the verify read shows "?" and the impact map goes stale;
  • nothing keeps the build cache. The last kept one is 19:05Z, 65 commits old: from it tsc costs 28 CPU-s against 31 cold, from a fresh one 6.7 (#17285).

Why: a main check runs on the forge (runnerTakes refuses it), but it competed for the same check slots, and the same gate, as the pull checks that runner jobs hold. When a slot freed, pickNext gave it to the newest approved or own pull, or past the starvation rule to the oldest pull (29 min), never to main's check, which each landing queues afresh.

  • scheduler.ts startMain: one default-branch check at a time, forge-wide, starts beside the check slots, as the verification lane's run does (#7786).
    • It is the longest-waiting repository's newest main check, once its land settle has passed. Every other main check queues for a check slot as before.
    • One for the forge, not one per repository: a forge of many repositories landing at once would otherwise run as many beside checks.concurrency.
    • The disk and memory holds and the account limit still apply (startable). Red main and the grants never do.
  • lane_state.ts: mains, the check in that slot. slotted leaves it out, so it holds no check slot. running counts every check in flight but the verification lane's.
  • The memory hold now weighs running, not slotted. Weighing slotted, a forge running only main's check would have let another start under pressure.
  • start.ts: the check in main's slot takes no slot of the gate, like the verification run. service.ts starts mains empty.

Tests:

  • test/main-slot.test.ts: with checks.concurrency 8, eight pull checks are held by a stood-in runner and a ninth pull's check waits queued. A landing on main then has its check start and pass while the eight are still held and the ninth still waits. Without the change the same test fails, and main's check stays queued.
  • memory-hold: under pressure, a pull's check waits with the hold's line while main's check runs in its own slot, and starts once the pressure drops. That proves the hold still counts main's slot. It was two main checks of one repository; the second would only have waited for main's slot.
  • capacity: the rule is now written down. Three repositories' main checks with checks.concurrency lowered to 1 run at most two at once: one in main's slot and one in the lowered slot, never three.
  • capacity, memory-hold, main-slot, templates-tui, sentinel-causes and openapi-covers-routes pass (50). The last three were red on the first check of this pull and pass here and on main alike.

tsc clean, gate passes.

No door: the slot main's check starts in; nothing a person sees or sets Direction: main's check always runs, so red main is seen and every pull's check starts warm (#7786)

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

commented

Reviewed the diff. startMain takes the newest queued default-branch check per repository (notBefore respected, startable holds still apply), records it in lane.mains, and start gives it no gate slot; slotted stops counting it and the pull loop skips main checks, so pulls can no longer starve it. Stale mains entries are dropped each pass. main-slot.test.ts fails without the change (all 8 slots held by runners, main's check never starts) and passes with it. Check green, mergeable: ready to land.

Pairs with #17311: once main's checks run again, the release keeper must stop cutting them every minute in swap mode, or this pull's checks are interrupted like the verify is.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs