fix(analysis): preserve relationship coverage across evidence and replay

Separate observed relationship coverage from general provider caveats. Authenticate and replay coverage without changing legacy Evidence IDs; expose unknown and capped relationship sets through CLI/MCP graphs and traces.

Validated focused domain, snapshot, IDA/Ghidra boundary, MCP, schema, package and static checks. Provider fixtures establish contract behavior; licensed engine behavior was not reverified.
This commit is contained in:
morluto
2026-10-12 05:57:35 +08:00
parent f1924cf9c1
commit 9c8511409c
24 changed files with 469 additions and 55 deletions
+12 -1
View File
@@ -40,6 +40,7 @@ const snapshotWithHistoricalEvidence = () => {
raw_result: null,
provider: binding.provider,
limitations: [],
relationship_coverage: null,
locations: [],
subject: {
path: ANALYSIS_SNAPSHOT_TARGET.path,
@@ -392,7 +393,10 @@ describe("analysis snapshot Evidence binding", () => {
workflow_entries: [],
evidence_bundle: createEvidenceBundle([evidence]),
};
expect(parseAnalysisSnapshot(snapshot)).toEqual(snapshot);
const parsedLegacySnapshot = parseAnalysisSnapshot(snapshot);
expect(
parsedLegacySnapshot.entries[0]?.execution.relationship_coverage,
).toBeNull();
expect(() =>
parseAnalysisSnapshot({
@@ -420,6 +424,13 @@ describe("analysis snapshot Evidence binding", () => {
if (subject !== null && subject !== undefined)
subject.path = "/different/path";
},
(altered: typeof snapshot) => {
const entry = altered.entries[0];
if (entry === undefined) throw new TypeError("missing fixture entry");
Reflect.set(entry.execution, "relationship_coverage", {
status: "complete",
});
},
];
for (const alter of alterations) {
const altered = structuredClone(snapshot);