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

A check starts on the newest push first, and a queued check says how long it has waited #33

shipped production is serving it opened this has it

Landed in pull #39 · run

opened this

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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs