Repository navigation
fix(javascript): exclude overwritten Electron API identities - #1664
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. |
N0zoM1z0
left a comment
There was a problem hiding this comment.
Maintainer self-review of 28f2b3d: visible writes now invalidate the affected Electron identity through direct/aliased namespaces, destructuring and loops, updates, and deletes. Exact property segments preserve unrelated members and reject dotted lookalikes. The coverage limitation reaches public CLI/MCP results even with empty findings.
271 focused regressions, check:ci, and docs:check passed. Native Qwen/Pi/Hermes ordinary and sticky-profile cases passed with all 170 tools, real MCP analysis/Evidence and verified empty process lineages (loopback model fixture). Final merge waits for all applicable exact-head CI checks and fresh review-thread verification.
N0zoM1z0
left a comment
There was a problem hiding this comment.
Maintainer self-review of 372ad95: Electron identity now excludes visible member writes while retaining exact paths, unrelated members, and public CLI/MCP coverage limitations. Inherited Electron fixtures retain their original range assertions; only the full-catalog runtime test receives a measured 30-second budget.
349 focused tests passed (two macOS-only local skips), plus check:ci and docs:check. Four native Qwen/Pi/Hermes runs passed again on integrated main 29cc1b8 with 170 tools, real analysis/Evidence, Qwen artifact read, and empty owned lineages. Production/runtime digests remain identical after test-only follow-ups; model endpoint was a deterministic loopback fixture. All applicable exact-head CI checks subsequently passed.
|
TL;DR: I ran this on Linux against a real open-source Electron app. It merged while I ran. Stretchly gives the same IPC results on base and on head, plus the new limitation line. When I add visible overwrites of Electron's Edit, 11 October, 04:50 UTC: a default import is now read as Electron. That came with fe574c0 (#1673). I checked it on main in my #1673 comment. This PR merged as 29cc1b8 (#1664) while I ran. I tested the PR head at merge, 372ad95. Every file the PR changes is the same in 29cc1b8. That head adds one test-only commit over d42d2bc. Results
The 2 skips are the
I copied the head versions of the 5 changed test files into the base tree. Base has no Real app: Stretchly 1.22.1 (BSD-2-Clause),
With every Overwrite cases: Stretchly
Base kept all 30 handlers in every row. Head also printed the limitation in every row, including the controls. Each overwrite drops the whole affected group, not only the line that was written. After Also seen
Not run
The new limitation lineTest setup
Commands🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
Visible writes through Electron namespace aliases can leave an ordinary replacement object reported as a real IPC handler. Index direct/destructuring assignment, loop, update and delete targets with the existing property-path coverage trie and exclude affected call identities, including direct
require("electron")writes and unknown write keys. Preserve unrelated members and literal key boundaries.Forward an explicit static identity limitation into public application results, including empty findings. Add compiled CLI/stdio MCP controls for valid aliases and unavailable identities, preserving source-range Evidence and IPC pairing. This inspects inert source; it does not execute Electron or establish runtime side effects. Follow-up to #1656.
Also format the existing real-Electron verifier to clear an inherited format gate failure. Fix existing Electron fixtures to import their API while retaining range assertions. Give only the full-catalog runtime probe a 30-second test budget: two parallel-CI runs exhausted 15 seconds; actual single-CPU runs take about 8–9 seconds. Its complete-catalog, lifecycle and fatal-record assertions remain intact.
Validation (349 focused tests across nine files passed):
npm run test:focused -- tests/acceptance/applications/applicationWorkflowCli.test.ts src/domain/javascript/javascriptSemanticAnalysisSteps.test.ts src/domain/javascript/electronStaticAnalysisOptions.test.ts src/domain/javascript/javascriptStaticPathResolution.test.ts src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.tsnpm run test:focused -- src/application/javascript/JavaScriptArtifactPathResolution.test.ts(59 passed after fixing its missing Electron import; assertions retained)npm run test:focused -- tests/acceptance/applications/electronPreloadOverridesCli.test.ts tests/acceptance/applications/runtime.test.ts(CLI/MCP preload assertions retained; runtime catalog passed twice locally; two macOS-only local skips)npm run test:focused -- tests/composition/javascript-applications/electronOptionKeys.test.ts(15 passed; API imports corrected, assertions retained)npm run check:cinpm run docs:checkHost: Linux x64, Node 24.18.0. No real Electron, Hopper, Ghidra, or GUI verification claimed by this follow-up.