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

The check runs its tests in two shards #879

Merged opened this

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

Merged

The droplet was at load 41 with the pulls API taking 30 s. Inside the forge pod, each crew run and each check runs `tsc` and then the gate in `min(8, cpus)` shards, which is 4 shards because the pod sees 4 CPUs. Two crew runs plus a check is a dozen `bun test` processes on a pod limited to 3 CPUs.

shipped production is serving it deploy b2c98db

opened this

The droplet was at load 41 with the pulls API taking 30 s. Inside the forge pod, each crew run and each check runs tsc and then the gate in min(8, cpus) shards, which is 4 shards because the pod sees 4 CPUs. Two crew runs plus a check is a dozen bun test processes on a pod limited to 3 CPUs.

FORGE_CHECK_SHARDS cannot be set on the pod. Checks (src/checks/service.ts) and crew shells (src/crew/claude.ts) start from childEnv(), which passes on only PATH, HOME, LANG, USER, LOGNAME and TMPDIR. So the setting goes into the command itself:

bun x tsc --noEmit && FORGE_CHECK_SHARDS=2 bun scripts/test-shards.ts --timeout 60000 --gate

scripts/check.ts (bun run check) runs check.run through /bin/sh -c, so a person or agent running the gate by hand gets the same two shards. On a laptop with more cores the gate is slower; bun scripts/test-shards.ts --gate without the prefix still uses every core.

test/check-list.test.ts and test/shards.test.ts pass (34 tests).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs