refactor(domain): converge comparison mechanics on shared vocabulary (#824)

Delete the private canonicalJson duplicate in
functionComparisonNormalization in favor of comparisonSemantics
(same canonicalize behavior via the context parameter).
Add comparisonStatus as the single owner of the canonical
unchanged/changed/unknown triple and conclusion vocabulary, with
mappers pinning every pipeline-native status; adopt the shared
triple schema where wire-identical (bundle result, scenario
overall/step). Native detail enums and collation choices stay
untouched.
This commit is contained in:
morluto
2026-10-07 11:40:24 +08:00
committed by GitHub
parent 6aa6350c80
commit c13c9d41f8
4 changed files with 161 additions and 12 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import {
import type { ResidualUnknown } from "./residualUnknown.js";
import { digestSchema } from "./../domain/digests.js";
import { prefixedDigestSchema } from "./../domain/digests.js";
import { comparisonStatusSchema } from "./comparisonStatus.js";
const evidenceIdSchema = prefixedDigestSchema("ev");
const classificationSchema = z.enum([
@@ -53,7 +54,7 @@ const bundleChangeSchema = z.object({
/** Deterministic classified delta between two canonical Evidence bundles. */
export const bundleComparisonResultSchema = z.object({
status: z.enum(["unchanged", "changed", "unknown"]),
status: comparisonStatusSchema,
left_bundle_sha256: digestSchema,
right_bundle_sha256: digestSchema,
summary: z.object({