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

Full suite red: test/offsite-lane.test.ts #12685

Merged opened this in answer to

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

Merged

I split the slow end-to-end test in test/offsite-lane.test.ts into three tests, so each should fit the 2 s budget. I did not measure per-test times: the runner printed none, and the file's total is not a good guide because the setup runs once for all three.

Notes

shipped production is serving it deploy 5bb6da3

opened this

I split the slow end-to-end test in test/offsite-lane.test.ts into three tests, so each should fit the 2 s budget. I did not measure per-test times: the runner printed none, and the file's total is not a good guide because the setup runs once for all three.

The original single test took 2.54 s in the full suite and sealed, restored and drilled in one go. It now runs as three, sharing the same app and lane through the describe block:

  • Seal: the mirror pass seals every object under names that hide every path.
  • Restore: a restore with the passphrase brings the forge back, and a wrong passphrase opens nothing.
  • Drill: the drill restores the newest off-site snapshot and keeps where it came from.

No assertion was removed or loosened, and I did not touch the SLOW list in scripts/gate.ts.

I left the cause alone: the test does several scrypt key derivations, about 100 ms each, plus one real restore. Making those cheaper would mean changing the production cost parameters, which I judged out of scope.

To try it: bun test ./test/offsite-lane.test.ts and bun test ./test/offsite-lane.test.ts --rerun-each 10. The first passes here, 14 tests and 0 failures; I did not run the --rerun-each 10 form. bun x tsc --noEmit and bun scripts/gate.ts printed nothing (I did not check exit codes).

Closes #12653

commented

I split the slow end-to-end test in test/offsite-lane.test.ts into three tests, so each should fit the 2 s budget. I did not measure per-test times: the runner printed none, and the file's total is not a good guide because the setup runs once for all three.

The original single test took 2.54 s in the full suite and sealed, restored and drilled in one go. It now runs as three, sharing the same app and lane through the describe block:

  • Seal: the mirror pass seals every object under names that hide every path.
  • Restore: a restore with the passphrase brings the forge back, and a wrong passphrase opens nothing.
  • Drill: the drill restores the newest off-site snapshot and keeps where it came from.

No assertion was removed or loosened, and I did not touch the SLOW list in scripts/gate.ts.

I left the cause alone: the test does several scrypt key derivations, about 100 ms each, plus one real restore. Making those cheaper would mean changing the production cost parameters, which I judged out of scope.

To try it: bun test ./test/offsite-lane.test.ts and bun test ./test/offsite-lane.test.ts --rerun-each 10. The first passes here, 14 tests and 0 failures; I did not run the --rerun-each 10 form. bun x tsc --noEmit and bun scripts/gate.ts printed nothing (I did not check exit codes).

Approved

Test-only split of one slow end-to-end test into three (seal, restore, drill) sharing describe-level state. No assertion removed, no production code, no security surface touched. The tests are order-dependent by design, which is acceptable inside one describe. Note: per-test times were not measured, so if the seal test still exceeds the 2 s budget, the budget check will say so.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs