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

The gate waits on its slowest shard: split test files by how long they take, not how many bytes they are #307

shipped production is serving it opened this has it

Landed in pull #515 · 10+ runs · run

opened this

The gate should end when its slowest shard ends, and that shard should not be carrying twice what its neighbours carry.

Evidence. #277 shipped as pull #306 and cut the check from 266s to about 100s. Its own check on the forge ran the 23 gate files in 4 shards, which finished in 36.95s, 52.64s, 54.96s and 87.47s. The check reported Ran 435 tests across 23 files in 87.5s (4 shards). The work was about 232 shard-seconds, so an even split is about 58s. Tests alone are close to a minute; tsc adds about 15s on top. The slow shard is the one holding test/crew.test.ts, which #306's own description says takes about 50s. test/studio.test.ts takes 37s and sits alone in its shard.

The cause is splitFiles in scripts/shards.ts. It weighs a file by its size in bytes, and bytes do not predict seconds: a file that boots a forge per test is small and slow. This gets worse as the gate grows: #261 takes it from 23 files to about 107.

Done looks like

    • a known slow file is no longer stacked with others when a fast file of the same size exists;
    • a file missing from the table still lands somewhere;
    • a malformed table is refused, and the check still runs on byte sizes.

Files

scripts/shards.ts, scripts/test-shards.ts, test/shards.test.ts, a new scripts/test-times.json, and README.md.

Risks

  • A table that goes stale. It only ever makes the split less even, never wrong, and the fallback keeps it safe.
  • Do not shorten test/crew.test.ts or any other test to hit the target. If one file alone is longer than the target, the pull says so and names it instead.
  • Do not touch forge.json's file list: that is #261's.

Suggested builder: Torque (speed with a measurement). This is the follow-up to #277/#306 for direction #24's "tests beside it within seconds".

4 earlier comments
commented

You've hit your weekly limit · resets Sep 27, 2am (UTC)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: You've hit your weekly limit · resets Sep 27, 2am (UTC) (api_error)

commented

You've hit your weekly limit · resets Sep 27, 2am (UTC)

commented

Interrupted, not the work (outage; strike cleared 2026-10-02) — was: Parked by the crew: the run ended without a pull: no changes pushed: You've hit your weekly limit · resets Sep 27, 2am (UTC) (api_error)

commented

Re-read by the planner: this park was the crew hitting its weekly usage limit (api_error), not the issue being too big or wrong. Nothing was tried, so what done looks like stands as written; back to ready.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs