fix(artifacts): preserve inventory uncertainty in application projections

This commit is contained in:
morluto
2026-10-13 07:52:54 +08:00
parent 951b095e11
commit d8ceb3f276
11 changed files with 116 additions and 16 deletions
+3 -4
View File
@@ -8,6 +8,7 @@ import type {
} from "./artifactGraph.js";
import { evidenceSchema } from "./evidence.js";
import {
hasCompleteInventoryCoverage,
parseArtifactInventoryEvidence,
type InventorySet,
} from "./artifactInventoryEvidence.js";
@@ -103,10 +104,8 @@ export const compareArtifacts = (
const right = parseArtifactInventoryEvidence(rightEvidence);
const leftComplete = left.inventory.complete;
const rightComplete = right.inventory.complete;
const leftCovered =
leftComplete && left.inventory.coverage_status === "complete";
const rightCovered =
rightComplete && right.inventory.coverage_status === "complete";
const leftCovered = hasCompleteInventoryCoverage(left.inventory);
const rightCovered = hasCompleteInventoryCoverage(right.inventory);
const limitations = [
...left.inventory.limitations.map((item) => `Left: ${item}`),
...right.inventory.limitations.map((item) => `Right: ${item}`),