Skip to content

[finding] core's service-resolution-discriminator pin awaits a dynamic import of the whole package index under vitest's default 5000ms timeout, and timed out once in two full-suite runs on a shared box #16497

Description

@claude

Filed as an out-of-scope observation from the #16466 measurement run (session session_019RfFHiRCSs3JXLK4cwcfox, branch claude/issue-16466-repo-conformance-task, tree a9d25d842f). No assignee; the PM triage round grades it. Sibling class: #16434 (driver-sql's live PG + MySQL matrix under the same default 5000ms).

Measured

packages/core/src/service-resolution-discriminator.contract.test.ts, case [#13905] the published increment > reaches consumers through the package entry point, and is exactly two symbols (line 227), does await import('./index.js') inside the test body. The whole @objectstack/core index is loaded on that await, so the case's wall time is the package's import graph plus whatever else the box is doing.

Two consecutive full-suite runs of packages/core (pnpm exec vitest run --maxWorkers=2, same tree, same worktree, under scripts/pm/os-verify-lock.sh while sibling agents ran unlocked work on the same cores):

  • run 1 (json reporter): 1232 passed, 0 failed
  • run 2 (default reporter): 1231 passed, 1 failed — Error: Test timed out in 5000ms. at that case; vitest's own per-case timing for it: 5036ms

The case's assertion is not the cost; the import is. The per-file reporter used for #16466 records the file's collect phase at about 1s and its run phase at about 4-5s, essentially all of it this one await.

Why it is worth a card rather than a shrug

Repro

cd packages/core
pnpm exec vitest run --maxWorkers=2 src/service-resolution-discriminator.contract.test.ts

under load (for example while a sibling turbo run build is running), and read the case's own duration in the verbose line.

Generated by Claude Code


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

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions