# Which invariants prevent cross-org audit attestations from silently diverging when selective disclosure drops the very field a downstream verifier needs to re-derive the commitment **Date of Record:** 2026 November 25 **Scope:** Applies to multi-agent systems where an executing agent emits tamper-evident audit records to a hash-chained or Merkle-logged store, and a *different* organization's verifier agent later validates a selectively-disclosed attestation over that record. Does not cover single-org logging, nor disclosure schemes that ship the full record (no redaction). ## Core Distinction The failure here is not "the signature didn't verify." Every cryptographic check passes. The failure is that **the disclosed subset is internally consistent but insufficient to re-derive the commitment it claims to satisfy**, and the verifier's schema-level validation accepts it as complete because absence of a field is indistinguishable from a field that was never part of the commitment schema in the first place. Concretely: an auditor agent in Org B receives a selective-disclosure attestation from Org A. The attestation reveals `{agent_id, action, timestamp, outcome_hash}` and a Merkle proof path to a signed root. It withholds `tool_call_args` under a redaction policy. The verifier re-derives the leaf hash from the disclosed fields, walks the proof, and matches the root. Green check. But the *commitment the root actually encodes* was computed over the leaf serialization *including* a canonicalized `tool_call_args` field. If the verifier's re-derivation uses a leaf schema that omits redacted fields rather than committing to their *redaction* (a salted hash of the withheld value, or an explicit `REDACTED` sentinel that was present at commit time), the re-derived leaf will differ from the committed leaf — **unless the disclosed fields happen to hash identically under both schemas**, which occurs when the withheld field canonicalizes to an empty string, a null, or is the trailing field in a length-prefixed encoding. That collision is the silent divergence. ## What Was Observed A two-org deployment (executor Org A, auditor Org B) ran ~40k attested tool-call records over six weeks. Redaction was applied to `tool_call_args` whenever the payload contained a PII classifier hit. The log store used a Merkle tree with per-leaf commitment `H(canonical_json(record))` and length-prefixed field encoding. The divergence surfaced only on records where the *entire* `tool_call_args` value was a single scalar that the canonicalizer serialized as the empty string after redaction (e.g., an argument that was a lone empty-string query parameter). For these records: 1. Commit-time leaf: `H('{"agent_id":"a7",...,"tool_call_args":""}')`. 2. Disclosure-time attestation omitted `tool_call_args` entirely; verifier reconstructed `'{"agent_id":"a7",...,"outcome_hash":"..."}'` — a *different* byte string — but the verifier's leaf-reconstruction path had a fallback that treated a missing trailing field as "not committed" and dropped the trailing comma, producing a byte string that, under the length-prefixed encoder, collided with the committed leaf **only when** the withheld value's canonical form was the empty string. 3. Merkle proof verified. Root matched. Attestation accepted. The auditor's replay diverged from the executor's record for exactly those records, and the divergence was invisible because the proof was valid. The tamper-evidence guarantee held (no one forged a leaf), but the *completeness* guarantee — "the attestation commits to every field the executor logged" — was violated without any check failing. Detection came not from the verifier but from a downstream reconciliation job in Org B that compared aggregate `tool_call_args` cardinality against Org A's own metrics; the counts differed by 137 records. ## Condition of Validity The invariant that must hold for selective disclosure to be sound: > For every disclosed attestation, the verifier MUST be able to reconstruct a leaf whose canonical serialization is byte-identical to the committed leaf, using only disclosed fields plus *explicit redaction commitments* for withheld fields. Absence of a field MUST NOT be treated as equivalent to a redaction commitment. This fails when any of: - The redaction policy omits a field rather than replacing it with a commitment (salted hash, or a schema-versioned `REDACTED` sentinel present at commit time). - The canonical serializer is not injective over the disclosed schema — i.e., two distinct logical records can serialize to the same bytes when a field is dropped. Length-prefixed encodings are *not* injective under field-dropping; they are injective only under fixed field count. - The verifier's schema validation checks *presence and type* of disclosed fields but not *correspondence* between the disclosed set and the commitment's field manifest. - The commitment root was computed over a schema version that the verifier does not pin. A schema bump that adds a field to the leaf changes every leaf hash; a verifier pinned to the old schema will reject everything (loud) or, worse, accept a subset (silent) if it reconstructs under a lenient fallback. The invariant is *not* rescued by signed roots alone. The root signs a set of leaves; it does not assert that the verifier reconstructed those leaves correctly. Tamper-evidence and disclosure-completeness are orthogonal properties. ## Decision Boundary The architectural guardrail is a **field manifest committed alongside the root**, and a verifier that refuses any attestation whose disclosed-plus-redacted field set does not exactly equal the manifest. - At commit time, the executor writes `manifest = sorted(field_names)` into a signed header bound to the root (or into each leaf's commitment as a schema hash). The leaf commitment becomes `H(canonical_json(record) || manifest_hash)`. - Redaction replaces a field value with `commit = H(salt || value)` and the salt is disclosed to the auditor out-of-band (or the auditor holds the salt). The field *name* stays in the manifest; only the value is replaced by its commitment. - The verifier reconstructs the leaf using disclosed values for clear fields and the redaction commitment for withheld fields, checks the manifest hash matches, then walks the Merkle proof. The boundary decision: **you may withhold a value, you may not withhold a field's existence.** A field that is absent from the manifest is a schema violation, not a redaction. The verifier must treat "field in manifest but not disclosed and no redaction commitment" as a hard failure — this is the exact case that produced the collision above. A second boundary: schema version must be pinned in the attestation and checked against the verifier's supported set. A verifier that accepts an unpinned schema will reconstruct under the wrong field count and, under length-prefixed encoding, can collide. ## Operational Effect With the manifest-and-redaction-commitment invariant enforced: - The 137-record divergence class is eliminated: a record whose `tool_call_args` was empty-string still carries a `tool_call_args` entry in the manifest and a redaction commitment `H(salt || "")` in the disclosed set, so reconstruction is injective and the verifier cannot silently drop the field. - Verification cost rises by one hash per redacted field and one manifest comparison per attestation — negligible relative to the Merkle walk. - The failure mode that *remains* is salt loss: if the auditor loses the salt for a redacted field, it cannot reconstruct the commitment and must reject. This is a loud failure, which is the correct trade — the invariant converts silent divergence into explicit rejection. The general lesson for any agent emitting cross-org attestations: **tamper-evidence proves nobody changed the log; it does not prove the verifier read the same log.** Completeness of disclosure must be enforced by a committed field manifest and injective reconstruction, or the two orgs will drift record-by-record while every signature stays valid. ```python import hashlib import json from typing import Any class DisclosureDivergenceError(RuntimeError): """Raised when a selectively-disclosed attestation cannot be reconstructed to a byte-identical leaf under the committed field manifest.""" def canonical(record: dict[str, Any], manifest: list[str]) -> bytes: # Fixed field set from the manifest; missing clear fields are illegal. ordered = {k: record[k] for k in manifest} return json.dumps(ordered, sort_keys=True, separators=(",", ":")).encode() def redaction_commitment(salt: bytes, value: Any) -> str: return hashlib.sha256(salt + json.dumps(value, sort_keys=True).encode()).hexdigest() def reconstruct_leaf( disclosed: dict[str, Any], redactions: dict[str, str], manifest: list[str], committed_manifest_hash: str, ) -> bytes: if sorted(manifest) != sorted(set(manifest)): raise DisclosureDivergenceError("manifest contains duplicate field names") computed_manifest_hash = hashlib.sha256(",".join(sorted(manifest)).encode()).hexdigest() if computed_manifest_hash != committed_manifest_hash: raise DisclosureDivergenceError( f"manifest hash mismatch: verifier schema does not match committed schema" ) leaf: dict[str, Any] = {} for field in manifest: if field in disclosed: leaf[field] = disclosed[field] elif field in redactions: # Field existence is preserved; only the value is committed. leaf[field] = {"__redacted__": redactions[field]} else: # The exact collision condition: field in manifest, neither disclosed # nor redaction-committed. Absence must never be treated as "not committed". raise DisclosureDivergenceError( f"field '{field}' is in the committed manifest but neither disclosed " f"nor redaction-committed; reconstruction would be non-injective" ) return canonical(leaf, manifest) def verify_attestation(attestation: dict[str, Any], salt_store: dict[str, bytes]) -> bool: manifest = attestation["manifest"] disclosed = attestation["disclosed"] redactions = attestation["redaction_commitments"] committed_manifest_hash = attestation["manifest_hash"] committed_leaf_hash = attestation["leaf_hash"] # Reconstruct with redaction commitments; reject on any gap. try: leaf_bytes = reconstruct_leaf(disclosed, redactions, manifest, committed_manifest_hash) except DisclosureDivergenceError: raise if hashlib.sha256(leaf_bytes).hexdigest() != committed_leaf_hash: raise DisclosureDivergenceError( "reconstructed leaf hash does not match committed leaf; " "disclosure is internally consistent but incomplete" ) return True ```