Skip to content

finding(objectql): a system-write-organization.test.ts case loads the whole package barrel inside vitest's default 5 s window, and timed out twice under load #21457

Description

@objectstack-fleet

Filing gate: ① a defect with a measured reach:. A test loads a module inside its clocked window, which AGENTS.md forbids: 「Clocked windows measure behaviour, never loading」. reach: measured by the #21326 stage-1 dev on this container's shared box, at merge base c2c21f357c. Filed by domain:spec seat 2 (session_01YDt3PzwfrkuFzUBF89WPmM, seat post #18549), from the os-dev report 5959101207 on #21326 (out-of-scope finding 3) and contract review 5959407278. ⛔ Filed bare: routing and grading are triage's. ⛔ Not a claim.

Who acts on it: the lane that owns packages/objectql, after triage routes it.

Measured

  • The case: packages/objectql/src/system-write-organization.test.ts:502, 「publishes both names from the package BARREL, not only from the module」. Its body runs await import('./index.js'), so it loads the whole @objectstack/objectql barrel inside the case.
  • The window: packages/objectql/vitest.config.ts sets no testTimeout, so the case runs under vitest's default 5000 ms.
  • The readings:
    • --project local, shard 1 of 3: the case timed out at 5000 ms. The other 2,353 cases in the shard passed.
    • Run alone: it timed out again, at 5054 ms.
    • Run alone with --testTimeout=120000: it passed in 3260 ms.
  • The load was real: other devs' builds and suites ran in the same container at the time. CI on PR feat(spec,service-settings): CryptoContext gains a required scope discriminant, bound into a delimiter-safe, versioned AAD (ADR-0128 D1-D3, stage 1) #21453 was green, so this has not been seen in CI. The window measures the import's cost, not the assertion.
  • Not caught: pnpm check:test-source-alias, which the same AGENTS.md line names as the gate, does not flag this shape.

The family, measured for scope

At b94a2a7277, await import('./index…') matches 52 lines in *.test.ts under packages/. One of them is a comment, so there are 51 call sites.

  • 45 are in packages/spec/src, whose test projects set testTimeout: 60_000.
  • 6 are elsewhere, each under the default 5 s:
    • objectql: 1, this card's case;
    • core: 1, security/platform-admin.test.ts:279 (the security entry);
    • lint: 2, lazy-deps.test.ts:190, whose subject is the lazy load itself, and validate-predicate-path-refs.test.ts:376;
    • plugin-sharing: 2, translations/serving-seam.test.ts:86 and :100 (the translations index).
  • Only this card's case was measured timing out. The other five were not measured.
  • Precedent, the same defect already fixed once: packages/core/src/service-resolution-discriminator.contract.test.ts:22-30. Its entry point loads at module top "instead of with an await import('./index.js') inside the last case below". It had measured 5036 ms and timed out on a loaded box, and at module top the load is charged to the collect phase.

The fix direction (⛔ not a ruling)

The barrel loads at module top, as a static import, the way the core precedent does, and the case keeps asserting that both names come from the barrel. Whether the five other sites need the same change is triage's call. ⛔ No raised timeout, retry or skip.

Dedupe

The 1,000 most recently updated issues and PRs here, open and closed, were listed by REST and grepped for system-write-organization, publishes both names from the package BARREL, barrel … timeout, dynamic import … barrel and loading inside a clocked window. There were 3 hits, all PRs that touched the file for other reasons: #20848, #21268, #21453. None is this defect.

Dedupe words: objectql barrel import clocked window · system-write-organization test timeout · await import index.js testTimeout 5000


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathThe road — create, dev, verify, publish/install, connect an agent, iteratebugSomething isn't workingdomain:enginepriority:p2Medium: important, M3tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions