[PR #2742] [MERGED] fix(javascript): preserve Electron runtime entrypoint paths #5357

Closed
opened 2026-10-31 01:06:00 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2742
Author: @HeadmasterEggy
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: codex/electron-runtime-entrypoints-2670


📝 Commits (10+)

  • d32e72a fix(javascript): preserve Electron runtime entrypoint paths
  • b21105e fix(javascript): resolve runtime entrypoints before modules
  • 2591a0c fix(javascript): preserve Electron runtime path semantics
  • a80bda3 fix(javascript): resolve Electron renderers exactly
  • 92ba739 fix(javascript): retain runtime package aliases
  • 04086e1 fix(javascript): retain missing renderer URL paths
  • e5bad8b fix(javascript): resolve Electron URL and utility entries correctly
  • 812543e fix(javascript): preserve exact Electron paths and runtime URL uncertainty
  • 274f58a fix(javascript): reject suffix-only worker URLs
  • 78e5724 fix(javascript): respect Electron URL and utility path semantics

📊 Changes

8 files changed (+567 additions, -8 deletions)

View changed files

📝 src/application/javascript/ElectronBoundaryAnalysis.ts (+9 -1)
📝 src/application/javascript/ElectronBoundaryGraphWindows.ts (+26 -7)
📝 src/application/javascript/JavaScriptArtifactGraphContext.ts (+2 -0)
📝 src/application/javascript/JavaScriptArtifactGraphFindings.ts (+8 -0)
📝 src/application/javascript/JavaScriptArtifactPathResolution.test.ts (+218 -0)
📝 src/application/javascript/JavaScriptArtifactPathResolution.ts (+92 -0)
📝 tests/acceptance/applications/javascriptWorkerUrlCli.test.ts (+6 -0)
📝 tests/boundary/filesystem/javascript-applications/electronApplicationAnalysis.test.ts (+206 -0)

📄 Description

Summary

Fixes #2670. Electron preload and utility-process declarations that name local paths resolve only the exact caller-declared filename; extension and directory/index fallback stay disabled. Bare module specifiers continue through package resolution, and renderer loadURL declarations keep URL/path handling, including file URLs and query/fragment suffixes.

Resolved and unresolved lookup outcomes stay on graph relationships, and utility counts use the same exact-path result.

Evidence

  • Before: issue #2670 reproduced extension and directory fallback. Review also identified bare runtime names entering node_modules lookup and fragment text being stripped before exact-file lookup.
  • After: npm run test:focused -- tests/acceptance/applications/packageSubpathsCli.test.ts tests/boundary/filesystem/javascript-applications/electronApplicationAnalysis.test.ts src/application/javascript/JavaScriptArtifactPathResolution.test.ts passed 148/148. This covers package-export resolution through CLI and stdio MCP, exact local runtime paths, and renderer file URLs plus relative URLs with query/fragment text.
  • npm run check:fast and git diff --check: passed on Node 24.18.0 / npm 11.16.0.
  • No live Electron runtime was started.

Merge Danger

Door: Two-way; a normal revert restores the prior behavior.

Blast Radius: Low

Only Electron runtime entrypoint resolution changes. Generic module and URL resolution remain intact.


🔄 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/2742 **Author:** [@HeadmasterEggy](https://github.com/HeadmasterEggy) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `codex/electron-runtime-entrypoints-2670` --- ### 📝 Commits (10+) - [`d32e72a`](https://github.com/morluto/rea/commit/d32e72a3c9f522f435de7112fe0fc757af288d6d) fix(javascript): preserve Electron runtime entrypoint paths - [`b21105e`](https://github.com/morluto/rea/commit/b21105ee605653ea5920506c369677cfdbf3c69d) fix(javascript): resolve runtime entrypoints before modules - [`2591a0c`](https://github.com/morluto/rea/commit/2591a0c29fd9673e84b92445909bfad3d4466010) fix(javascript): preserve Electron runtime path semantics - [`a80bda3`](https://github.com/morluto/rea/commit/a80bda348c84ffd3c4b359605dddc244f781c9b0) fix(javascript): resolve Electron renderers exactly - [`92ba739`](https://github.com/morluto/rea/commit/92ba739c7a0cc379743d3d506f14863755b64010) fix(javascript): retain runtime package aliases - [`04086e1`](https://github.com/morluto/rea/commit/04086e1430112acd3c2d8066358d6e91c63e3ec4) fix(javascript): retain missing renderer URL paths - [`e5bad8b`](https://github.com/morluto/rea/commit/e5bad8b51be87f7b0bb0f4c708dd8bc2bfffa617) fix(javascript): resolve Electron URL and utility entries correctly - [`812543e`](https://github.com/morluto/rea/commit/812543e2a5592d67d82f290a97012ea3a8a0a021) fix(javascript): preserve exact Electron paths and runtime URL uncertainty - [`274f58a`](https://github.com/morluto/rea/commit/274f58a6e1d1657b6efd655e1d562a3b9aadf709) fix(javascript): reject suffix-only worker URLs - [`78e5724`](https://github.com/morluto/rea/commit/78e5724aea82041aa81fa5ae3b57c99cad7028ef) fix(javascript): respect Electron URL and utility path semantics ### 📊 Changes **8 files changed** (+567 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/application/javascript/ElectronBoundaryAnalysis.ts` (+9 -1) 📝 `src/application/javascript/ElectronBoundaryGraphWindows.ts` (+26 -7) 📝 `src/application/javascript/JavaScriptArtifactGraphContext.ts` (+2 -0) 📝 `src/application/javascript/JavaScriptArtifactGraphFindings.ts` (+8 -0) 📝 `src/application/javascript/JavaScriptArtifactPathResolution.test.ts` (+218 -0) 📝 `src/application/javascript/JavaScriptArtifactPathResolution.ts` (+92 -0) 📝 `tests/acceptance/applications/javascriptWorkerUrlCli.test.ts` (+6 -0) 📝 `tests/boundary/filesystem/javascript-applications/electronApplicationAnalysis.test.ts` (+206 -0) </details> ### 📄 Description ## Summary Fixes #2670. Electron preload and utility-process declarations that name local paths resolve only the exact caller-declared filename; extension and directory/index fallback stay disabled. Bare module specifiers continue through package resolution, and renderer `loadURL` declarations keep URL/path handling, including file URLs and query/fragment suffixes. Resolved and unresolved lookup outcomes stay on graph relationships, and utility counts use the same exact-path result. ## Evidence - **Before:** issue #2670 reproduced extension and directory fallback. Review also identified bare runtime names entering `node_modules` lookup and fragment text being stripped before exact-file lookup. - **After:** `npm run test:focused -- tests/acceptance/applications/packageSubpathsCli.test.ts tests/boundary/filesystem/javascript-applications/electronApplicationAnalysis.test.ts src/application/javascript/JavaScriptArtifactPathResolution.test.ts` passed 148/148. This covers package-export resolution through CLI and stdio MCP, exact local runtime paths, and renderer file URLs plus relative URLs with query/fragment text. - `npm run check:fast` and `git diff --check`: passed on Node 24.18.0 / npm 11.16.0. - No live Electron runtime was started. ## Merge Danger **Door:** Two-way; a normal revert restores the prior behavior. **Blast Radius:** Low Only Electron runtime entrypoint resolution changes. Generic module and URL resolution remain intact. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:06:00 +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#5357
No description provided.