Evidence and scope
Follow-up to #416/#854. Source b6608b1 / native SHA25668c6ed517f9125ae1b570ff2e585c5b368745389af828258f6621fe5e6e0311c now has direct native samples, not a relinked diagnostic image. All31 complete native admissions pass. Validated object/native layout maps only explicit raw PCs; no invented per-function counts from collapsed main labels. moduleNamespaceTypeForLocalImport offsets188/200 in both windows correspond to the original root-statement decrement/import-kind loop. Function signature scans also appear, but are a separate prospective change. This is source-level repeated-work evidence, not a CPU-share, benchmark gain or universal leadership claim. Exact-native profile archive (73checksums) SHA2560f0fb7ebcbf75e736903fd8cc8952cae9414af218289fea157f4523cdd051d60; publication pending.
The unchanged helper scans every physical root statement to find the first eligible namespace-import or require-assignment default binding by local identifier name, then performs live CommonJS/interoperability/Program/namespace type lowering. Repeated misses also scan the entire root.
Proposed implementation
Complete ordered syntax candidates keyed by physical root and interned local name, built on demand including natural absence. Preserve namespace-binding precedence, direct import-only selection (no invented export unwrapping), all original statement ordering and malformed/non-identifier handling. Group namespace/default binding candidates without caching mutable types or require eligibility; apply the existing require predicate live to matching default candidates, continue past ineligible defaults, and retain first eligible binding even when lowering returns null. No new virtual-section/visibility/prior-position filter, raw-source filename/library/benchmark shortcut, semantic cap, skipped bodies/diagnostics, or general local-declaration-index coupling. Source replacement and actual HIR growth invalidate facts. Every construction allocation failure releases partial ownership and keeps complete original scalar lookup; failed-revision behavior and already complete roots must be explicit.
Required gates and acceptance
Full scalar/node/name equivalence controls for duplicates, precedence, nested/multiple roots, type-only/direct exports, recovery order, virtual sections, live eligibility/null lowering, source replacement and real HIR growth; every forced-growth allocation failure and retry/cleanup behavior; complete diagnostic parity with scalar fallback. All checker/Program/driver/CLI/entrypoint suites, standalone native build,136 harness tests, complete unchanged pinned Zod primary diagnostic comparison. Freeze exact current-main parent, native images, patch, inputs and protocol before timing. Complete original positive/negative admission before every phase, including all15 checked-JS first/middle/last errors. Official checked-JS/512/8192 screens and independent confirmations, all20 family screens, all five large batches, independent adverse-median/negative-interval rechecks plus carried checkjs_jsdoc/deep_types/recursive_generics/type_predicates_large/reexport_graph, and independent30-pair class/interface checks. Retain every sample/attempt. Require supported target gain and reject a confirmed independent regression; no repeat-to-pass or layout tuning. Publish accepted or rejected raw checksum evidence, detailed docs and brief README table/link in small issue-linked Chris-only conventional origin/main commits, without coauthors. No implementation is pushed until those gates are met; local implementation and verification come first.
Whole goal remains incomplete: latest five-compiler snapshot Home1/20 leads,12/20 versus native TS7; Zod195TS+3HM9002 unadmitted; canonical C++ and other-platform coverage unresolved. Preserve concurrent runtime main work and verify the exact baseline before implementation.