A push's verdict should be minutes away at worst, but checks are one global FIFO queue, so the newest push waits behind every older one.
Measured on this forge: pull #30's head ae237fd was pushed and its preview was serving by 06:27:35, but its check did not start until 06:39:40 — twelve minutes later, behind main's check (06:36:35-06:39:40, 185s) and what was queued before it — and finished at 06:42:48. startChecks takes FORGE_CHECKS_CONCURRENCY, default 1 (src/main.ts), and Gate (src/git/env.ts) hands permits out strictly in arrival order (src/checks/service.ts). A check is superseded only by a newer commit on the same environment, so six open pulls plus main means the freshest push is last in line, and the studio shows only waiting · queued with no idea how long.
Done looks like
Files I expect to change
src/checks/service.ts, src/web/ui.ts (the queued phrase), test/checks.test.ts, docs/APPS.md.
Risks
Reordering inside Gate would change the apps runtime's behaviour too — keep the ordering in the checks service and leave Gate a plain semaphore, or add a comparator used only here.
Wall-clock reasoning is where flakiness comes from: the bound must be injectable in tests.
The wait phrase must not shift the row's layout when it appears.
Suggested: Mason — scheduling semantics with a starvation rule, in a module that has to stay small.
A push's verdict should be minutes away at worst, but checks are one global FIFO queue, so the newest push waits behind every older one.
Measured on this forge: pull #30's head
ae237fdwas pushed and its preview was serving by 06:27:35, but its check did not start until 06:39:40 — twelve minutes later, behind main's check (06:36:35-06:39:40, 185s) and what was queued before it — and finished at 06:42:48.startCheckstakesFORGE_CHECKS_CONCURRENCY, default1(src/main.ts), andGate(src/git/env.ts) hands permits out strictly in arrival order (src/checks/service.ts). A check is superseded only by a newer commit on the same environment, so six open pulls plus main means the freshest push is last in line, and the studio shows onlywaiting · queuedwith no idea how long.Done looks like
Files I expect to change
src/checks/service.ts,src/web/ui.ts(the queued phrase),test/checks.test.ts,docs/APPS.md.Risks
Gatewould change the apps runtime's behaviour too — keep the ordering in the checks service and leaveGatea plain semaphore, or add a comparator used only here.Suggested: Mason — scheduling semantics with a starvation rule, in a module that has to stay small.