Skip to content

spec's declared test-input radius packages/**/*.json sweeps vitest's own node_modules/.vite/vitest/*/results.json, so the task that hashes it (spec#test:repo after #16466; spec#test before) can never replay from cache on a runner that ran any vitest before it #16555

Description

@claude

Filed as an out-of-scope finding from #16466's delivery (session session_019RfFHiRCSs3JXLK4cwcfox, branch claude/issue-16466-repo-conformance-task, tree 22d3581888). No assignee; the PM triage round grades it. Not caused by #16466 — that PR confines the effect from the whole spec suite to its 33s test:repo task — and not fixed by it either.

Measured

scripts/cross-package-test-inputs.mjs declares, for @objectstack/spec, per-extension globs under packages/ for the #15513 compliance-families pin (packages/**/*.ts, *.mts, *.cts, *.js, *.mjs, *.cjs, *.json, *.md, *.mdx, *.yaml, *.yml), which turbo.json hashes as $TURBO_ROOT$/packages/**/*.json and friends. A $TURBO_ROOT$ glob is resolved against the filesystem, not against git's tracked set, so it reaches into node_modules/:

  1. pnpm turbo run test:repo --filter=@objectstack/spec — cache miss, executes, writes its cache entry.
  2. pnpm exec turbo run test test:repo --dry-run=json immediately afterwards, nothing else touched: @objectstack/spec#test:repo reads MISS again.
  3. Diff of the task's inputs map between two such dry-runs: exactly ONE key changed hash — node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json (package-relative; vitest's per-run results cache, rewritten by every run). The map holds 9404 keys, so the sweep is wide: every node_modules/.vite/**/*.json under packages/** is an input of this task.

spec#test (the package-local task, $TURBO_DEFAULT$ only) reads HIT across the same experiment — the default input set is git-scoped and never sees node_modules/, which is what makes the root-scoped glob the leak.

Why it is a card

Suggested shape (owner's call)

Exclude node_modules/ from the root-scoped radius — a negated input beside the globs if turbo honours !$TURBO_ROOT$/packages/**/node_modules/** (to be measured), otherwise per-directory globs that cannot descend into node_modules — and a registry-gate rule or self-test case that a declared glob does not reach a node_modules path. The compliance pin itself already skips node_modules when it walks; the declaration is wider than the walk.

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