Uh oh!
There was an error while loading. Please reload this page.
test(driver-sql): budget the #13056 live-MySQL orphan-shadow tests - #13908
Merged
Conversation
…13688) Both it() blocks in sql-driver-13056-orphan-shadow-column-cleanup.test.ts drive 2-3 full new SqlDriver() -> initObjects() -> disconnect() cycles against the live MySQL cell with no explicit timeout, so they inherited vitest's 5000ms default. Both observed CI failures were timeouts (no MySQL error in the logs), and four sibling files in this package already carry explicit per-test budgets. Give both an explicit 60_000 budget, in line with 3 of the 4 siblings, with a one-line comment naming why. No production code, assertion, or control changed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F3jdziLbAPGeceVNmSox5L
Contributor
📓 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): |
zhuangjianguo
marked this pull request as ready for review
August 31, 2026 17:03
zhuangjianguo
enabled auto-merge
August 31, 2026 17:03
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#13688
The defect
Temporal Conformance (live PG + MySQL)reddens unrelated PRs — it surfaced on#13685, whose entire diff is
packages/plugins/plugin-auth/**+ a changeset + onedocs page, touching no driver, no SQL, no schema-sync path.
The two
it(...)blocks insql-driver-13056-orphan-shadow-column-cleanup.test.tsthat read the live MySQLcatalog each drive 2-3 full
new SqlDriver(...)->initObjects(...)->disconnect()cycles against the live container, with no explicit timeout, so theyinherited vitest's 5000ms default. Both observed failures are timeouts, not
assertion failures, and the service-container logs show no MySQL error — the DDL
that ran succeeded. This is not "raise a timeout to make a slow test pass": the
5000ms was never a chosen budget for 2-3 live connect/DDL/disconnect cycles plus
several
information_schemareads — it's what a test gets by default when nobodysets one. Four sibling files in this same package already carry explicit per-test
budgets (
60_000/120_000/40_000/60_000); this file shipped with #13056'sfix without one.
The cost of this defect is not local — it reddens other people's PRs on a
package they never touched, so every timeout here is a repo-wide throughput tax
(ejected merge-queue attempts, wasted CI minutes), not a local annoyance. See #13767,
the automated queue-flake anchor for this exact file, ejected twice in 24h.
The fix
Both
it(...)blocks get an explicit60_000budget — in line with 3 of the 4sibling budgets in this package — with a one-line comment naming why (N live
round trips against MySQL), so the next reader does not delete it as noise.
git diffonpackages/drivers/driver-sql/src/*.tsexcluding this one test file isempty — no production code, no assertion, and no control changed.
A2.1 — the acceptance control (actual cost against live MySQL)
NOT MEASURED. No live MySQL/PG container is reachable in this environment (the
Docker daemon is not running here —
docker infofails withno such file or directoryon the socket; noOS_TEST_MYSQL_URL/OS_TEST_POSTGRES_URLset; nomysql/service listening on 3306/5432). Leaning on the structural argument instead:timeout (not an assertion failure), no MySQL error in the logs, and four sibling
files in the same package already carrying comparable budgets for a comparable
number of live round trips.
A2.2 — sweep for the same shape elsewhere
Confirmed: only these two
it(...)blocks in this file lacked a budget (bothnow fixed). A package-wide sweep for the same shape (any
it(...)nested in adeclareDialectCell(...)callback, still on vitest's inherited 5000ms default) found9 more files, 37 more
it(...)blocks with the identical gap. Per the dispatchorder's STOP condition 3 ("a package-wide re-budget is a different, larger
decision"), the fix here stays scoped to this one file; the sweep result is filed
as #13902 for a deliberate decision rather than folded into this PR.
A2.3 — no global
testTimeoutConfirmed by reading
packages/drivers/driver-sql/vitest.config.ts: notestTimeoutkey anywhere in thetestblock. The twoit(...)blocks really werefalling through to vitest's own default, not a repo-set global.
A2.4 — anchors re-located by quoted source
The card cites
sql-driver-13056-orphan-shadow-column-cleanup.test.ts:499. Re-foundboth
it(...)blocks by their quoted titles rather than trusting the line number: thefirst ("drops the orphaned generated column, and keeps the one still carrying a
constraint") is still at line 499 — no drift. The second ("converges — a second
detect finds neither the index nor an orphan column") is at line 555.
Tests
pnpm --filter @objectstack/driver-sql typecheck— PASS (exit 0), viascripts/pm/os-verify-lock.sh.pnpm --filter @objectstack/driver-sql exec vitest run --maxWorkers=2— PASS:147 passed | 9 skipped test files (156), 2252 passed | 132 skipped tests (2384).
The target file alone (
--reporter=verbose, single-file run): 12 passed | 1skipped — the whole live-MySQL
describeblock collapses to ONE named-skiptest ("is provisioned — set OS_TEST_MYSQL_URL to run this cell"), so the two
edited
it(...)blocks did not individually execute here. All non-live cellsrun against embedded SQLite and execute fully. The MySQL/PG cells this PR
touches cannot run here — no live MySQL/PG container in this environment
(see A2.1), so
declareDialectCellreports them as a named SKIP rather than asilent pass (see the file's own header comment on
OS_TEST_MYSQL_URL/OS_EXPECT_LIVE_DIALECT_MATRIX). They will run for real in theTemporal Conformance (live PG + MySQL)CI job this PR exists to stop reddening.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack,re-derived at HEAD
fcc9ce8034aftergit fetch origin main): 26 relevantfamilies (22 path-matched + 4 more from the "edits a test file" convention
trigger) — 23 PASS, 3 NOT MEASURED:
check:dual-build-cjs-loads,check:type-check-debt— need the FULLworkspace built (
pnpm build/turbo run buildacross all 78 packages),which is CI's own "Build Core" / debt-ledger scope, not warranted locally
for a one-file test-only diff (driver-sql's own dependency closure was
built and its
tsc --noEmitpasses clean).check:test-completeness— by its own design, exitsPREREQUISITE NOT METwithout a saved
turbo run testlog; CI tees that log and passes it, thisbranch is unreachable there.
None of the 23 that ran flagged anything in this diff. The dispatch-gates
derivation itself carried a STALE-TREE warning (its own defining scripts had
moved on
origin/mainby the time of the final re-run, in a repo with severalother agents landing PRs concurrently) — re-running after
git fetch origin mainreproduced the identical 22-family path-matched list, so nothing wasmissed by the staleness.
No ablation
No ablation is meaningful here — there is no behaviour to neuter. The change is a
test-timing budget, not logic; there is nothing for a mutation to disprove that a
rebuild-and-rerun would show.
Changeset
skip-changeset— this PR's entire diff is one test file (a timeout budget +explanatory comments); it publishes nothing from any package.
Generated by Claude Code