mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 01:13:39 +00:00
fix(javascript): retain static facts under projection pressure (#7986)
* fix(javascript): retain static facts under projection pressure * fix(javascript): scope IPC ambiguity to omitted projections * fix(javascript): preserve IPC uncertainty for omitted sources * fix(javascript): qualify IPC pairing by wrapper coverage * fix(javascript): retain provisional IPC wrapper matches
This commit is contained in:
1 parent
f60e42a9ae
commit
54f5cf7e14
13 files changed
+1174
-40
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { javascriptSourceRangeKey } from "../../domain/javascript/javascriptSourceCoordinates.js";
|
||||
import type { ApplicationNode } from "../../domain/javascript/javascriptApplicationGraphSchemas.js";
|
||||
import { IPC_COVERAGE_LIMITED_PAIRING_BASIS } from "../../domain/javascript/javascriptApplicationGraphSchemas.js";
|
||||
import type { ElectronCallPath } from "../../domain/javascript/electronStaticAnalysisTypes.js";
|
||||
import type { JavaScriptArtifactFile } from "../../domain/javascript/javascriptArtifactFiles.js";
|
||||
import { electronCallPathId } from "./ElectronCallPathIdentity.js";
|
||||
@@ -137,7 +138,21 @@ export const addElectronCallPaths = (
|
||||
projected.push({ file, path, coverage, nodes });
|
||||
}
|
||||
}
|
||||
for (const { transmission, handler } of ipc.pairings) {
|
||||
const wrapperCandidates = [
|
||||
...ipc.pairings.map((pairing) => ({ ...pairing, coverageLimited: false })),
|
||||
...ipc.states.flatMap(({ transmission, coverageLimitedCandidate }) =>
|
||||
coverageLimitedCandidate === null
|
||||
? []
|
||||
: [
|
||||
{
|
||||
transmission,
|
||||
handler: coverageLimitedCandidate,
|
||||
coverageLimited: true,
|
||||
},
|
||||
],
|
||||
),
|
||||
];
|
||||
for (const { transmission, handler, coverageLimited } of wrapperCandidates) {
|
||||
const sources = projected.filter(
|
||||
(p) => p.path.entry_kind === "bridge-member" && matches(p, transmission),
|
||||
);
|
||||
@@ -160,15 +175,22 @@ export const addElectronCallPaths = (
|
||||
operation: "join-electron-wrapper-paths",
|
||||
properties: {
|
||||
channel: transmission.finding.channel,
|
||||
pairing_basis: "unique-exact-literal-channel",
|
||||
pairing_basis: coverageLimited
|
||||
? IPC_COVERAGE_LIMITED_PAIRING_BASIS
|
||||
: "unique-exact-literal-channel",
|
||||
resolution: "candidate",
|
||||
handler_path: to.file.path,
|
||||
bridge_conditions: from.path.conditions,
|
||||
handler_conditions: to.path.conditions,
|
||||
},
|
||||
limitations: [
|
||||
"The unique static channel match does not establish runtime registration, sender acceptance, or dispatch.",
|
||||
],
|
||||
limitations: coverageLimited
|
||||
? [
|
||||
"Incomplete source coverage may hide competing handlers; uniqueness of this observed channel match cannot be established.",
|
||||
"The match does not establish runtime registration, sender acceptance, or dispatch.",
|
||||
]
|
||||
: [
|
||||
"The unique static channel match does not establish runtime registration, sender acceptance, or dispatch.",
|
||||
],
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user