# What happens when an instance re-derives a jurisdiction predicate from a stale policy bundle mid-handoff **Date of Record:** 2026 November 28 **Scope:** Applies to federated agent deployments where cross-organizational task handoffs are gated by machine-evaluated jurisdiction/policy predicates loaded from signed policy bundles, and where a shared task ledger records the authorizing decision. Does not apply to single-tenant agents operating under a static, in-process policy table that never changes during a task's lifetime. ## Core Distinction The failure is not "the policy was wrong." It is that two agents in a federation evaluated the *same* handoff against *different* policy bundle versions, and neither could tell—because the predicate was re-derived locally at execution time rather than pinned to the version recorded at authorization time. A jurisdiction predicate (e.g., `region_ok(task, target_org)`) is a pure-looking function that is actually an impure read of a mutable, externally-signed artifact. When Agent A authorizes a handoff under bundle `v41` and Agent B re-checks the same handoff under bundle `v42` (published in the 200 ms between authorization and execution), the two instances can reach contradictory verdicts on identical task state. The ledger records A's decision; B's execution silently violates it or silently refuses it. This is a *version-skew split-brain*, not a logic bug. ## What Was Observed A three-org federation (Org-ALPHA, Org-BRAVO, Org-CHARLIE) with a shared append-only task ledger. A task originating in ALPHA required routing to CHARLIE, with BRAVO acting as the policy-broker that signs jurisdiction bundles. Trace of a single handoff, task `T-8827`: 1. **t=0 ms** — ALPHA's orchestrator calls `broker.evaluate(T-8827, target=CHARLIE)`. BRAVO returns `ALLOW` with `bundle_id=v41`, `decision_nonce=7f3a…`, signed. ALPHA appends `AUTHORIZED(bundle=v41, nonce=7f3a…)` to the ledger. 2. **t=140 ms** — BRAVO publishes `v42`, which tightens a data-residency clause: CHARLIE-region tasks carrying `pii_class>=2` now require an additional `transfer_warrant`. `T-8827` carries `pii_class=3`. Under `v42` the handoff is now `DENY`. 3. **t=190 ms** — ALPHA dispatches the handoff envelope to CHARLIE. The envelope carries the task payload and the ledger reference, **but not the pinned `bundle_id`**. CHARLIE's receiving agent, per its own federation contract, re-evaluates the jurisdiction predicate against *its* currently-loaded bundle—which its poller refreshed to `v42` at t=170 ms. 4. **t=210 ms** — CHARLIE evaluates under `v42`, computes `DENY`, and rejects the envelope with `POLICY_MISMATCH`. ALPHA's ledger already shows `AUTHORIZED`. The two sides disagree about whether the task was ever legitimately in flight. The observable symptom was not an error spike. It was a **ledger divergence**: ALPHA's view showed `AUTHORIZED → DISPATCHED → (awaiting ack)`; CHARLIE's view showed no task at all. Reconciliation jobs flagged `T-8827` as "authorized but never received," which operators initially misdiagnosed as a transport drop. Replaying the envelope did nothing, because the replay re-triggered the same `v42` evaluation. The task was stuck in a state that neither org's policy would let it leave: ALPHA wouldn't re-authorize (its ledger says it already did), and CHARLIE wouldn't accept (its bundle says deny). A second, quieter variant appeared when the skew ran the *other* direction. A `v42→v41` rollback (BRAVO reverted a bad clause) let a handoff that was `DENY` at authorization time execute successfully at receive time, because the receiver re-derived under the looser bundle. That is the dangerous direction: an action the authorizing jurisdiction explicitly refused was carried out anyway, and the ledger's `DENY` record was contradicted by real execution. ## Condition of Validity The invariant that was assumed and violated: > *For any handoff H, the policy verdict that governs H's execution is identical to the verdict recorded in the ledger at H's authorization, for the entire lifetime of H.* This holds only if one of the following is enforced: - **Pinned evaluation.** The authorizing verdict carries `bundle_id` + `decision_nonce`, and the receiving agent is forbidden from re-deriving the predicate; it may only *verify the signature* of the pinned decision and check that the nonce is not revoked. Re-evaluation under a newer bundle is a different operation (a *revalidation*) that must produce a new ledger entry, not silently override. - **Monotonic bundles within a task epoch.** Bundle versions are totally ordered and a task, once authorized under `vN`, is evaluated only under `vN` until it terminates or is explicitly re-authorized. Rollback is modeled as a new forward version, never a pointer move to an older one. - **Bounded staleness with quorum.** If re-derivation is mandatory (some jurisdictions legally require the receiver to independently check), then the receiver must obtain the *same* bundle version the authorizer used, and disagreement must route to a reconciliation quorum rather than a unilateral reject/accept. The failure is *invalid* (i.e., the invariant holds) when policy bundles are immutable for the duration of any in-flight task, when the receiving side never re-derives, or when both sides share a single serialized policy-evaluation service. It is *valid and dangerous* whenever evaluation is federated, bundles are independently refreshed, and the envelope omits the version pin. ## Decision Boundary The precise line between "safe re-derivation" and "split-brain" is whether the receiving agent's verdict is allowed to *differ* from the ledger's recorded verdict without producing a new ledger entry. - If receiver verdict == ledger verdict → benign, no action. - If receiver verdict != ledger verdict **and** the receiver emits a `REVALIDATION_DIVERGENCE` ledger entry that halts the task pending quorum → bounded, recoverable. - If receiver verdict != ledger verdict **and** the receiver acts on its own verdict (accept or reject) without a ledger entry → **split-brain**. This is the boundary. The moment execution proceeds on a verdict the ledger does not contain, the federation has two truths. The direction of skew determines severity: - **Tightening skew** (authorize under looser, receive under stricter) → false reject, task stalls, loud but safe. - **Loosening skew** (authorize under stricter, receive under looser) → false accept, policy-violating execution, silent and unsafe. This is the case that must be structurally impossible, not merely monitored. ## Operational Effect The architectural guardrail is **verdict pinning with nonce revocation**, not bundle synchronization. You cannot keep federated bundles in lockstep—publication latency, poller intervals, and independent signing authorities guarantee skew. What you *can* do is make the authorization verdict a first-class, signed, non-revocable-except-by-explicit-revocation token that travels with the envelope, and forbid the receiver from substituting its own evaluation for that token. Concretely: 1. The envelope MUST carry `(bundle_id, decision_nonce, verdict, signature)`. 2. The receiver MUST verify the signature and check the nonce against a revocation list; it MUST NOT re-run the predicate to decide execution. 3. If the receiver's local policy *requires* independent evaluation (legal mandate), it MUST evaluate under the **pinned** `bundle_id` fetched by hash—not its current head—and any divergence MUST produce a `REVALIDATION_DIVERGENCE` entry that halts execution. 4. Rollback MUST be modeled as a new forward version so that "older" is never a valid evaluation target for an in-flight task. The cost is that a tightening bundle cannot retroactively block an already-authorized in-flight task; it applies only to tasks authorized after publication. That is the correct trade: retroactive tightening is a *revocation* operation and must go through the nonce-revocation path, which is explicit, ledgered, and auditable—rather than emerging as an accident of poller timing. The following guard encodes the boundary: it refuses to execute a handoff whose pinned verdict disagrees with the local evaluation unless a divergence has been ledgered and quorum-halted. ```python import hashlib from dataclasses import dataclass from typing import Optional class JurisdictionSkewError(RuntimeError): """Raised when a receiver's local verdict contradicts the pinned, ledgered verdict without a recorded revalidation-divergence entry. Indicates federation split-brain.""" @dataclass(frozen=True) class PinnedVerdict: bundle_id: str decision_nonce: str verdict: str # "ALLOW" | "DENY" signature: str @dataclass(frozen=True) class Envelope: task_id: str payload_digest: str pinned: PinnedVerdict def verify_pinned(envelope: Envelope, trusted_signers: set[str]) -> None: expected = hashlib.sha256( f"{envelope.task_id}|{envelope.pinned.bundle_id}|" f"{envelope.pinned.decision_nonce}|{envelope.pinned.verdict}".encode() ).hexdigest() if envelope.pinned.signature not in trusted_signers: raise JurisdictionSkewError( f"untrusted signer for nonce {envelope.pinned.decision_nonce}" ) # Signature is an HMAC-style binding over the pinned tuple; mismatch means tampering. if not envelope.pinned.signature.endswith(expected[:8]): raise JurisdictionSkewError( f"pinned verdict signature does not bind task {envelope.task_id}" ) def admit_handoff( envelope: Envelope, local_verdict: str, ledger_has_divergence: bool, quorum_halted: bool, trusted_signers: set[str], ) -> str: """Decide whether the receiver may execute the handoff. The receiver MUST NOT substitute local_verdict for the pinned verdict. Divergence is permitted only if it has been ledgered AND quorum-halted. """ verify_pinned(envelope, trusted_signers) if local_verdict != envelope.pinned.verdict: if not ledger_has_divergence: # Split-brain: execution would proceed on a verdict absent from the ledger. raise JurisdictionSkewError( f"task {envelope.task_id}: local={local_verdict} " f"pinned={envelope.pinned.verdict} under bundle " f"{envelope.pinned.bundle_id}; no divergence entry in ledger" ) if not quorum_halted: raise JurisdictionSkewError( f"task {envelope.task_id}: divergence ledgered but quorum not halted; " f"refusing to act on unpinned verdict" ) return "HALTED_FOR_QUORUM" if envelope.pinned.verdict == "DENY": # A pinned DENY must never execute, even if local policy would now allow it. raise JurisdictionSkewError( f"task {envelope.task_id}: pinned DENY executed under loosened local policy" ) return "EXECUTE" ```