Skip to content

fix(electron): retain unknown external module ownership - #7950

Merged
morluto merged 1 commit into
mainfrom
codex/external-module-ownership-7380
Oct 29, 2026
Merged

morluto merged 1 commit into
mainfrom
codex/external-module-ownership-7380

Conversation

@morluto

@morluto morluto commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Related to #7380. A bare package not found in the selected inventory could be loaded outside that inventory, but Electron IPC pairing treated its unexamined module effects as absent and reported a definite pair.

Problem and expected behavior

A synthetic application with one known IPC handler and preload transmission pairs them when its main file also requires an unobserved package. That package may execute outside the selected artifact, so its effects and possible application ownership remain unknown. Known Electron and Node builtins remain distinguishable from unexamined external packages. The original #7380 fixture includes an unexamined native addon and remains ambiguous; this PR does not close that issue.

Change and scope

The module path-resolution owner records an internal unexamined-imports fact for non-inventoried bare package lookup, including compiler-dependent resolution. Application graph ownership consumes that fact instead of reinterpreting raw declarations. Builtins and blocked package aliases retain their existing behavior. This does not inspect or execute external packages.

Contract and boundary impact

  • Semantic owner and earliest changed stage: artifact module path resolution; application graph consumes the retained fact.
  • Contribution scope fit and linked maintainer decision: existing static read-only analysis; no new authority.
  • CLI and MCP/tool-catalog contract: some IPC pairing results become ambiguous rather than definite; schemas unchanged.
  • Provider, bridge, target-format, or platform compatibility: no provider or target execution changes.
  • Evidence, artifact, provenance, or reconstruction contract: unknown external module effects no longer establish ownership; inputs and existing resolution status retained.
  • Target selection, authority, upstream behavior, and cleanup details: unchanged.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • Read existing files or captured data.

Evidence and regression coverage

A source-built public CLI fixture reproduced one definite pair with an unobserved external package. The updated CLI and stdio MCP regression compares this case with Electron/Node builtin, dynamic require and native-addon controls. The existing two-application and native-gap fixtures continue to pass. The fixture is synthetic and does not execute Electron or an actual external package; real application frequency and other non-bare external path forms are not established.

Validation performed

  • npm run test:local -- src/application/javascript/JavaScriptArtifactPathResolution.test.ts — 302 passed.
  • npm run test:focused -- tests/boundary/cli/electronScopedIpc.test.ts tests/boundary/filesystem/javascript-applications/electronApplicationAnalysis.test.ts — 20 passed, including CLI and stdio MCP cases.
  • npm run check:fast and git diff --check — passed.

Compatibility, safety, and release

Unexamined external packages can now make ownership and IPC pairing ambiguous. No schema migration. Real Electron runtime and external-package behavior were not exercised.

Author readiness

Human owner: @morluto

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking defects were found.

Summary

The PR keeps ownership uncertain when a bare package was not inventoried, so Electron IPC analysis no longer reports a definite pair in that case.

  • Unlisted packages can make Electron IPC pairings ambiguous.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Bare package lookup] --> B{Package inventoried?}
  B -->|No, not a builtin| C[Retain unknown module effects]
  C --> D[Graph records a module gap]
  D --> E[Application ownership stays uncertain]
  E --> F[IPC pairing becomes ambiguous]
Loading

Reviews (1) · Last reviewed commit: "fix(electron): retain unknown external m..." · Reviewed by Greptile

@morluto
morluto marked this pull request as ready for review October 28, 2026 23:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-28T23:26:00.986370Z 47feb8d Draft marked ready
ℹ️ 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.

@morluto
morluto merged commit 59a895a into main Oct 29, 2026
42 of 44 checks passed
@morluto
morluto deleted the codex/external-module-ownership-7380 branch October 29, 2026 01:20
@morluto morluto added bug Something isn't working provider: electron Analysis provider / engine: electron labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working provider: electron Analysis provider / engine: electron

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant