ReviewOS

home-lang/home

fix(ts): retain export ownership for trailing comma declarations

#538
Closed chris opened this 8 days ago ·
8 days ago

Found while adding ownership regressions for export-query indexing #537, under tracker #416. Valid TypeScript export const first = 1, second = 2 currently lowers to an export wrapper for first followed by a bare root const_decl for second. second has no export declaration in its ancestor chain; both the old scan-based and new indexed origin resolver therefore cannot prove it is exported. This is a parser ownership defect, not a reason to infer exports from source text in the query.

Preserve export wrappers for every declarator from the same exported variable statement, including declaration-only forms, while leaving following unexported statements untouched. Add parser-shape and bound-origin regressions, verify standard TypeScript consumers and full parser/checker/conformance regressions. Keep the failing case; do not weaken the indexed-query test or add a name/source-string workaround.

8 days ago

Calibrated audit d0af25a is pushed: 96 controls across const/let/var/declare-var, named/namespace and two-hop barrel imports, both root orders; each positive has appended wrong-type and hidden-binding negatives. TS6.0.3 and native TS7.0.2 pass96/96; frozen Home de8fe28 fails96/96 because the trailing declarator is not exported. Evidence export-index.NVcIdu/export-lists-before.log. The parser ownership fix passes891 parser tests; combined indexed-query/ownership Program tests137/137 pass, including nested destructuring and following hidden declarations. Final Release and full checker/conformance verification are running after resolving a test-cache disk-space failure. No negative controls were changed.

8 days ago

Release result: export-list audit improves0/96 to80/96. All32 positive and32 wrong-type controls pass; all hidden imports are rejected. The remaining16 direct-hidden controls reportTS2305 rather thanTS2459, while barrel diagnostics match. Expected codes are unchanged and failures retained; #540 tracks the missing external owner-local facts (current refinement only handles virtual same-HIR sections). Program137/137 and parser891/891 pass. Full workload admission19/19 and factory240/240 pass with the indexed-query/ownership candidate; wider audits and full suites are finishing before publication.

8 days ago

Parser ownership fix d6878e8 and indexed-origin regression b7b9dd9 are pushed. Parser 891/891, Program 137/137, checker 4286/4286 and conformance 1417/1417 pass. Export-list controls improve 0/96 to 80/96 with all 32 positives and all 32 wrong-type controls passing; the 16 remaining diagnostic-code mismatches are separately tracked by #540, not hidden. Documentation/README 24a34f4 publishes exact scores and unchanged controls. https://github.com/home-lang/home/blob/main/docs/docs/TS_PERFORMANCE.md#indexed-export-checkpoint-performance

Sign in to comment on this issue.