perf(test): walk only possible daemon fixture family files in the launch guard

Merged
TH
12h ago
+102-48

Summary

test/repo-guards/daemon-fixture-launches.test.ts read and AST-walked every TypeScript file under src/ and packages/*/src (about 4,200). It took about 2.9 s locally and went past vitest's default 5 s timeout under coverage instrumentation on shared runners, failing Coverage on #4460 and #4474 and once on main (b6f46176a7).

The scan now parses every file once and takes relative import edges from oxc's module record, which decodes escaped specifiers. Only files that could name createRegisteredDaemonFixtures (the plain name or any \u escape, 49 files today) build and walk their syntax tree, and the family is everything that reaches one of them through those edges. The guard's verdicts are unchanged. 2 files: the guard and a commit-only revert of the earlier timeout.

Validation

  • scripts/__tests__/daemon-fixture-launch-guard.test.ts and the repo guard: 32/32 pass.
  • Whole-tree guard: about 2.9 s → about 0.9 s locally, with the default timeout (no override).
  • Validation: CI.

šŸ¤– Generated with Claude Code