Filed while implementing #13902 (its A2.3 instruction: report same-shaped live-DDL tests
outside the card's scoping before folding any in). Unassigned: recording only.
#13902 scoped itself to it(...) blocks nested in a declareDialectCell(...) callback, and
that scoping was right for what it fixed. Two adjacent populations in the same package do the
same live connect/DDL work on vitest's inherited 5000ms default and fall outside it. Both were
found structurally (TypeScript AST over packages/drivers/driver-sql/src/*.test.ts), and the
instrument carries a firing control: the same walk returns the 2 budgets that landed on
sql-driver-13056-orphan-shadow-column-cleanup.test.ts, so a zero elsewhere is a reading
rather than a broken expression.
Population A — live-DDL it() outside declareDialectCell(...)
Four it(...) blocks construct a driver against a live Postgres cell and carry no explicit
budget. Classified by reading each new SqlDriver(...) argument rather than by inferring from
the enclosing file:
| Location | Gate | Driver config |
|---|
live-dialect-matrix.isolation.test.ts:281 | it.skipIf(!PG_CELL.available) | PG_CELL.config() |
live-dialect-matrix.isolation.test.ts:314 | it.skipIf(!PG_CELL.available) | PG_CELL.config() |
sql-driver-autonumber-cold-race.test.ts:159 | it.skipIf(!pgCell.available) | pgCell.config() |
sql-driver-json-binding-without-ddl.test.ts:173 | it | { ...PG_CELL.config(), schemaMode: 'validate-only' } |
The first two also call initObjects(...), so they are the full connect/DDL/read-back shape
#13688 measured. The other 42 outside-cell it()s that construct a driver are embedded SQLite
(dialectCell('sqlite').config() or a better-sqlite3 :memory: literal) and are correctly on
the fast default — they are not part of this.
Population B — unbudgeted beforeAll hooks doing live connect + DDL + writes
sql-driver-backend-fault-envelope.test.ts has two beforeAll hooks that each open a live
driver, run initObjects(...), and insert rows:
:160 — new SqlDriver(cell.config()), two drop table if exists, initObjects(...), 2 creates:343 — new SqlDriver(cell.config()), drop table if exists, initObjects(...), 1 create
Neither carries a budget, so both inherit the 5000ms default for work that is strictly heavier
than the it()s they feed. #13902 correctly excluded this file's two it() blocks (they only
query an already-open connection), but excluding the it()s left the file's real live cost
unbudgeted — the cost simply lives in the hook.
The package already answers this shape elsewhere: sql-driver-diagnostic-value-probe.test.ts:335
carries }, 60_000) on exactly this kind of beforeAll. Measured across the package, 5 of the
6 hook-level budgets are 60_000.
Why this is a separate card rather than a rider
Different unit of change (a hook budget, and a population outside the card's wrapper), and the
two interact: whether Population B wants hook budgets or something else affects the cost-model
argument #13902 used to exclude those files' it() blocks. Folding either into #13902's PR
would have been the silent package-wide creep that card's own dispatch order ruled out.
Related
Generated by Claude Code
Filed while implementing #13902 (its A2.3 instruction: report same-shaped live-DDL tests
outside the card's scoping before folding any in). Unassigned: recording only.
#13902 scoped itself to
it(...)blocks nested in adeclareDialectCell(...)callback, andthat scoping was right for what it fixed. Two adjacent populations in the same package do the
same live connect/DDL work on vitest's inherited 5000ms default and fall outside it. Both were
found structurally (TypeScript AST over
packages/drivers/driver-sql/src/*.test.ts), and theinstrument carries a firing control: the same walk returns the 2 budgets that landed on
sql-driver-13056-orphan-shadow-column-cleanup.test.ts, so a zero elsewhere is a readingrather than a broken expression.
Population A — live-DDL
it()outsidedeclareDialectCell(...)Four
it(...)blocks construct a driver against a live Postgres cell and carry no explicitbudget. Classified by reading each
new SqlDriver(...)argument rather than by inferring fromthe enclosing file:
live-dialect-matrix.isolation.test.ts:281it.skipIf(!PG_CELL.available)PG_CELL.config()live-dialect-matrix.isolation.test.ts:314it.skipIf(!PG_CELL.available)PG_CELL.config()sql-driver-autonumber-cold-race.test.ts:159it.skipIf(!pgCell.available)pgCell.config()sql-driver-json-binding-without-ddl.test.ts:173it{ ...PG_CELL.config(), schemaMode: 'validate-only' }The first two also call
initObjects(...), so they are the full connect/DDL/read-back shape#13688 measured. The other 42 outside-cell
it()s that construct a driver are embedded SQLite(
dialectCell('sqlite').config()or abetter-sqlite3 :memory:literal) and are correctly onthe fast default — they are not part of this.
Population B — unbudgeted
beforeAllhooks doing live connect + DDL + writessql-driver-backend-fault-envelope.test.tshas twobeforeAllhooks that each open a livedriver, run
initObjects(...), and insert rows::160—new SqlDriver(cell.config()), twodrop table if exists,initObjects(...), 2 creates:343—new SqlDriver(cell.config()),drop table if exists,initObjects(...), 1 createNeither carries a budget, so both inherit the 5000ms default for work that is strictly heavier
than the
it()s they feed. #13902 correctly excluded this file's twoit()blocks (they onlyquery an already-open connection), but excluding the
it()s left the file's real live costunbudgeted — the cost simply lives in the hook.
The package already answers this shape elsewhere:
sql-driver-diagnostic-value-probe.test.ts:335carries
}, 60_000)on exactly this kind ofbeforeAll. Measured across the package, 5 of the6 hook-level budgets are
60_000.Why this is a separate card rather than a rider
Different unit of change (a hook budget, and a population outside the card's wrapper), and the
two interact: whether Population B wants hook budgets or something else affects the cost-model
argument #13902 used to exclude those files'
it()blocks. Folding either into #13902's PRwould have been the silent package-wide creep that card's own dispatch order ruled out.
Related
it()blocks.Temporal Conformancereddens unrelated PRs #13688 — the one measured instance of the defect shape (timeout, not assertion; no MySQLerror in the logs).
Generated by Claude Code