Repository navigation
fix(electron): reject non-directory scenario roots before launch - #8949
ShuaixinHuang wants to merge 1 commit into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The code appears safe to merge; the directory check fixes input classification without changing admitted-path behavior. SummaryRejects an existing non-directory
Reviews (1) · Last reviewed commit: "fix(electron): reject non-directory scen..." · Reviewed by Greptile |
Problem and outcome
Fixes #8946. An existing regular file supplied as application_root currently passes existence checks and reaches the Electron provider, which can fail with spawn ENOTDIR and provider-oriented recovery. Reject that selection as invalid_request with an issue at ["application_root"] before provider capture.
Change and boundaries
The shared Electron path-admission owner now checks the existing stat result for directory type when admitting application_root. Preserve aggregate invalid-input reporting, EACCES/EPERM host-access handling, canonical paths, explicit directory selection and omitted-root inference. application_path remains file-or-directory compatible; no new launch authority or schema change.
Verification
Scope limits: Windows Node22.20.0/npm10.9.3 with existing dependencies and verified native addon junction; no dependencies installed. CLI/MCP rejected inputs were exercised without launching real Electron. The service uses a recording provider, so this is not a real Electron/provider or Linux/macOS permission verification. Existing permission and symlink skips remain unchanged. No new timeout, resource limit or skip.
Remote commit is based on main 71f680d, with only three files applied using exact-context patches. The complete remote main integration tree was not locally rerun and requires this new PR's own CI. Local isolated worktree c03935f9b preserved the checked bytes after commit.
Compatibility
Corrects input classification and recovery for an invalid application_root. No runtime behavior change for admitted paths, target execution, package metadata, generated contracts or release migration.
Author readiness
Human owner: @ShuaixinHuang
Before merge
type(scope): outcome.Current-head P1 correction
Commit
9611e5cbe8d0d3639f87df529d2989e69a63d1f2covers the classic-script global activation case. Focused domain and CLI/stdio MCP validation passed 67/67 tests;check:fastpassed 2/2. The local regression covers early and lateglobalThis/window/self/thisactivations without expanding call-graph or authority semantics.This replacement preserves the prior PR discussion and validation history at #8331. It reuses the verified published head and requires its own hosted CI.
Supersedes #8749.