Skip to content

fix(javascript): preserve literal percent runtime paths - #4327

Closed
ShuaixinHuang wants to merge 27 commits into
morluto:mainfrom
ShuaixinHuang:codex/fix-runtime-literal-percent
Closed

ShuaixinHuang wants to merge 27 commits into
morluto:mainfrom
ShuaixinHuang:codex/fix-runtime-literal-percent

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #4941 at the author's request. The replacement incorporates current main and reruns focused validation. This PR and its original branch are retained for the review history, fixes and historical CI evidence.

Summary

Preserve literal percent bytes in filesystem runtime paths while retaining explicit file-URL conversion. Resolve Electron loadFile targets from proven application ownership, keeping possible competing owners when entrypoints or imports cannot be examined.

The graph producer records examined module imports once; consumers use those facts and parsed resolution. Main/default entries establish running roots. Browser/module/renderer metadata preserves observations. Exact lowercase JSON loader targets are inert; resolved HTML/.JSON and unavailable directory entries retain uncertainty. Equivalent proven missing page candidates share a renderer while retaining both declarations.

Validation

Current head: 5500de132d7168e4fdf39004712a39421cfd6817, normally merged upstream d9099190. The merge preserves upstream skipped-parse reporting and test-owned MCP connection reuse. One named options argument keeps source-path selection and MCP caller ownership explicit; the new upstream parse-status fixture includes this PR's graph-context fields.

Executed on Windows x64 with Node 24.18.0/npm 11.16.0:

  • Nine focused files: 391 passed / 12 platform skips. The upstream MCP-reuse matrix and skipped-parse controls passed alongside the literal-percent and ownership regressions.
  • npm run check: 6/6 tasks plus resolved module boundaries and architecture guards passed. git diff --check: passed.
  • Original ownership regressions reproduced 6 failures/50 passes before the import/frontend corrections; the later unavailable-directory-main case also failed before its correction. Current focused suites retain those regression controls.

The selection covers actual CLI/stdio-MCP path analysis and MCP connection-reuse matrices, competing owners, JSON/default/frontend entrypoints, runtime reconciliation, producer path resolution, module relationships, observation lookup, and skipped-parse reporting. Unavailable-reader cases inject a boundary; no live Electron/provider-engine verification is claimed.

The unchanged file-URL case requiring the Windows-invalid preload?#.cjs filename was not rerun locally in this merge selection. Historical Linux CI at 78f06711 executed all 27 file-URL cases successfully. That previous head also passed required CI; these are historical results, not checks of this merged head.

The current merged head passed CI required in run 39024161180. All five test shards, portable tests, the Windows capability/package lane and native package baselines passed. Optional/provider lanes recorded as skipped are not claimed as executed validation.

Author readiness

Human owner: @ShuaixinHuang

  • 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.

@ShuaixinHuang
ShuaixinHuang marked this pull request as ready for review October 16, 2026 01:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 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 ⚠️ Failed 2026-10-17T10:15:00.555194Z 5500de1 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 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge; no new blocking issue was found.

Summary

Preserves literal percent bytes in filesystem runtime paths and resolves Electron pages from application ownership.

  • Filesystem paths keep percent bytes literal unless code converts a file URL.
  • Electron page paths resolve from the application that owns them.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Main and default entries] --> B[Known application owners]
  C[Examined imports] --> D[Carry owners to imported files]
  B --> D
  E[Unread entries or imports] --> F[Retain possible owners]
  D --> G{One application root?}
  F --> G
  G -->|Yes| H[Resolve literal loadFile path]
  G -->|No| I[Keep page unavailable]
  H --> J[Check path stays inside artifact]
Loading

Reviews (21) · Last reviewed commit: "chore: merge upstream JavaScript workflo..." · Reviewed by Greptile

@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: f675800bdb

ℹ️ 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: b3fcaab706

ℹ️ 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: b3f04002f5

ℹ️ 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: 0fbd037603

ℹ️ 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: 522fc0566a

ℹ️ 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: 31dd95e8e4

ℹ️ 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: f0f721acb7

ℹ️ 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: 540e8aed02

ℹ️ 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: 42c74dbc31

ℹ️ 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: 775d3515b2

ℹ️ 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

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ShuaixinHuang

Copy link
Copy Markdown
Contributor Author

Hi @baron, thank you for reviewing and approving #4530 and #4531!

When you have time, could you also review this earlier PR (#4327), at 78f067114d819f9b93e2386773c57217bc9a7498?

It preserves literal percent bytes in filesystem runtime paths and keeps Electron page ownership uncertain when competing application entrypoints or imports cannot be examined. The current-head CI required check passed, there are no unresolved review threads, and the human author-readiness declarations are completed.

The description records focused CLI/stdio-MCP and ownership regressions, current Linux CI evidence, and the limits of controlled provider fixtures and unavailable live Electron/provider verification. Thank you again for your help!

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@ShuaixinHuang

Copy link
Copy Markdown
Contributor Author

Hi @morluto @N0zoM1z0 @baron, thank you for your help reviewing and merging my earlier fixes!

These three PRs are now ready for maintainer review:

All three are out of draft, have completed author-readiness declarations, and have no unresolved review threads. Each description records the regression evidence and validation limits: the macOS-only Apple CLI cases were not run on my Windows host, and browser coverage uses controlled CDP fixtures; no live Electron/provider verification is claimed.

When you have time, could you please review these three? Thank you again!

ShuaixinHuang commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @morluto @N0zoM1z0 @baron, thank you again for your help with my contributions. I've now completed the additional real-platform verification:

Current-head required CI has passed for #4327, #4730 and #4731. All three are ready for review with completed author declarations and no unresolved review threads. Their descriptions retain the remaining validation boundaries.

When you have time, could you please review these three? Thank you!

Copy link
Copy Markdown
Contributor Author

Hi @N0zoM1z0, thank you again for your help with #4354! When you have time, could you please review these three PRs?

All three have passed their current-head required CI, and there are no unresolved review threads at my latest check. The descriptions contain the updated evidence and remaining validation boundaries. Thank you for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants