# How should an instance reconcile a tamper-evident federated audit log when a peer org's attestation chain forks at a checkpoint it never witnessed **Date of Record:** 2026 November 26 **Scope:** Applies to multi-org agent deployments where each org emits append-only, hash-chained audit logs of agent actions and exchanges signed checkpoint attestations with peers. Does not cover single-org audit logging, or federations where a trusted timestamping authority provides a single canonical ordering. ## Core Distinction A federated audit log is *tamper-evident* per-org (a hash chain detects modification within one log) but only *fork-evident* across orgs if every replay path from a known anchor to a new checkpoint is witnessed and cross-attested. The boundary failure is not "a record was altered" — it is "two internally valid attestation chains exist for the same org, both verifying against their own anchors, and the receiving instance has no local witness that distinguishes which fork is canonical." The instance cannot detect tampering by verifying signatures; it can only detect it by proving *absence of a divergent branch*, which requires evidence it may not hold. ## What Was Observed An auditor instance in Org C maintained a local cache of the last cross-attested checkpoint it had personally witnessed from Org A: `C_A(k) = (seq=k, hash=h_k, sig_A, witness_sig_C)`. During a long-running multi-agent task, Org A's agent fleet suffered a mid-task checkpoint-resume failure: the primary log writer crashed after committing records up to `seq=k+40` but before propagating the checkpoint to peers. On resume, a replica with a stale local copy of the chain replayed from `seq=k+1` with *different* record contents (different tool-call outputs, because the replay re-executed non-deterministic tools), producing a second chain `h'_{k+1..k+40}` that diverged from the crashed writer's `h_{k+1..k+40}`. Both chains are hash-valid from `k`. Org A later signed a checkpoint at `seq=k+40` over the *replayed* branch and pushed it to Org C. Org C's verifier now holds: - its own witnessed anchor `C_A(k)` with `h_k`, - a new signed checkpoint `C_A(k+40)` whose chain verifies back to `h_k` (the replay branch is internally consistent), - but the *original* branch's records were never delivered and its checkpoint never witnessed. Verification succeeds. The instance silently accepts the replayed branch, and the divergence — the actual evidence of the resume failure — is erased from the federated view. The failure mode is a **silent fork acceptance at an unwitnessed checkpoint gap**, not a signature failure. ## Condition of Validity Cross-org tamper-evidence holds only under the **contiguous-witness invariant**: for every checkpoint at sequence `s` that an instance accepts, it must possess a witnessed chain of checkpoints covering every sequence from its last trusted anchor to `s`, with no gap in which the peer could have produced a divergent branch. Formally, acceptance of `C_A(s)` is valid iff there exists a witnessed sequence `k = s_0 < s_1 < ... < s_n = s` such that each `C_A(s_i)` was locally witnessed (or cross-attested by a quorum the instance trusts) and `hash(C_A(s_i))` is committed in `C_A(s_{i+1})`. The invariant fails precisely when `s - k` exceeds the peer's checkpoint cadence and the instance accepts a checkpoint spanning an unwitnessed interval. This is a *liveness-versus-safety* trade: tightening cadence to eliminate gaps increases handshake traffic proportional to agent action rate. ## Decision Boundary The instance must choose between three responses when it detects a checkpoint whose covered interval exceeds its witnessed coverage: 1. **Reject-and-request-backfill** (safe, non-live): refuse the checkpoint, demand the full record range `(k, s]` plus intermediate checkpoints, and re-verify the chain. Correct but blocks the agent task until backfill completes; if the peer's original branch is gone (as above), backfill returns the replayed branch and the instance cannot distinguish it from the original — rejection alone does not restore safety. 2. **Quorum-cross-attestation** (safe, live): accept only checkpoints carrying attestations from a quorum of independent peers, at least one of which the instance has a witnessed anchor with. This bounds fork risk to the probability that a majority of the quorum colluded or shared the same resume failure — low if peers are independently operated, but the quorum must include an org that witnessed the *pre-crash* branch. 3. **Accept-and-flag** (live, unsafe): accept the checkpoint and record a divergence-suspicion flag. Appropriate only when the action being audited is reversible and the flag triggers asynchronous reconciliation. The boundary is: if the instance lacks any witnessed anchor within the gap and no quorum peer attests the pre-gap branch, options 1 and 3 are both unsafe — the only sound move is to treat the peer's log as *forked-unknown* and quarantine its attestations until an out-of-band witness (e.g., a timestamping authority or a peer that held the pre-crash checkpoint) resolves the branch. ## Operational Effect Instances that accept unwitnessed checkpoint gaps exhibit *audit-log laundering*: a resume failure or deliberate rewrite in one org becomes invisible to every peer that accepted the post-gap checkpoint, and the federated log's tamper-evidence degrades to per-org-only without any signal. The observable symptom is a sudden jump in accepted checkpoint sequence delta combined with a checkpoint whose covered record range was never locally stored. The guardrail is to make checkpoint cadence a negotiated protocol parameter bounded by the maximum gap the federation tolerates, to require quorum cross-attestation for any checkpoint spanning more than one cadence interval, and to maintain a local `witnessed_anchor` per peer that is only advanced by locally verified contiguous checkpoints — never by a checkpoint that merely verifies against a distant anchor. ```python import hashlib from dataclasses import dataclass class UnwitnessedForkError(RuntimeError): """Raised when a peer checkpoint spans an interval with no locally witnessed coverage.""" @dataclass(frozen=True) class Checkpoint: org: str seq: int chain_hash: str prev_hash: str quorum_attestations: frozenset # orgs that signed this checkpoint class FederatedAuditVerifier: def __init__(self, max_gap: int = 1): self.max_gap = max_gap self.witnessed_anchor = {} # org -> (seq, chain_hash) def witness(self, cp: Checkpoint) -> None: self.witnessed_anchor[cp.org] = (cp.seq, cp.chain_hash) def accept(self, cp: Checkpoint, trusted_quorum: frozenset) -> None: anchor = self.witnessed_anchor.get(cp.org) if anchor is None: raise UnwitnessedForkError( f"no witnessed anchor for org {cp.org}; cannot bound fork risk" ) anchor_seq, anchor_hash = anchor if cp.prev_hash != anchor_hash and cp.seq != anchor_seq: # chain does not extend the anchor we actually witnessed if cp.seq - anchor_seq > self.max_gap: quorum_ok = len(cp.quorum_attestations & trusted_quorum) >= len(trusted_quorum) // 2 + 1 if not quorum_ok: raise UnwitnessedForkError( f"checkpoint {cp.org}@{cp.seq} spans gap " f"{anchor_seq}->{cp.seq} without quorum cross-attestation; " f"possible silent fork from resume failure" ) self.witness(cp) ```