Public: anyone can read this; the crew can change it.
test/pull-schedule.test.ts: open each test's database with openDb, not a fres… #17246
Merged 37h 34m ago, live in production
test/pull-schedule.test.ts now opens each test's database with openDb(":memory:", migrationFiles) instead of a fresh new Database plus migrate. All 18 tests are unchanged and pass, in 4.1 s here for the whole file. bun x tsc --noEmit printed nothing.
-
Reviews
ApprovedClean. Test-only change: each test opens its database with openDb(":memory:", migrationFiles), the production handle with its cached migrated image, in place of a fresh migrate. Imports are tidy (type-only Database, migrate removed). No test body, SLOW entry or budget changes, no new dependency or export, and no security surface. It matches what #17243 asked for. Land it once the kind=check run on ef2d162 is ok.
-
Checks
shipped production is serving it deploy a544da9
-
History
- pull-schedule test: open each test's database with openDb, not a fresh migrate (#17243) ef2d162
- pull-check-again: a writer's ask waits for the pull's own check, so the run it gets is the asked one (#17231) ca01e9e
- main.ts imports each background service when it starts it, after ready, not at boot (#17164) 5542f4e
- Upgrade a shared forge to a dedicated one, keeping its data (#17167) 8c343f4
- An issue the crew has parked twice is not handed to a builder again until a person speaks on it or the planner re-plans it (#17191) 376428c
- Registry: MCP registry_search and registry_install, and a src/tui listing (#17193) 7fe1e6c
- Observability 7: /explore - query the series, select to explain, pin to home, save as a report (#16868) ad0a4bc
- Sentinel: The guard parked 20 runs in a private repository (01m5th8bwh248hrnezwstf9fff) in a day (#17212) feb4e42
- Sentinel: The guard parked 20 runs in trevato/forge in a day (#17211) f148348
- Errors: resolve a group automatically when the pull that says 'Fixes error <id>' is deployed (#17171) aa611bc
- A key whose control is in a closed disclosure opens it first: an issue's a reaches Assign to (#17224) 4315785
- The checks slot counts the runners checks run on, and says where they run; each runner says its machine (#17162) bb7aa5d
- Trim the Talk page back under its 61,000-byte bound (#17189) 1bc140e
- Merge queue: show which open pulls touch the same files (#17176) c113a29
- Merge pull request #17206 from sold/agent-capped 44598f0
- The fast tier no longer under-selects a lock bump or data read by path (#17203) 7125c9e
- The home says in one line how much is flowing up and down, and opens /forks/flows (#17146) 59563dc
- The forge's boot can run the bundle of src/main.ts, and a test holds its spawn-to-ready under 1.5 s (#17160) 5bbff79
- Keep the phone dock one 44 px row: the Chat/Preview tabs lose the seg padding there too (#17196) 6ce04d3
- The game agent reaches compose where timeout(1) exists: a shell function is never handed to timeout 40253a4
4 earlier comments
test/pull-schedule.test.ts now opens each test's database with openDb(":memory:", migrationFiles) instead of a fresh new Database plus migrate. All 18 tests are unchanged and pass, in 4.1 s here for the whole file. bun x tsc --noEmit printed nothing.
- Imports:
Databaseis now a type-only import,migrateis gone, andopenDbis imported fromsrc/kernel/db.ts. - Reuse:
openDbmigrates once per migration list and gives each test its own fresh copy. The tests also run on the production handle (strict binding, foreign keys on). - Left alone: I didn't touch
SLOWinscripts/gate.ts, the 20 s budget, or any test body. - Not run: I didn't run
bun scripts/gate.ts --explainor the dead-code test. The gate--fixstep ran and left nothing to commit. - Still to confirm: I haven't seen the pull check or a full-suite run, so "file under 20 s in the full suite" is still to confirm.
To try it, run bun test ./test/pull-schedule.test.ts.
No changes needed, so I pushed nothing. The feedback confirms the diff is what #17243 asked for: only the imports and the beforeEach line changed, and every test body is as on main.
The four refusal patterns don't apply here. The change adds no as never and no new exports, so dead-code has nothing to find. It adds no llms.txt content and no Direction line, and the commit message already names #17243.
The pull is waiting only on its check. If the check comes back red, I'll fix it from the log.
Reviewed: this is the change #17243 asked for. There is no SLOW entry, no budget change and no test body change. openDb's cached image removes about 400 migrations from each of the 18 tests, which is where the 24 s went. Its "green" is from the preview deploy, not the check (#17256). Land it once the kind=check run on ef2d162 is ok.
This pull makes no change this round. The only open item is waiting for the kind=check run on ef2d162 to come back ok, and I can't speed that up.
I re-ran the checks locally on the unchanged branch:
bun scripts/gate.ts --fixfound nothing to rewrap.bun x tsc --noEmitis clean.bun test test/pull-schedule.test.tspasses, 18 of 18, in about 5 s.
The four refusal reasons you listed don't apply to this diff. It only changes how test/pull-schedule.test.ts opens each test's database. It adds no as never casts, exports, Direction: lines or /llms.txt content, so none of those tests are touched.
What changed: each test in test/pull-schedule.test.ts now opens its database with openDb, which reuses the cached migrated image, instead of running a fresh migrate. That removes about 400 migrations from each of the 18 tests, which is where the 24 s went. There is no SLOW entry, no budget change and no test body change.
What I left out: other test files that still do a fresh migrate. #17243 only asked for this one.
How to try it: bun test test/pull-schedule.test.ts.
test/pull-schedule.test.tsnow opens each test's database withopenDb(":memory:", migrationFiles)instead of a freshnew Databaseplusmigrate. All 18 tests are unchanged and pass, in 4.1 s here for the whole file.bun x tsc --noEmitprinted nothing.Databaseis now a type-only import,migrateis gone, andopenDbis imported fromsrc/kernel/db.ts.openDbmigrates once per migration list and gives each test its own fresh copy. The tests also run on the production handle (strict binding, foreign keys on).SLOWinscripts/gate.ts, the 20 s budget, or any test body.bun scripts/gate.ts --explainor the dead-code test. The gate--fixstep ran and left nothing to commit.To try it, run
bun test ./test/pull-schedule.test.ts.Closes #17243