[PR #509] [MERGED] fix(javascript): respect lexical shadowing of require #2037

Closed
opened 2026-10-16 21:13:36 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/509
Author: @rudycelekli
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @morluto

Base: main ← Head: fix/shadowed-require-provenance-20261004


📝 Commits (1)

  • 384a23d fix(javascript): respect lexical shadowing of require

📊 Changes

4 files changed (+60 additions, -21 deletions)

View changed files

📝 src/domain/javascriptSemanticAnalysis.structure.test.ts (+35 -0)
📝 src/domain/javascriptSemanticAnalysis.ts (+3 -14)
📝 src/domain/javascriptSemanticProjection.ts (+10 -4)
📝 src/domain/javascriptSemanticValues.ts (+12 -3)

📄 Description

Change

Collect module links after definitions, and honor lexical require shadowing during both origin-evaluation paths. Remove premature require directOrigins; retain static import origins and destructuring/alias/assignment evaluation. Controls cover function parameters, later hoisted declarations, later block const and imported loaders. Native inert-source analyzer; no JavaScript execution or provider claim.

Reproduction and verification

29 tests PASS; before4FAIL5PASS

  • npm run check:pr: passed (Test Files 352 passed (352); Tests 1803 passed | 2 skipped (1805)).
  • npm run check:ci: passed.
  • npm run verify:package: passed installed-tarball CLI/MCP verification, including optional-dependency degradation.
  • npm pack --dry-run: passed.
  • Exact lockfile installation on Node 24.18.0 and npm 11.16.0.

These tests exercise the production seams described above. No real Hopper, Ghidra, desktop browser or Linux sandbox end-to-end verification is claimed.

Prepared with AI assistance; the reproductions and verification commands above were executed locally.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/509 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/shadowed-require-provenance-20261004` --- ### 📝 Commits (1) - [`384a23d`](https://github.com/morluto/rea/commit/384a23dcc30cb1b1a26c4e634cff79a5700a918e) fix(javascript): respect lexical shadowing of require ### 📊 Changes **4 files changed** (+60 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascriptSemanticAnalysis.structure.test.ts` (+35 -0) 📝 `src/domain/javascriptSemanticAnalysis.ts` (+3 -14) 📝 `src/domain/javascriptSemanticProjection.ts` (+10 -4) 📝 `src/domain/javascriptSemanticValues.ts` (+12 -3) </details> ### 📄 Description ## Change Collect module links after definitions, and honor lexical require shadowing during both origin-evaluation paths. Remove premature require directOrigins; retain static import origins and destructuring/alias/assignment evaluation. Controls cover function parameters, later hoisted declarations, later block const and imported loaders. Native inert-source analyzer; no JavaScript execution or provider claim. ## Reproduction and verification 29 tests PASS; before4FAIL5PASS - `npm run check:pr`: passed (Test Files 352 passed (352); Tests 1803 passed | 2 skipped (1805)). - `npm run check:ci`: passed. - `npm run verify:package`: passed installed-tarball CLI/MCP verification, including optional-dependency degradation. - `npm pack --dry-run`: passed. - Exact lockfile installation on Node 24.18.0 and npm 11.16.0. These tests exercise the production seams described above. No real Hopper, Ghidra, desktop browser or Linux sandbox end-to-end verification is claimed. Prepared with AI assistance; the reproductions and verification commands above were executed locally. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:13:36 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2037
No description provided.