Skip to content

fix(javascript): preserve Electron runtime entrypoint paths - #2742

Merged
morluto merged 19 commits into
morluto:mainfrom
HeadmasterEggy:codex/electron-runtime-entrypoints-2670
Oct 13, 2026
Merged

morluto merged 19 commits into
morluto:mainfrom
HeadmasterEggy:codex/electron-runtime-entrypoints-2670

Conversation

@HeadmasterEggy

@HeadmasterEggy HeadmasterEggy commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

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 fix(javascript): Electron entrypoint paths select undeclared HTML siblings #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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T18:46:52.129003Z 337a5e1 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] No new blocking issue was established in this review.

Summary

The PR separates Electron path lookup from ordinary source imports.

  • Preload paths resolve only when the declared file exists.
  • Utility-process paths follow Node's entrypoint lookup.
  • Renderer URLs resolve as URLs rather than script-relative paths.

The previous-review merge bases differ, so the full PR diff was reviewed. No new actionable finding or mounted-rule violation was established. Tests were not run. GitHub authentication was unavailable, so whether another PR supersedes this one could not be checked.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Electron declaration] --> B{Runtime owner}
  B -->|Preload or loadFile| C[Exact local file]
  B -->|loadURL| D{File URL?}
  D -->|Yes| E[Decode URL and check exact file]
  D -->|No| F[Unavailable or external]
  B -->|Utility process| G[Node file and directory lookup]
  C --> H[Retain lookup outcome]
  E --> H
  F --> H
  G --> H
  H --> I[Graph relationships]
  G --> J[Utility summary count]
Loading

Reviews (13) · Last reviewed commit: "Merge branch 'main' into codex/electron-..." · Reviewed by Greptile

@greptile-apps

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d32e72a3c9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b21105ee60

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2591a0c29f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 04086e1430

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e5bad8b51b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

…ainty

Source-reviewed changes. Tests, builds and check reruns were skipped at maintainer request.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 812543e2a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 274f58a6e1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78e5724aea

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@morluto morluto added bug Something isn't working area: domain Domain logic, errors, and pure functions P2: medium Medium priority issue labels Oct 13, 2026
@morluto

morluto commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Source fixes and publication evidence for the review findings below. Tests and executable checks were skipped at the maintainer's request. Findings that still require a decision or execution evidence remain open.

review thread

The utility path was sent through moduleKind: "require", which also enabled emitted TypeScript source candidates and incorrectly mapped a runtime worker.js declaration to worker.ts. The source fix gives runtime paths an explicit owner (runtimePathKind: "node-entrypoint") and resolves them with Node runtime extension/directory probes while excluding emitted-source substitution; preload paths keep their exact-file mode. The updated branch is live at 8ca6b29. The authored boundary regression is present. Source/consumer inspection and git diff --check passed; tests, builds, typechecks, lint, provider execution and CI reruns were skipped per instruction. No related cleanup remains.

dakjdakd and others added 7 commits October 14, 2026 01:15
* fix(comparison): preserve incomplete function call evidence

Keep missing, unknown, partial and unresolved call relationships unknown in function comparisons and reconstruction claims. Aggregate IDA caller and callee coverage without overwriting uncertainty.

Validate with 144 focused tests, typecheck/lint, docs checks and test discovery. Real providers were not verified; the full headless IDA session suite requires unavailable Windows native controls.

* fix(comparison): recheck historical calls-only changes

---------

Co-authored-by: morluto <[email protected]>
(cherry picked from commit 688defc)
…2895)

* fix: repair the static-check failures on the default branch

The default branch fails its own required `Static checks` job three ways, so
every pull request reports that job as failed regardless of its own change.

- `npm run format:check` reports `src/domain/functionComparison.test.ts` and
  `src/ida/IdaOperationRunner.ts`.
- `npm run lint` reports a duplicate `import { join } from "node:path"` in
  `tests/boundary/mcp/ghidraInventoryMcp.test.ts` (lines 4 and 17).
- `npm run typecheck` reports `format: "devin"` missing from the client format
  union in `src/application/SupportedClients.ts`, and an unchecked index in
  `tests/boundary/cli/clientProfileLifecycle.test.ts`, whose pair array is
  inferred as `string[][]`.

Apply the pinned formatter, drop the duplicate import, list the `"devin"` format
that its own definition already uses, and mark the pair array `as const`.

Validation: `npm run check:fast` and `npm run format:check` pass.

* fix(setup): keep Devin on the JSON configuration dialect

---------

Co-authored-by: 吴佳浩 <[email protected]>
Co-authored-by: morluto <[email protected]>
(cherry picked from commit df3d96d)
@morluto
morluto merged commit 3a4d494 into morluto:main Oct 13, 2026
31 checks passed
@morluto morluto added area: runtime Process capture and runtime observation provider: electron Analysis provider / engine: electron labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions area: runtime Process capture and runtime observation bug Something isn't working P2: medium Medium priority issue provider: electron Analysis provider / engine: electron

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(javascript): Electron entrypoint paths select undeclared HTML siblings

4 participants