refactor: use canonical implementations and types directly
Remove forwarding wrappers and shadow aliases, migrate callers and verification scripts to their owners, and share one exhaustive semantic resource-bound projection.
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import canonicalize from "canonicalize";
|
||||
|
||||
import { digestCanonicalValue } from "./canonicalDigest.js";
|
||||
|
||||
/** Whether an inventory can support a claim that an item is absent. */
|
||||
export const absenceClaimable = (coverage: {
|
||||
readonly status: string;
|
||||
@@ -12,14 +10,6 @@ export const absenceClaimable = (coverage: {
|
||||
coverage.truncated !== true &&
|
||||
(coverage.omitted_count === undefined || coverage.omitted_count === 0);
|
||||
|
||||
/** SHA-256 of canonical JSON for stable, provider-neutral comparison IDs. */
|
||||
export const canonicalDigest = (
|
||||
value: unknown,
|
||||
context = "Comparison",
|
||||
): string => {
|
||||
return digestCanonicalValue(value, context);
|
||||
};
|
||||
|
||||
/** Canonical JSON used for deterministic tie breaking and stable digests. */
|
||||
export const canonicalJson = (
|
||||
value: unknown,
|
||||
|
||||
Reference in New Issue
Block a user