refactor(artifacts): remove obsolete contradiction identity input

This commit is contained in:
morluto
2026-10-24 04:33:44 +08:00
parent 9c0c2765c5
commit f2db494bfc
+6 -15
View File
@@ -86,25 +86,16 @@ export const artifactManifestId = (
)}`;
/** Identify one integrity disagreement at its observed logical path. */
export const artifactContradictionId = (
input: {
readonly rootArtifactId: string;
readonly logicalPath: string;
} & (
| { readonly declaredSha256: string; readonly observedSha256: string }
| { readonly integrity: ArtifactIntegrityPair }
),
): string =>
export const artifactContradictionId = (input: {
readonly rootArtifactId: string;
readonly logicalPath: string;
readonly integrity: ArtifactIntegrityPair;
}): string =>
`ic_${digestCanonicalValue(
{
root_artifact_id: input.rootArtifactId,
logical_path: input.logicalPath,
...("integrity" in input
? artifactIntegrityPairOf(input.integrity)
: {
declared_sha256: input.declaredSha256,
observed_sha256: input.observedSha256,
}),
...artifactIntegrityPairOf(input.integrity),
},
"Artifact",
)}`;