Current evidence
Under #416/#848, a diagnostic-only native profile of clean source 30ab18c after the accepted CommonJS path and require indexes shows repeated Program.fileReferencesGlobalName scans and importProgramGlobals dominating worker samples on the unchanged 4096-family CommonJS generator. The re-export scale profile instead emphasizes resolver/export-name queries, so the scopes are distinct. The linked diagnostic image has identical instruction-section bytes, passed all 56 official admissions with the frozen timing binary, and is never used for timings.
Proposed scope
Build complete per-pass per-file reference-presence facts once from retained HIR and reuse them across global-owner eligibility queries. Preserve the exact existing value/type/namespace distinction, declaration-name and property-key exclusions, globalThis member references, implicit declaration-owner environment, local conflicts/merges, and source replacement behavior. No dropped owners or foreign TypeIds, depth limits, benchmark recognition, or partial OOM answers. Allocation failure must retain the complete scanner behavior.
Acceptance
- Compare indexed presence with the existing scanner over every relevant key/space and syntactic role, including nested scopes and globalThis; retain allocation-failure and source-update controls.
- Complete Program/checker/driver/CLI gates and unchanged pinned Zod diagnostic identities.
- Frozen exact-parent A/B on official CommonJS and generated scales, with all admissions, warmups, alternating order, raw observations, complete family screen and independent adverse-family rechecks retained.
- Publish accepted or rejected outcomes, checksums, detailed docs and a brief README table; no new ranking without a fully admitted competitor matrix.