-
fork: QE give every embedded Postgres boot the shared budget
released this
2026-10-23 00:02:34 +00:00 | 3323 commits to local since this releaseA database-backed suite that boots its cluster inside a budget below the
shared budget does not fail honestly. The hook times out, the file's tests
never run, and the run reports a timeout instead of the defect it was
looking for.project-repositories-persistence.test.tslost its six tests
that way on a loaded node.The hole was not one file. 172 boot sites across 160 files declared a 20 s
budget, 73 more declared 30 s, and 40 more had no budget at all and
inherited the project's 30 s hook timeout. A boot needs about 32 s on a
loaded node and about 40 s on a cold, contended host, so every one of those
budgets was below the cost class.packages/dbalready publishes the
budget for this cost class,EMBEDDED_POSTGRES_TEST_TIMEOUT_MS(90 s),
documented as about 10x headroom over the clean time.Every boot site now spends that one budget on the hook or test that boots
it. A budget above the shared one is left alone: raising a boot budget
never tightens it, and a hook that does more than boot keeps its room.server/src/__tests__/embedded-postgres-boot-budget.qe.test.tsguards the
invariant. It walks every test file, finds every embedded Postgres boot,
finds the hook or test that owns the boot, and fails when that hook's
budget is below the shared one. It fails closed: a boot it cannot
attribute to a hook, and a budget it cannot read, are reported rather
than passed over. The scanner lives in
server/src/__tests__/helpers/embedded-postgres-boot-budget.tsso the
same scanner can find and fix the offending budgets.The guard found 31 more gaps the first sweep missed, all in boots reached
through a helper function rather than written inside the hook. Those are
raised too:packages/db/src/client.test.ts,
packages/db/src/backup-lib.test.ts,
packages/db/src/inbox-archive-agent-policies-migration.test.ts,
packages/db/src/issue-comment-derived-attribution-migration.test.ts,
server/src/services/native-runtime/native-session-resume.test.tsand
server/src/__tests__/heartbeat-run-event-sequencing.test.ts.No assertion is weakened, no file is deleted, and no skip is added. Test
code only, no production change.Downloads