From e32bb0e3acbbb84fa5ed024406a3aa59a761c943 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Fri, 4 Dec 2026 09:56:18 +0800 Subject: [PATCH] refactor(evidence): derive artifact comparison status from counts (#16531) --- src/domain/artifactComparison.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/domain/artifactComparison.ts b/src/domain/artifactComparison.ts index a6064a0b773..22dc5205f9c 100644 --- a/src/domain/artifactComparison.ts +++ b/src/domain/artifactComparison.ts @@ -211,17 +211,13 @@ export const compareArtifacts = ( status: !leftComplete || !rightComplete ? "truncated" - : changes.some( - ({ classification }) => classification === "contradiction", - ) + : summary.contradiction > 0 ? "contradiction" - : !fullyCovered + : !fullyCovered || summary.unknown > 0 ? "unknown" - : changes.some(({ classification }) => classification === "unknown") - ? "unknown" - : changes.length === 0 - ? "unchanged" - : "changed", + : changes.length === 0 + ? "unchanged" + : "changed", left_manifest_id: left.inventory.manifest.manifest_id, right_manifest_id: right.inventory.manifest.manifest_id, summary,