Commit bfadf84
fix(devx): teach the cross-package input detector the findUp anchor seeds (#10852)
`check:cross-package-test-inputs` finds escaping tests by scanning source
text, so a seed spelling it does not know yields no flag -- which means no
declaration, silently. Every seed it knew answers "where am I?" off the
module itself. A CJS-typed package cannot ask: plugin-auth publishes
`dist/index.js` as CommonJS, so under `module: NodeNext` `import.meta` is a
TS1470 there, and four of its tests walk up from `process.cwd()` to an
anchor instead. That walk resolved to nothing, so every path built on it
resolved to nothing too.
Measured on `19f98fa1f^`: `rate-limit-storage-isolation.test.ts` read
`packages/runtime/src` and `packages/services/service-sms/src` through such
a seed, appeared in no roster, and turbo replayed a cached green over the
scan it never re-ran -- #7802 exactly, by a fourth spelling. #10161 reseeded
that one file; this closes the class it was an instance of.
`findUpSeeds()` resolves the two predicates that are knowable without
executing anything: a manifest `name` matching THIS package (-> the package
root, named) and a WORKSPACE_ROOT_MARKERS file (-> the repo root, which
escapes on its own exactly as `resolve(HERE, '../../..')` already does).
A manifest naming some OTHER package keeps the escape verdict and loses the
name, the trade `walkLiteral` already makes for an unreadable argument.
Today's findUp population is clean, so no gate turns red and none turns
newly green -- the proof is 14 `--self-test` cases, 8 of which fail without
the detector change.
Part of #10029
Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent fbcfb55 commit bfadf84
1 file changed
Lines changed: 361 additions & 26 deletions
0 commit comments