Repository navigation
fix(electron): preserve selected fuse inspection paths - #3104
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Include the merged main regression fixes for current-head CI while preserving PR morluto#3104's focused five-file path correction. Validation: six new acceptance failures reproduced on main 7ad75bd; 41 focused source/CLI/MCP tests pass with one Windows-only skip. Full static and docs checks pass. SHA-verified Electron v44.7.1 ELF, PE, and Mach-O files reproduce wrong-file selection on main and correct selection after the fix through public CLI and stdio MCP. CLI/MCP normalized results and subjects match; owned servers exit. Native Windows/macOS REA execution is not claimed. Co-authored-by: Kaoru0822 <[email protected]>
Include the new worker-cleanup and README test maintenance before current-head CI. The Electron production correction remains the independently verified tree. Co-authored-by: Kaoru0822 <[email protected]>
|
Independent maintainer verification is complete. The branch now includes main
All heavy local work used two CPUs and an 8-GiB sampled process-family threshold; the largest measured family was about 4.2 GiB and no stop occurred. No target application was executed. Parsing PE/Mach-O bytes on Linux does not establish native Windows/macOS REA behavior. Current-head CI and review remain the merge gate. |
Summary
inspect-electron-fusescould successfully report a digest and fuse states for the wrong executable. On POSIX, a selected path containingCurrent/../follows the symlink before its parent component; the CLI'spath.resolve()instead removed those components lexically. Preserve the selected filesystem target through the CLI and the Electron bundle path owner.No separate issue: this is a directly reproduced follow-up to the accepted path-preservation correction in #2399.
Problem and expected behavior
With
Versions/Current -> nested/B, selectingVersions/Current/../A/Electron FrameworkmeansVersions/nested/A/Electron Framework. The CLI inspectedVersions/A/Electron Frameworkinstead. Two synthetic files with opposing fuse states demonstrated both a different SHA-256 and opposite reported implications.The same problem affected an application selected through
Current/../Fixture.app: correcting the CLI alone was insufficient because subsequent providerjoin()calls collapsed the selected parent path again.Expected: inspect the caller-selected file, keep its selection in Evidence, and preserve existing bundle admission and identity checks.
Change and scope
.or..using filesystem checks, retaining checked directory identities for readback validation. Refuse ambiguous terminal parent traversal through a symlink instead of silently selecting a lexical sibling.This is an ordinary correctness fix in existing read-only fuse inspection; a new capability scope decision is not applicable. No target is launched and no fuse is changed.
Contract and boundary impact
ElectronFusePathfilesystem traversal.Expected effects:
Evidence and regression coverage
.., using distinct expected and decoy files. Assertions check selected and resolved paths, Evidence digest and fuse implications; direct-file controls verify the opposing fixture.b3c5672c. A CLI-only patch fixed the binary pair but left the application pair failing, demonstrating why the owning traversal also needs correction.link/../. Repository checks use pinned Node 24.18.0 in WSL Ubuntu.For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/acceptance/electronFusesCli.test.ts src/electron/ElectronFuseProvider.test.ts tests/boundary/mcp/electronFusesMcp.test.ts src/domain/electron/electronFuses.test.ts: 41 passed, one Windows-only CLI test skipped on Linux; four files passed.npm run check: passed, including six static tasks and architecture guards.npm run verify:test-discovery: passed, 1,242 test files.npm run docs:check: passed, including five README consistency tests.git diff --check: passed.Compatibility, safety, and release
No new dependency, public schema, release metadata or target-execution capability. No binary mutation. Terminal symlink/parent directory selections that cannot be reduced while preserving admission are rejected with the existing typed input-error shape. Verification used owned synthetic files on Linux and a separate native Windows filesystem probe.
Before merge