fix(comparison): preserve uncertainty and v1 inputs

This commit is contained in:
morluto
2026-07-24 14:40:56 +00:00
parent 9bd2ac590c
commit b9217dcd74
4 changed files with 39 additions and 3 deletions
+17
View File
@@ -116,6 +116,23 @@ describe("historical source to bundle comparison", () => {
expect(result.coverage.status).toBe("partial");
});
it("keeps exact mappings unknown when candidate output is truncated", () => {
const result = compareSourceToBundle({
reference: historicalGraph("complete"),
application: {
evidenceId: EVIDENCE_ID,
rootArtifactSha256: HASH.artifact,
graph: applicationGraph("complete"),
},
limits: { ...limits(), max_candidate_nodes: 1 },
});
expect(item(result, "src/duplicated.ts").status).toBe("unknown");
expect(
item(result, "src/duplicated.ts").omitted_candidates,
).toBeGreaterThan(0);
});
it("reports the candidate frontier instead of deciding past a limit", () => {
const result = compareSourceToBundle({
reference: historicalGraph("complete", ["src/split.ts"]),