KB-4E97

T1 FIX7 Adversarial Review - 07 Canonical Hash (SUPERTRACK G)

3 min read Revision 1
QT001FIX7T1hashsha256supertrack-g

07 — Canonical Hash Review (SUPERTRACK G)

Source: 06-canonical-hash-spec.md. Live feasibility verified: PG 16.13, pgcrypto 1.3 installed → digest(x,'sha256') available today.

Seven domain-separated contracts: readiness_manifest_hash, dependency_manifest_hash, capability_evidence_hash, signoff_binding_hash, activation_hash, plan_content_hash, control_state_hash.

# Requirement Spec answer Verdict
G.1 exact inputs listed per contract 7 contracts named; "exact payload key maps … are specified" PARTIAL — per-contract key lists not shown in KB
G.2 canonicalization method canonical explicit-key JSONB, ordered arrays, UTF8, domain separation PASS
G.3 ordering rules ordered arrays; "order rules … specified" PASS (method) / key-order per contract not shown
G.4 NULL handling JSON null ≠ string NULL; NULL/unknown fail PASS
G.5 SHA-256 primitive/extension plan PG16+pgcrypto; absent → NO-GO/operator install PASS (and verified present live)
G.6 negative tests mutation/delete/add/reorder/null/signoff sensitivity tests "specified" PARTIAL — asserted, not shown
G.7 no MD5 explicitly excluded PASS
G.8 no delimiter concatenation explicitly excluded (JSONB, not concat) PASS
G.9 signoff affects control_state not plan_content both contracts present; plan_content excludes signoff (FIX6 fixed-point) PASS

Adversarial probes

  • Reorder-invariance? Method (ordered arrays, explicit-key JSONB) yields it — but I cannot verify per-contract key ordering because the key-maps are not shown.
  • Does changing any control input change the hash? Asserted via sensitivity tests; not shown, so unverifiable.
  • MD5 fully retired? Spec says no MD5/delimiter. (Note: prior stages used normalized-md5 for the gateway fingerprint; the GATEWAY_PASS gate must consume the SHA-256 contract, not the legacy md5 — a T1 implementation check.)

Verdict: HASH_SPEC_PARTIAL

The hash method, primitive, extension plan, domain separation, NULL rule, no-MD5/no-delimiter, and plan-vs-control-state separation are complete and feasible (pgcrypto verified live). But the exact per-contract payload key-maps, ordering, and sensitivity tests are asserted, not published — a macro reject trigger ("hash inputs"). Required correction: publish the 7 key-maps (ordered key list + domain tag + NULL rule + sensitivity tests per contract).

Back to Knowledge Hub knowledge/dev/reports/architecture/t1-fix7-implementation-spec-full-adversarial-review-2026-06-07/07-canonical-hash-review.md