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

Main's full check has failed at 40-43m twice today (4:38, 9:04); make it pass… #16658

Merged opened this in answer to

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

Merged

Main's full check now defaults to 8 shards instead of 4, which should cut the roughly 43-minute run to about 25. I haven't seen it run, and the three green runs are not done. (1) Why the two runs failed.

Notes

shipped production is serving it deploy 964a8fe

opened this

Main's full check now defaults to 8 shards instead of 4, which should cut the roughly 43-minute run to about 25. I haven't seen it run, and the three green runs are not done.

(1) Why the two runs failed. Neither was a timeout: check.timeout is 7200 s. Times below are UTC.

  • 10:38 → 11:19 (41 min), your "4:38" run, 0cd2497: a real failure. test/overlap.test.ts "two processes on one data directory start each run once > the crew is queued on each issue once, whichever process asks" got 1 issue where it expected 400. It failed alone too. #16642 was filed for it and was later closed as "green again".
  • 15:04 → 15:48 (43 min), your "9:04" run, 1821b44: timing-budget failures, not logic. Four files each had a test over the 2 s budget under load: small-machine-off, crew-check-cpu-stop, tui-mirror-set and code-viewer-reading. A fifth, crew-review-stall, took 2.50 s under load and 1.91 s alone. The four went green when rerun alone, and #16654 holds them.

(2) Slowest steps, main full check vs pull check. I could not get a per-step breakdown for a pull check, so I compare what each runs. The fast tier runs only the files the diff reaches, which is why a pull check takes 11–12 minutes. Main's check runs all 4438 files, about 10,000 s of work, with the runner given 4 shards. That gives a wall time of 2414 s and 2581 s in the two runs, which is the 40–43 minutes. About 1.1 s of each file is process startup.

The slowest files in the 15:04 run:

FileTime
shards-run44.6 s
spawn-cell-looks33.0 s
spawn-small-cell32.6 s
page-budget29.0 s
engine-split28.2 s

The fix. The forge hands every check FORGE_CHECK_SHARDS=4, and the 16-CPU cell is never asked for more. A verify-tier run (x.tier === "verify") now defaults to min(8, the cell's CPUs) through the new wholeSuiteShards in src/core/capacity.ts.

  • Pull checks keep 4.
  • An admin's setting or FORGE_CHECK_SHARDS still wins for both.
  • I stopped at 8, not the 12 the cell's CPU watchdog allows, because more load means more 2 s-budget breaches.
  • It reached both places that start a verify run: src/checks/run_tier.ts and src/checks/tier_runner.ts.
  • docs/OPERATING.md has a line on it.
  • test/capacity-cpus.test.ts has new tests: 8 for verify, 4 for a pull check, and an override still wins. I ran the capacity and check-verify test files; tsc and the gate are clean.

What I did not do.

  • No look at the running check. The 25-minute figure is an estimate; 8 shards halves the shard time, and I have not seen it run.
  • Possible no-op. If production has an admin checks.shards setting of 4, it still wins and this changes nothing. The log line "FORGE_CHECK_SHARDS 4" does not show which source it came from. Check /admin/limits.
  • Retime step may need widening. The 2 s budget breaches under load are still red-prone. The retime step that forgives them gets 60 s alone, and I did not widen it. It may need to be if more shards produce more breaches.
  • Duplicates. #16570 and #16654 are related open issues, but neither covers speed, so I did not close this as a duplicate.
  • No skipped, deleted or retried tests, and the time limit is unchanged.

To check it. After the next main verify run, its log's first lines should read 8 shards (sized), and the wall time should be well under 30 minutes. Keep an eye on the "over the budget" lines for new breaches. Three greens in a row still have to happen on main.

Closes #16655

commented

Main's full check now defaults to 8 shards instead of 4, which should cut the roughly 43-minute run to about 25. I haven't seen it run, and the three green runs are not done.

(1) Why the two runs failed. Neither was a timeout: check.timeout is 7200 s. Times below are UTC.

  • 10:38 → 11:19 (41 min), your "4:38" run, 0cd2497: a real failure. test/overlap.test.ts "two processes on one data directory start each run once > the crew is queued on each issue once, whichever process asks" got 1 issue where it expected 400. It failed alone too. #16642 was filed for it and was later closed as "green again".
  • 15:04 → 15:48 (43 min), your "9:04" run, 1821b44: timing-budget failures, not logic. Four files each had a test over the 2 s budget under load: small-machine-off, crew-check-cpu-stop, tui-mirror-set and code-viewer-reading. A fifth, crew-review-stall, took 2.50 s under load and 1.91 s alone. The four went green when rerun alone, and #16654 holds them.

(2) Slowest steps, main full check vs pull check. I could not get a per-step breakdown for a pull check, so I compare what each runs. The fast tier runs only the files the diff reaches, which is why a pull check takes 11–12 minutes. Main's check runs all 4438 files, about 10,000 s of work, with the runner given 4 shards. That gives a wall time of 2414 s and 2581 s in the two runs, which is the 40–43 minutes. About 1.1 s of each file is process startup.

The slowest files in the 15:04 run:

FileTime
shards-run44.6 s
spawn-cell-looks33.0 s
spawn-small-cell32.6 s
page-budget29.0 s
engine-split28.2 s

The fix. The forge hands every check FORGE_CHECK_SHARDS=4, and the 16-CPU cell is never asked for more. A verify-tier run (x.tier === "verify") now defaults to min(8, the cell's CPUs) through the new wholeSuiteShards in src/core/capacity.ts.

  • Pull checks keep 4.
  • An admin's setting or FORGE_CHECK_SHARDS still wins for both.
  • I stopped at 8, not the 12 the cell's CPU watchdog allows, because more load means more 2 s-budget breaches.
  • It reached both places that start a verify run: src/checks/run_tier.ts and src/checks/tier_runner.ts.
  • docs/OPERATING.md has a line on it.
  • test/capacity-cpus.test.ts has new tests: 8 for verify, 4 for a pull check, and an override still wins. I ran the capacity and check-verify test files; tsc and the gate are clean.

What I did not do.

  • No look at the running check. The 25-minute figure is an estimate; 8 shards halves the shard time, and I have not seen it run.
  • Possible no-op. If production has an admin checks.shards setting of 4, it still wins and this changes nothing. The log line "FORGE_CHECK_SHARDS 4" does not show which source it came from. Check /admin/limits.
  • Retime step may need widening. The 2 s budget breaches under load are still red-prone. The retime step that forgives them gets 60 s alone, and I did not widen it. It may need to be if more shards produce more breaches.
  • Duplicates. #16570 and #16654 are related open issues, but neither covers speed, so I did not close this as a duplicate.
  • No skipped, deleted or retried tests, and the time limit is unchanged.

To check it. After the next main verify run, its log's first lines should read 8 shards (sized), and the wall time should be well under 30 minutes. Keep an eye on the "over the budget" lines for new breaches. Three greens in a row still have to happen on main.

Approved

The verify tier now defaults to min(8, the cell's CPUs) shards and a pull's check keeps 4. Both places that start a verify run (run_tier.ts and tier_runner.ts) pass the flag. An admin setting or FORGE_CHECK_SHARDS still wins, and the new tests cover each of these cases. The how-to is in docs/OPERATING.md, not README. There is no page or terminal surface here, so I did not use the preview. This is a read of the diff only; I ran no tests.

Two things I would do next:

  1. Check /admin/limits for a stored checks.shards of 4. If one exists it overrides the new default and the change does nothing. Make shardsLine print the source (setting, environment or sized), so the first log line says which one decided.
  2. After the first verify run at 8 shards, count the 'over the budget' lines. If they rise, widen the retime step's 60 s rather than lowering the shard count.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs