Skip to content

Commit ff23fae

Browse files
committed
fix(ci): reconstruct the paths cross-package tests really read, instead of trusting quoted prose
`check-cross-package-test-inputs` lets a declared radius be NARROW, and says in its own prose why that is safe: a glob is only allowed to be narrow while it still covers every path the tests actually name. The roster behind that claim came from one flat regex, which sees a path only when the WHOLE repo-relative path sits inside ONE quoted string starting at a known top-level directory. Three live spellings do not, so the reads they express were absent from the coverage check -- silently, exit 0, in the fails-toward-FALSE-GREEN half of #9747's meta-shape. Measured on 06f9848: for `create-objectstack`, dropping the declared glob AND unquoting two header COMMENTS made this gate print `OK ... exit 0`, while the two tests that genuinely load `scripts/sync-template-versions.mjs` went on loading it. Prose held the radius. The fix is a reconstruction, not a wider regex. `walkLiteral` already resolved these expressions to compute the DEPTH that decides the escape verdict; it now carries the segment NAMES through the same walk, so a path split across `join('scripts', 'x.mjs')` arguments and an ascent-relative `new URL('../../../scripts/x.mjs', import.meta.url)` both come out as the repo-relative string an author would have quoted. No parser, no dependency -- the gate stays un-mutable in CI. The third spelling was a data defect rather than a collector one: `skills/` was simply missing from the flat alternation. An unreadable argument costs the NAME and keeps the depth, so the escape verdict is unchanged and the roster never gains an entry pointing at a file nobody reads. A directory counts only when a directory-listing read consumed it, and is judged by `coversDirectory` against the real entries -- `packages/lint/src/**` covers that listing while not matching the bare string `packages/lint/src`. Measured: +8 (package, path) pairs, 0 lost, 6 packages gaining. Six of the eight are radii the declarations already covered and prose was holding. Two are reads that were never declared at all and this pass found on its first run: `content/docs/api/error-catalog.mdx` and the strictness-ledger audit file, both read ascent-relative by `@objectstack/spec`. Their globs and the matching turbo.json inputs are added here; no declaration was narrowed. `--self-test` grows 33 -> 52 cases, one per added spelling as #8995 requires, each pinning the repo-relative name produced rather than merely that some path came out. Refs #9763 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja
1 parent 06f9848 commit ff23fae

2 files changed

Lines changed: 416 additions & 62 deletions

File tree

0 commit comments

Comments
 (0)