test(driver-sql): give the seven unconditionally-live hooks an explicit 60_000 budget - #14629
test(driver-sql): give the seven unconditionally-live hooks an explicit 60_000 budget#14629os-musk wants to merge 2 commits into
Conversation
…it 60_000 budget A per-site AST walk over all 160 test files in packages/drivers/driver-sql/src (111 hooks that construct a SqlDriver) classifies each site by READING its `new SqlDriver(...)` argument rather than by filename. Seven hooks take an unconditionally live cell argument (`PG_CELL.config()` / `MYSQL_CELL.config()`, not a parametrised `cell.config()`) and carried no explicit budget. Each now takes the third argument, matching the precedent set in sql-driver-backend-fault-envelope.test.ts. A hook inherits `hookTimeout`, NOT `testTimeout`. This package's config sets neither, so both are vitest's own defaults: an unbudgeted hook dies at 10000ms, not at the 5000ms an unbudgeted it() gets. The comments at each site record that measured figure. No existing prose needed correcting: the only "5000ms" mention already in these four files describes an it() site, where 5000ms is the correct number. The `declareDialectCell(...)` hook population is deliberately untouched: those take a parametrised `cell.config()` and budgeting them trades against keeping the sqlite path fast. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
…iver-sql-live-hook-budgets
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
Landing provenance (engine execution seat, session
The eighth site the dev found and deliberately did not fold in is #14628, unassigned for triage. Generated by Claude Code |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 33660420831 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Ejected from the merge queue at 17:45Z — not this PR's failure, and deliberately NOT re-queuedEngine execution seat (session What failed: Why it is not this PR's. This diff is four Why it is not a regression at all. The assertion is a wall-clock claim, not a behavioural one: The decisive measurement came from a sibling PR on this lane, #14649: the same test, same assertion, failed on the PR side at 17:15:22Z and then passed on a re-run of the identical head — no push, no rebase — at 17:45:27Z. A test that is red and green on a byte-identical tree is not measuring the tree. Full reading, with the three ejected diffs and the shape of a real fix, is on the queue-flake anchor #14648, comment 5513952826. Why this PR is not being re-queued. The triage comment's own checklist, item 2: once an aggregation issue exists, re-queuing before the fix only burns another full-queue round for every PR behind it. #14648 is open, What unblocks it: a fix on #14648. The option that actually closes the class is to assert the child's own exit reason instead of the absence of a signal, taking the wall clock out of the oracle; raising the cap or serialising the file both leave a timing oracle for the next load spike. That call belongs to State: PR stays open, ready, Generated by Claude Code |
Fixes #14213
Seven hooks in
packages/drivers/driver-sqlconstruct a driver against an unconditionally live cell and carried no explicit budget. Each now takes the third argument,60_000, matching the precedent landed for #14100 insql-driver-backend-fault-envelope.test.ts(PR #14212).The measured reframing this card carries
A hook does not inherit
testTimeout. It inheritshookTimeout. This package's vitest config sets neither, so both are vitest's own defaults, and the card's leg B3/B4 measured the difference: an unbudgeted hook dies at 10000ms (Hook timed out in 10000ms), not at the 5000ms an unbudgetedit()gets, and the third argument demonstrably does lift that ceiling (leg B4). Every comment added below records 10000ms as the hook figure.Verified independently here: no
testTimeoutorhookTimeoutappears inpackages/drivers/driver-sql/vitest.config.ts, and the repo has no rootvitest.config.tsfor one to be inherited from.The seven sites
Each row's argument reading comes from a per-site AST walk over the hook's own
new SqlDriver(...)argument — not a file-level grep (the card's method note; #13902's original script pre-filtered whole files that contained any budget line and hid a true positive that way). Line numbers are on this branch's head.sql-driver-datetime-mysql-storage.test.ts:78beforeEachMYSQL_CELL.config()60_000sql-driver-datetime-mysql-storage.test.ts:178beforeEachMYSQL_CELL.config()60_000sql-driver-datetime-mysql-storage.test.ts:263beforeEachMYSQL_CELL.config()60_000sql-driver-datetime-postgres-timezone.test.ts:64beforeAllPG_CELL.config()60_000sql-driver-datetime-postgres-timezone.test.ts:75beforeEachPG_CELL.config()60_000sql-driver-json-binding-without-ddl.test.ts:114beforeAllPG_CELL.config()60_000sql-driver-time-live-dialects.test.ts:167beforeEachMYSQL_CELL.config()twice (two live connections per test)60_000All are named live-cell constants, never a parametrised
cell.config(). Five of the seven arebeforeEach, so the cost is paid per test rather than once — the heaviest shape in the population.The walk, before and after
The same script, run on the tree before and after the edit:
LIVE-UNBUDGETEDgoes 7 to 0 andLIVE-BUDGETEDgoes 0 to 7, with the 104 out-of-population sites unchanged in both directions.Found, not fixed
A third scan resolving one level of helper indirection found exactly one further site package-wide, and it is not in this PR: the
beforeAllof the#3942suite insql-driver-datetime-mysql-storage.test.tsreaches a live driver through the module-levelrawDriver()one-liner rather than an inline argument, so its own argument reading is not a live cell constant. Recorded as #14628, unassigned, for the seat to decide. Folding it in silently is exactly the package-wide creep this card's lineage rules out.Prose correction: none was due
The dispatch expected "5000ms" prose at the touched sites to need correcting to 10000ms. Measured before and after: the four files contained exactly one "5000ms" mention, at
sql-driver-json-binding-without-ddl.test.tsin the note on the §3it()site landed by #14212. For anit(), 5000ms is the correct figure, and that site is not one of the seven. So nothing was corrected, and the comment added at site 6 says explicitly that the neighbouring §3 figure is right for anit()and would be wrong for a hook.Deliberately out of scope
declareDialectCell(...)hook population takes a parametrisedcell.config(), live for pg and mysql but embedded for sqlite. Budgeting those trades against keeping the sqlite path fast, which is a judgement rather than a missing argument.sql-driver.tsuntouched.Verification
Head
bec55ae54.origin/mainwas merged before opening (never rebased, never force-pushed), and the gate union below was derived and run on that head.Green:
pnpm --filter '@objectstack/driver-sql^...' build— lock VERDICTcommand-exit 0.pnpm --filter @objectstack/driver-sql exec vitest run --maxWorkers=2over the four files —Test Files 1 passed | 3 skipped (4),Tests 1 passed | 39 skipped (40).pnpm --filter @objectstack/driver-sql typecheck(tsc --noEmit) — lock VERDICTcommand-exit 0. The test layer is inside this package's tsc program:tsc --listFilesreports all four edited files, 1 occurrence each, so the green covers the edits rather than skipping past them.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands— 25 green.pnpm lint(whole repo,eslint . --no-inline-config, not narrowed) exit 0;pnpm check:nul-bytesexit 0;pnpm check:error-status-conformanceexit 0.NOT MEASURED, in each tool's own words, neither green nor red:
OS_TEST_POSTGRES_URLandOS_TEST_MYSQL_URLare unset in this container, so all three live suites skip. CI'sTemporal Conformance (live PG + MySQL)job is the authority on whether these hooks execute.node scripts/check-test-completeness.mjs— exit 3,PREREQUISITE NOT MET: it grades a savedturbo run testlog and none was named.pnpm check:dual-build-cjs-loads— exit 3,PREREQUISITE NOT MET — this gate reads built output, and some package has no dist/. It needs a whole-repo build.pnpm check:type-check-debt— exit 3,PREREQUISITE NOT MET: 49 workspace dependencies have no built type entry point, so measuring would measure a different world.Exit codes were captured after a redirect, never through a pipe.
Changeset
skip-changeset: nothing published changes. Every touched path is a*.test.ts, andpnpm check:published-filespasses with 69 publishable packages whosefileswhitelist "admits no test, test-harness config or build script".🤖 Generated with Claude Code
https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
Generated by Claude Code