[PR #299] [MERGED] fix(electron): resolve package and dirname entrypoints by context #1935

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/299
Author: @N0zoM1z0
Created: 7/17/2026
Status: ✅ Merged
Merged: 7/17/2026
Merged by: @N0zoM1z0

Base: main ← Head: agent/fix-electron-entrypoint-context


📝 Commits (2)

  • 1ac9a09 fix(electron): resolve package and dirname entrypoints by context
  • 734a4ef docs: refresh Electron path resolution API

📊 Changes

158 files changed (+1657 additions, -496 deletions)

View changed files

📝 docs/api/assets/hierarchy.js (+1 -1)
📝 docs/api/assets/navigation.js (+1 -1)
📝 docs/api/assets/search.js (+1 -1)
📝 docs/api/classes/application_PermissionAuthority.PermissionPathError.html (+1 -1)
📝 docs/api/classes/application_ProcessCaptureError.ProcessCaptureError.html (+1 -1)
📝 docs/api/classes/application_ProjectPermissionStore.ProjectPermissionStoreError.html (+1 -1)
📝 docs/api/classes/browser_BrowserProcessStartup.BrowserStartupError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisCancelledError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisCapabilityUnavailableError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisInputError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisOutputError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisProtocolError.html (+1 -1)
📝 docs/api/classes/domain_errors.AnalysisTimeoutError.html (+1 -1)
📝 docs/api/classes/domain_errors.ArtifactOperationError.html (+1 -1)
📝 docs/api/classes/domain_errors.BinaryTargetError.html (+1 -1)
📝 docs/api/classes/domain_errors.BrowserObservationError.html (+1 -1)
📝 docs/api/classes/domain_errors.ConfigurationError.html (+1 -1)
📝 docs/api/classes/domain_errors.EvidenceFileError.html (+1 -1)
📝 docs/api/classes/domain_errors.EvidenceIntegrityError.html (+1 -1)

...and 80 more files

📄 Description

What

  • Add a bounded, artifact-confined resolver with separate package-entrypoint, filesystem-expression, module-specifier, and html-reference contexts.
  • Preserve CommonJS __dirname/__filename and ESM import.meta.url identity during inert AST extraction.
  • Support bounded extension, index, and directory package probing while keeping container identity fixed.
  • Attach declared path, resolution context, resolved path, status, and limitations to every projected Electron role.
  • Require resolved roles to map to their inventoried assets, including HTML renderer roles.
  • Add HTML base-href and file-URL handling plus explicit external, rejected, unavailable, and not-found outcomes.

Why

The previous shared resolver treated bare-looking strings as module specifiers. That made package main values such as main.js and paths extracted from path.join(__dirname, "preload.js") fail to map even when the exact asset existed. It also could not distinguish missing files from unreadable directory package metadata.

Impact

Standard package main/renderer, BrowserWindow preload, loadFile/loadURL, utility-process, and HTML script paths now use their actual declaration context. Bare packages, Node builtins, root escapes, encoded separators, external bases, dynamic URL bases, and cross-container candidates remain fail closed with actionable limitations.

Checks

  • npm run check
  • npm run verify:package
  • npm run knip
  • npm run jscpd
  • npm run scan:todos
  • targeted Electron reconstruction, path-resolution, CLI, MCP, workflow, and reconciliation suites

Real verification

No real Electron executable verification was claimed or run; this PR covers source-owned static fixtures and packaged CLI/MCP verification. A dedicated real Electron verifier remains a later work package.


🔄 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/299 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 7/17/2026 **Status:** ✅ Merged **Merged:** 7/17/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `agent/fix-electron-entrypoint-context` --- ### 📝 Commits (2) - [`1ac9a09`](https://github.com/morluto/rea/commit/1ac9a09ce1574b202d98177392628ba468a568df) fix(electron): resolve package and dirname entrypoints by context - [`734a4ef`](https://github.com/morluto/rea/commit/734a4ef04fce7bbff76b3fbf9c3f1250d7ab8963) docs: refresh Electron path resolution API ### 📊 Changes **158 files changed** (+1657 additions, -496 deletions) <details> <summary>View changed files</summary> 📝 `docs/api/assets/hierarchy.js` (+1 -1) 📝 `docs/api/assets/navigation.js` (+1 -1) 📝 `docs/api/assets/search.js` (+1 -1) 📝 `docs/api/classes/application_PermissionAuthority.PermissionPathError.html` (+1 -1) 📝 `docs/api/classes/application_ProcessCaptureError.ProcessCaptureError.html` (+1 -1) 📝 `docs/api/classes/application_ProjectPermissionStore.ProjectPermissionStoreError.html` (+1 -1) 📝 `docs/api/classes/browser_BrowserProcessStartup.BrowserStartupError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisCancelledError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisCapabilityUnavailableError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisInputError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisOutputError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisProtocolError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.AnalysisTimeoutError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.ArtifactOperationError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.BinaryTargetError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.BrowserObservationError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.ConfigurationError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.EvidenceFileError.html` (+1 -1) 📝 `docs/api/classes/domain_errors.EvidenceIntegrityError.html` (+1 -1) _...and 80 more files_ </details> ### 📄 Description ## What - Add a bounded, artifact-confined resolver with separate package-entrypoint, filesystem-expression, module-specifier, and html-reference contexts. - Preserve CommonJS __dirname/__filename and ESM import.meta.url identity during inert AST extraction. - Support bounded extension, index, and directory package probing while keeping container identity fixed. - Attach declared path, resolution context, resolved path, status, and limitations to every projected Electron role. - Require resolved roles to map to their inventoried assets, including HTML renderer roles. - Add HTML base-href and file-URL handling plus explicit external, rejected, unavailable, and not-found outcomes. ## Why The previous shared resolver treated bare-looking strings as module specifiers. That made package main values such as main.js and paths extracted from path.join(__dirname, "preload.js") fail to map even when the exact asset existed. It also could not distinguish missing files from unreadable directory package metadata. ## Impact Standard package main/renderer, BrowserWindow preload, loadFile/loadURL, utility-process, and HTML script paths now use their actual declaration context. Bare packages, Node builtins, root escapes, encoded separators, external bases, dynamic URL bases, and cross-container candidates remain fail closed with actionable limitations. ## Checks - npm run check - npm run verify:package - npm run knip - npm run jscpd - npm run scan:todos - targeted Electron reconstruction, path-resolution, CLI, MCP, workflow, and reconciliation suites ## Real verification No real Electron executable verification was claimed or run; this PR covers source-owned static fixtures and packaged CLI/MCP verification. A dedicated real Electron verifier remains a later work package. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:12:39 +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#1935
No description provided.