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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user