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

Full suite red: test/flow-cache.test.ts #12662

Merged opened this in answer to

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

Merged

test/flow-cache.test.ts now builds a tenth-size forge, so the file runs in about 5 s here instead of 23 s, under the 20 s file budget. bun scripts/gate.ts and bun x tsc --noEmit were clean. The file's 9 tests pass.

Notes

shipped production is serving it deploy 77d0004

opened this

test/flow-cache.test.ts now builds a tenth-size forge, so the file runs in about 5 s here instead of 23 s, under the 20 s file budget. bun scripts/gate.ts and bun x tsc --noEmit were clean. The file's 9 tests pass.

The time was almost all in beforeAll, where bigForge() writes the production-size dataset of about 600k rows (about 25 s when I timed it on its own). The tests only check cache behaviour and that the computation is cut into at least 8 slices. They don't time anything, so they don't need production scale. I added a TENTH size built from PRODUCTION and renamed the first test from "on a production-sized forge" to "on a large forge". No test assertions changed.

The file no longer exercises the flow cache at full production size. Production-size coverage still exists in boot-no-stall, search-production-size and job-slices, but not for this cache specifically. I did not add the file to SLOW in scripts/gate.ts.

To try it: bun test ./test/flow-cache.test.ts.

Closes #12643

commented

test/flow-cache.test.ts now builds a tenth-size forge, so the file runs in about 5 s here instead of 23 s, under the 20 s file budget. bun scripts/gate.ts and bun x tsc --noEmit were clean. The file's 9 tests pass.

The time was almost all in beforeAll, where bigForge() writes the production-size dataset of about 600k rows (about 25 s when I timed it on its own). The tests only check cache behaviour and that the computation is cut into at least 8 slices. They don't time anything, so they don't need production scale. I added a TENTH size built from PRODUCTION and renamed the first test from "on a production-sized forge" to "on a large forge". No test assertions changed.

The file no longer exercises the flow cache at full production size. Production-size coverage still exists in boot-no-stall, search-production-size and job-slices, but not for this cache specifically. I did not add the file to SLOW in scripts/gate.ts.

To try it: bun test ./test/flow-cache.test.ts.

commented

test/flow-cache.test.ts now builds a tenth-size forge, which brings the file from 23 s to about 4–5 s, under the 20 s file budget. The check's gate failure (a 129-column comment line) is fixed, and I've pushed the fix.

  • Cause: nearly all of the 23 s was beforeAll writing the production-size forge from bigForge(), about 600k rows. These tests only check cache behaviour and that the computation is cut into at least 8 slices. None of them time anything, so they don't need production scale. I added a TENTH size built from PRODUCTION and renamed the first test from "on a production-sized forge" to "on a large forge". No assertions changed.
  • Gate fix: the comment above TENTH is now wrapped under 100 columns. bun scripts/gate.ts exits 0 once the change is committed; it exited 2 on the uncommitted edit, so it evidently reads the committed state.
  • Checks: bun x tsc --noEmit printed nothing and all 9 tests in the file pass. I did not run the full suite; the forge runs it on the push.
  • Not done: the flow cache is no longer exercised at full production size in this file. boot-no-stall, search-production-size and job-slices still use production-size forges, but not for this cache. I did not add the file to SLOW in scripts/gate.ts.

To try it: bun test ./test/flow-cache.test.ts.

Approved

Test-only change: flow-cache.test.ts builds a tenth-size forge (all PRODUCTION counts divide evenly), cutting the file from ~23 s to ~5 s. No assertions changed and the slice-count check (>=8) still holds. No security, API or dependency surface touched. Production-scale coverage of this cache is traded away, which the pull states openly.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs