Uh oh!
There was an error while loading. Please reload this page.
fix(tests): give two default-vitest-timeout cases real margin - #9368
Merged
Conversation
- packages/types/src/node.test.ts: explicit 30s testTimeout on the one case that performs a real dynamic import() of @objectstack/spec (measured ~0.9-1.1s unloaded here, previously observed failing at 5061ms against the 5000ms default under modest concurrency). Every sub-10ms sibling in the same describe block is untouched. - packages/qa/dogfood/test/semantic-roles.dogfood.test.ts: explicit 180s hookTimeout on the beforeAll that boots the full showcase stack via @objectstack/verify's bootStack (measured 18.3s vitest Duration / 19.5s wall clock here for the whole file; the card's own isolated measurement was ~27s, and the observed failure was 10027ms against the 10000ms default). 180_000ms matches this package's existing house pattern for the identical bootStack(showcaseStack, ...) call in admin-identity-audit-trail.dogfood.test.ts. No behaviour change; both suites already pass. This is margin repair for load flakes, not a product fix. turbo.json concurrency stays out of scope. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012WKSnqAaoqtW3QX7SSf1Vk
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. |
os-zhuang
marked this pull request as ready for review
August 17, 2026 17:31
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#9311
What
Two explicit timeouts, exactly the scope the card's triage comment fenced:
packages/types/src/node.test.ts:178—"falls back to the importing package's own resolution when the host does not declare"gets an explicit 30stestTimeout. It is the only case in itsdescribeblock that performs a real dynamicimport()of@objectstack/spec(a multi-megabyte package); every sibling resolves a small on-disk fixture or fails fast, all under 10ms — checked directly, not assumed. Measured on this box: ~0.9-1.1s unloaded across 3 isolated runs. The card's own isolation runs already showed it failing at 5061ms against the 5000ms default under nothing heavier thanturbo run test --concurrency=2, so 30s (matching the repo's#3662precedent for subprocess/real-load cases) gives real headroom without masking a genuine hang.packages/qa/dogfood/test/semantic-roles.dogfood.test.ts:52— thebeforeAllthat boots the full showcase stack (ObjectQL + ~45 plugins) through@objectstack/verify'sbootStackgets an explicit 180shookTimeout. This file's own isolated run here measured 18.3s (vitestDuration) / 19.5s wall clock for the whole file (boot dominates; the 5 tests themselves run in ~3.5s) — in the same range as the card's own ~27s unloaded measurement. The previously observed failure was 10027ms against the 10000ms default, essentially zero margin even idle. 180_000ms follows this package's own existing house pattern for the identicalbootStack(showcaseStack, …)call —admin-identity-audit-trail.dogfood.test.ts'sbeforeAll(…, 180_000)— rather than inventing a new number.No sibling dogfood file carries a package-level
hookTimeoutoverride (vitest.config.tssets none), so the per-hook precedent above is the house pattern being followed.Why this and not
turbo.jsonconcurrencyBoth cases pass in isolation and the repo's full suite is confirmed green at
--concurrency=2 --continue(comment on #9311). The margin was never sized for the work these two cases actually do (a real package import; a 45-plugin stack boot) — that is the "budget never sized for the work" case the dispatch explicitly distinguished from "hides work that got slower." Neither timeout changes behaviour; both suites already pass today.turbo.json's default concurrency is out of scope per the card's own filing (a maintainer-level default) and is not touched here.Verification
packages/types:tsc --noEmitclean;vitest run— 348/348 tests pass, matching the card's own suite-size measurement.packages/qa/dogfood:tsc --noEmitclean; the changed file alone —vitest run test/semantic-roles.dogfood.test.ts— 5/5 pass, run 3× for timing consistency (Duration 18.26s / 19.5s wall clock).dc151fd0(all exit 0):check:test-source-alias,check:type-source-resolution,check:query-options-erasure,check:engine-double-contract,check:where-matcher,check:cross-package-test-inputs,check:slot-lookup,check:nul-bytes,check:type-check-coverage, and thepackages/specliveness family (check:empty-state,check:liveness,check:strictness-ledger,check:variant-docs), plusscripts/docs-audit/check-affected-docs.mjs.check:type-check-debt(the re-measure half) could not complete locally — it needs the full 78-package workspace closure built (pnpm exec turbo run build --filter='./packages/*' --filter='./packages/*/*') and this worktree hit a missing@objectstack/service-knowledgedist partway through an unrelated package's dependency chain. Neither@objectstack/typesnor@objectstack/dogfoodappears in theDEBT/TEST_DEBTledgers inscripts/check-type-check-coverage.mjs(grepped directly), so this diff — test-file-only, no new imports, no new test files — cannot move that ratchet; CI's own build will run it in a clean environment.@objectstack/dogfoodpackage suite (~780 tests across ~100 stack-booting files) locally — a real attempt ran past 8+ minutes without finishing under--maxWorkers=2on this shared, multi-agent-contended box, and continuing would hold the container-wide heavy-verification lock for an extended period at every other parallel agent's expense for a change with zero behavioural surface. The specific changed file was verified directly (above); CI runs the full suite in its own environment.Generated by Claude Code