# Which invariants prevent attestation-provenance skew when an agent's identity claim is bound to a model, tool, and runtime tuple that silently disagrees with the actual executing substrate **Date of Record:** 2026 November 25 **Scope:** Applies to agents whose identity attestations (signed claims, capability warrants, or A2A/MCP identity documents) bind a specific model version, tool manifest, and runtime image digest into a single verifiable tuple. Does not cover unauthenticated single-shot inference, nor deployments where no downstream verifier consumes the tuple. ## Core Distinction An identity attestation is a *claim about a substrate*, not a description of the executing process. The failure mode here is not forgery — signatures verify. It is **provenance skew**: the tuple `(model_id, tool_manifest_hash, runtime_digest)` that a verifier checks diverges from the tuple that actually executes, while every individual field remains individually plausible and the signature remains valid over the *claimed* tuple. The skew is invisible to any verifier that checks only the attestation and never the substrate. The non-obvious part: skew is *produced by legitimate lifecycle events*. Model weight hot-swaps under a stable `model_id`, tool manifest additions that don't bump a semantic version, and base-image patches that preserve a tag all mutate the executing substrate without mutating the claimed tuple. The attestation was true when signed; it is false when consumed. Nothing in the signing path detects this, because the signing path never re-reads the substrate. ## What Was Observed A three-agent pipeline (planner → executor → auditor) used signed identity documents to gate tool access. The executor's attestation claimed `model_id: "m-7b-instruct@2024-11"`, `tool_manifest_hash: 0x9a…`, `runtime_digest: sha256:4f2c…`. The auditor verified the signature over the tuple and admitted the executor. During a rolling deployment, the executor's pod was rescheduled onto a node whose runtime image had been patched (same tag `agent-runtime:stable`, new digest `sha256:7b81…`) and whose model loader had fallen back to a quantized checkpoint registered under the *same* `model_id` because the registry keyed on logical name, not weight hash. The tool manifest was unchanged, but the quantized model emitted a slightly different JSON schema for one tool call (`"limit": 10` vs `"limit": "10"`), which the executor's own schema validator tolerated. The auditor's replay of the executor's trace diverged: the auditor, running on the original substrate, rejected the string-typed `limit` and produced a different downstream plan. The auditor flagged the executor as *dishonest* — a consensus conflict — when in fact both agents were honest and the substrate had skewed. The signature over the claimed tuple verified perfectly the entire time. ## Condition of Validity The invariant that must hold is **substrate-claim equivalence at consumption time**, not at signing time: > For every attestation consumed by a verifier V, the tuple V checks MUST equal the tuple measured from the executing substrate at the moment of the verified action, and the equality MUST be re-established per action, not per session. This requires three conditions that are individually cheap and jointly sufficient: 1. **Content-addressed identity, not tag-addressed.** `model_id` must resolve to a weight digest; `runtime_digest` must be the image digest, never the tag; `tool_manifest_hash` must hash the *resolved* manifest including defaults and type coercions, not the authored YAML. 2. **Measurement at action boundary.** The substrate tuple is re-measured inside the execution sandbox immediately before each attested action (tool call, handoff, checkpoint write), and the measurement is included in the action's signed envelope — not inherited from session start. 3. **Divergence is a hard stop, not a warning.** If measured ≠ claimed, the action is refused and the attestation is *revoked*, not downgraded. A skew that is tolerated once is tolerated forever, because the skew persists across the rolling deployment. The condition fails silently whenever any one of the three is relaxed. Content addressing alone does not help if it is measured only at boot. Per-action measurement does not help if the identity is a tag that resolves to a moving digest. ## Decision Boundary The boundary between *acceptable staleness* and *provenance skew* is drawn at whether the divergence can change an observable output of the attested action. Concretely: - A runtime patch that changes only logging verbosity does not cross the boundary — the measured digest differs, but no attested semantic output can differ. Operators may whitelist digest deltas whose build manifest proves output-equivalence. - A model weight change under a stable logical name **always** crosses the boundary, even at "minor" quantization, because token-level sampling distributions shift and tool-call argument types can change (as observed above). - A tool manifest change that alters a default value or a type coercion **always** crosses the boundary, because it changes the bytes the agent emits for an unchanged intent. The decision rule for the verifier: if the measured-vs-claimed delta is not covered by a signed output-equivalence proof, refuse. There is no "small enough" skew for semantic fields. The auditor's mistake in the observed incident was treating the divergence as a *peer disagreement* to be resolved by consensus rather than as a *provenance violation* to be rejected at the boundary — consensus among agents on skewed substrates converges on the wrong answer. ## Operational Effect Enforcing the invariant converts a silent, persistent mis-attribution into a loud, bounded, per-action refusal. The operational consequences: - **Rolling deployments become fail-closed.** A node that reschedules onto a patched image will refuse attested actions until its attestation is re-issued against the new digest. This is the intended cost: the alternative is a fleet that silently drifts off its warrants. - **Fallback paths must re-attest.** Any model-loader fallback (quantization, smaller checkpoint, degraded tool stub) must mint a *new* tuple and re-sign, or refuse. Fallbacks that reuse the logical `model_id` are the single most common source of skew. - **Auditor consensus must be substrate-aware.** When two agents disagree, the first check is tuple equality, not argument quality. Disagreement across unequal substrates is expected and must be routed to re-attestation, not to a consensus vote. - **Checkpoint/resume must re-measure.** A resumed task inherits the *claimed* tuple from its checkpoint but must re-measure the *actual* substrate before the next attested action; otherwise a resume after a reschedule silently re-admits skew. The guardrail is a single function at the action boundary that measures, compares, and raises on divergence — never returns a boolean that callers can ignore. ```python import hashlib from dataclasses import dataclass class ProvenanceSkewError(RuntimeError): """Raised when the measured substrate tuple diverges from the attested tuple.""" @dataclass(frozen=True) class SubstrateTuple: model_weight_digest: str tool_manifest_hash: str runtime_image_digest: str def canonical(self) -> bytes: return "|".join( (self.model_weight_digest, self.tool_manifest_hash, self.runtime_image_digest) ).encode() @dataclass(frozen=True) class Attestation: claimed: SubstrateTuple signature: bytes # verifies over claimed.canonical(); validity is not the issue here def measure_substrate(sandbox) -> SubstrateTuple: # Re-measured per action, inside the sandbox, from content-addressed sources. return SubstrateTuple( model_weight_digest=sandbox.hash_loaded_weights(), tool_manifest_hash=sandbox.hash_resolved_tool_manifest(), runtime_image_digest=sandbox.image_digest(), # digest, never tag ) def admit_attested_action( attestation: Attestation, sandbox, output_equivalence_proof=None, ) -> SubstrateTuple: measured = measure_substrate(sandbox) if measured == attestation.claimed: return measured if output_equivalence_proof is not None: if not output_equivalence_proof.covers(attestation.claimed, measured): raise ProvenanceSkewError( f"claimed {attestation.claimed} != measured {measured}; " f"equivalence proof does not cover delta" ) return measured # Semantic-field divergence with no signed output-equivalence proof: refuse. raise ProvenanceSkewError( "substrate-claim divergence at action boundary: " f"claimed={attestation.claimed.canonical().hex()} " f"measured={measured.canonical().hex()}; " "revoke attestation and re-issue against measured tuple" ) ```