fix(javascript): retain guards without duplicating observed IPC calls
Include enclosing control-flow predicates when deciding whether symbolic wrapper facts can be reported without guards. Preserve the guarded paths and unresolved coverage instead of inventing unconditional exposures or channel pairing candidates. Keep fully observed renderer transmissions singular when tracing an exposed callback. Distinct wrapper registrations still retain invocation identities. This fixes the Electron package baseline's doubled transmission count. Validation: check; 43 exact source and public CLI/MCP tests; existing artifact, extraction, Electron analysis and routed-analysis verifier against the built CLI. Installed-package platform coverage remains with CI.
This commit is contained in:
@@ -139,6 +139,7 @@ for (const surface of ["CLI", "stdio MCP"] as const) {
|
||||
choose:choose(),
|
||||
ambiguous:()=>e.ipcRenderer.send("test:ambiguous"),
|
||||
competing:()=>e.ipcRenderer.send("test:competing"),
|
||||
conditional:()=>e.ipcRenderer.send("test:conditional"),
|
||||
fallback:()=>e.ipcRenderer.send("test:fallback"),
|
||||
});`,
|
||||
"main.js": `const e=require("electron");
|
||||
@@ -148,6 +149,7 @@ for (const surface of ["CLI", "stdio MCP"] as const) {
|
||||
register("test:ambiguous",flag?copy:cut);
|
||||
register("test:competing",copy);
|
||||
register("test:competing",flag?copy:unknownHandler);
|
||||
if(flag) register("test:conditional",copy);
|
||||
register("test:fallback",event=>{false ?? event.sender.copy()});`,
|
||||
});
|
||||
const { graph } = await analyzeJavaScriptDirectory(surface, cli, root);
|
||||
|
||||
Reference in New Issue
Block a user