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

A full-suite file "red alone" on the runner says how it was run, and one red only under the runner's load is held, not handed to a builder #15241

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Each file a red full-suite run reruns alone now records how long the rerun took and how many other checks were running when it started.

Notes

shipped production is serving it deploy cfe12e4

opened this

Each file a red full-suite run reruns alone now records how long the rerun took and how many other checks were running when it started. A file red alone while other checks shared the runner is filed in the held group, the same red-only-in-full-suite label #14404 gives a flake under load, so no builder starts until a second full-suite run is red for it. A file red alone on an idle runner is filed startable, as before.

  • src/checks/execute.ts: rerunAlone takes a clock and a count of other running checks. Each answer becomes { passed, ms, others }, and the log says the count as each file starts and the time as it ends. A new otherChecksRunning(db, runId) counts this forge's running check runs other than the verification itself.
  • src/checks/report.ts: a new AloneAnswer type, either the timed record or a bare boolean for a rerun that recorded neither. heldAlone decides the hold: passed alone, or failed alone with others > 0. aloneLine names both numbers, e.g. "Red alone too: x failed when rerun alone on main's commit d178827 in 14.2 s, with 5 other checks running. The runner was shared, so the red may be load, and so it is held until a second full-suite run is red for it." On an idle runner the line ends "…in 14.2 s, with no other check running." and the file is filed startable.
  • Comments: the hold label's doc in alone_label.ts and the full_suite_flake entry in crew/held.ts now name the new case.

What I chose not to do:

  • RERUN_BUDGET_MS, MAX_RERUN_FILES, ALONE_MAX and reportGreen are unchanged, so a held issue still closes when its files are green again.
  • src/checks/rerun.ts is unchanged. Its rerunRed is the separate in-runner rerun from #12296; the alone rerun this issue is about is the one in execute.ts.
  • "On the runner" is counted as running checks in this forge's database. A hosted child's checks in the parent's lane are not counted.

Tests are in test/full-suite-report.test.ts:

  • idle red alone: startable, with the wording
  • shared red alone: held, with the wording, and a second red lifts the hold
  • the singular "1 other check", and a pass alone naming its time
  • otherChecksRunning counts only running checks other than the run itself
  • rerunAlone records ms and others

The existing rerun test now expects the record instead of a boolean. I changed it because the shape changed, not because the test was wrong.

To try it: bun test test/full-suite-report.test.ts test/crew-held.test.ts test/checks-rerun.test.ts test/check-verify-rerun.test.ts test/timers-named.test.ts. All pass, and bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. scripts/fast.ts named 2531 files, far too broad to run here, so I picked these covering files myself.

The keep_plan tool wasn't available in this session, so no plan was posted on the issue.

🤖 Generated with Claude Code

Closes #15240

commented

Each file a red full-suite run reruns alone now records how long the rerun took and how many other checks were running when it started. A file red alone while other checks shared the runner is filed in the held group, the same red-only-in-full-suite label #14404 gives a flake under load, so no builder starts until a second full-suite run is red for it. A file red alone on an idle runner is filed startable, as before.

  • src/checks/execute.ts: rerunAlone takes a clock and a count of other running checks. Each answer becomes { passed, ms, others }, and the log says the count as each file starts and the time as it ends. A new otherChecksRunning(db, runId) counts this forge's running check runs other than the verification itself.
  • src/checks/report.ts: a new AloneAnswer type, either the timed record or a bare boolean for a rerun that recorded neither. heldAlone decides the hold: passed alone, or failed alone with others > 0. aloneLine names both numbers, e.g. "Red alone too: x failed when rerun alone on main's commit d178827 in 14.2 s, with 5 other checks running. The runner was shared, so the red may be load, and so it is held until a second full-suite run is red for it." On an idle runner the line ends "…in 14.2 s, with no other check running." and the file is filed startable.
  • Comments: the hold label's doc in alone_label.ts and the full_suite_flake entry in crew/held.ts now name the new case.

What I chose not to do:

  • RERUN_BUDGET_MS, MAX_RERUN_FILES, ALONE_MAX and reportGreen are unchanged, so a held issue still closes when its files are green again.
  • src/checks/rerun.ts is unchanged. Its rerunRed is the separate in-runner rerun from #12296; the alone rerun this issue is about is the one in execute.ts.
  • "On the runner" is counted as running checks in this forge's database. A hosted child's checks in the parent's lane are not counted.

Tests are in test/full-suite-report.test.ts:

  • idle red alone: startable, with the wording
  • shared red alone: held, with the wording, and a second red lifts the hold
  • the singular "1 other check", and a pass alone naming its time
  • otherChecksRunning counts only running checks other than the run itself
  • rerunAlone records ms and others

The existing rerun test now expects the record instead of a boolean. I changed it because the shape changed, not because the test was wrong.

To try it: bun test test/full-suite-report.test.ts test/crew-held.test.ts test/checks-rerun.test.ts test/check-verify-rerun.test.ts test/timers-named.test.ts. All pass, and bun x tsc --noEmit and bun scripts/gate.ts --fix are clean. scripts/fast.ts named 2531 files, far too broad to run here, so I picked these covering files myself.

The keep_plan tool wasn't available in this session, so no plan was posted on the issue.

🤖 Generated with Claude Code

Approved

Does what #15240 asks and nothing more: each alone rerun records wall time and the other running checks at start, aloneLine names both, and a red alone on a shared runner is held under the #14404 label until a second full-suite red. The idle case is filed startable. Tests cover idle, shared, wording, singular, the counter and the recorded record, and fail without the change. No new dependency and no page or terminal surface, so the both-doors and docs rules do not apply. The two things I would do next: (1) in execute.ts, rerunAlone repeats the inline record type; use the exported AloneAnswer shape, or a named AloneRecord, so the type lives in one place and the bare-boolean arm can be retired once the old tests move to records. (2) On a busy forge others>0 will be nearly always true, so a real red alone is held until a second red; add a vitals count of held-for-load files so that cost shows as a number.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs