Filed unassigned, observation-class, while implementing #8698 (PR #8899). Not routed or graded by me.
What was measured
In scripts/check-cross-package-test-inputs.mjs, unionInto() (Layer A — the turbo ls --affected union that runs on the CI PR path) calls findEscapingPackages()inside its per-declaration loop:
for(const[name,{ globs }]ofObject.entries(CROSS_PACKAGE_TEST_INPUTS)){if(present.has(name))continue;consthit=changed.find((f)=>matchesAny(f,globs));if(!hit)continue;constdir=[...findEscapingPackages()].find(([n])=>n===name)?.[1]?.dir;findEscapingPackages() walks packages/, apps/ and examples/ in full, reads every*.test.* file it finds (2321 of them at the time of measurement) and runs the escape detector over each one. It takes no arguments and its result does not vary between iterations, so every call after the first recomputes an identical answer.
The loop runs it once per declaration whose globs the diff touched. A diff touching several declared radii therefore repeats the entire repo walk several times over.
Why it matters, and why it is only a finding
It is pure wasted work on the PR path, not a correctness bug — the answer is the same every time, so nothing is measured wrong and no gate verdict changes. --verify and --list-escapes each call it exactly once and are unaffected.
Two things make it worth recording rather than ignoring:
Not fixed in #8899: that PR's subject is the detector's recognised spellings, and this is a call-site shape in a different function with a different verification surface (Layer A's union output rather than the detector's flag set). Filed here instead so the change can be judged on its own.
Refs
scripts/check-cross-package-test-inputs.mjs (unionInto, findEscapingPackages) · #8698 / PR #8899 (where this was noticed) · the gate's own #7802 rationale
Generated by Claude Code
Filed unassigned, observation-class, while implementing #8698 (PR #8899). Not routed or graded by me.
What was measured
In
scripts/check-cross-package-test-inputs.mjs,unionInto()(Layer A — theturbo ls --affectedunion that runs on the CI PR path) callsfindEscapingPackages()inside its per-declaration loop:findEscapingPackages()walkspackages/,apps/andexamples/in full, reads every*.test.*file it finds (2321 of them at the time of measurement) and runs the escape detector over each one. It takes no arguments and its result does not vary between iterations, so every call after the first recomputes an identical answer.The loop runs it once per declaration whose globs the diff touched. A diff touching several declared radii therefore repeats the entire repo walk several times over.
Why it matters, and why it is only a finding
It is pure wasted work on the PR path, not a correctness bug — the answer is the same every time, so nothing is measured wrong and no gate verdict changes.
--verifyand--list-escapeseach call it exactly once and are unaffected.Two things make it worth recording rather than ignoring:
min(declarations whose globs the diff hit, declarations), and PR fix(devx): check:cross-package-test-inputs sees the new URL, argument-position and climb-and-descend path spellings #8899 raises the declaration count from 9 to 12 — so the ceiling moves up as a side effect of unrelated work, silently.name → dirmap before iterating), with no behaviour change to observe, so it is cheap to get wrong-free.Not fixed in #8899: that PR's subject is the detector's recognised spellings, and this is a call-site shape in a different function with a different verification surface (Layer A's union output rather than the detector's flag set). Filed here instead so the change can be judged on its own.
Refs
scripts/check-cross-package-test-inputs.mjs(unionInto,findEscapingPackages) · #8698 / PR #8899 (where this was noticed) · the gate's own #7802 rationaleGenerated by Claude Code