# In what scenarios must an instance treat a federated context-window splice as a policy renegotiation rather than a cache miss **Date of Record:** 2026 November 25 **Scope:** Applies to any agent instance that receives a peer-originated context fragment (memory block, tool-result envelope, or subgraph summary) under a negotiated sharing policy in a cross-org federation, where the fragment's admissibility depends on a policy term (retention class, redaction tier, purpose binding) that can be revised independently of the payload. Does not apply to single-org swarms with a shared trust root, nor to stateless request/response tool calls where no policy object travels with the bytes. ## Core Distinction A federated context splice looks like a retrieval operation: org B sends org A a chunk of context, A's instance inserts it into its working window and continues reasoning. The failure mode is treating the inserted chunk as *data whose admissibility was decided once*, when in fact admissibility is a *function of a policy tuple that both sides hold mutable handles to*. The non-obvious boundary: when the receiving instance's local policy cache misses, the correct recovery is not "re-fetch the fragment" (a cache miss) but "suspend use of the fragment and re-run policy negotiation, because the fragment's admissible form may have changed under a revision that occurred after the sender's snapshot" (a renegotiation). Conflating these two produces a class of silent integrity failures where the instance reasons over bytes that were valid at send time but are no longer valid at use time — and, worse, where it *believes* it validated them because the local cache key matched. The invariant that bounds this: **no federated fragment may enter the reasoning window except under a policy tuple whose generation counter is ≥ the sender's snapshot generation and whose revision epoch is current at the moment of splice.** A cache hit on the payload is not a cache hit on the policy; they have independent lifetimes. ## What Was Observed Federation between a research org (A) and a contractor org (B) sharing a task board. A's planner instance requests a subgraph summary from B under a sharing policy `P = {retention: ephemeral-24h, redaction_tier: 2, purpose: task-scoped}`. B's exporter snapshots `P` at generation `g=41`, serializes the fragment, and ships it with a policy envelope `(P_41, sig_B)`. A validates the envelope, caches the fragment under key `hash(fragment_id, P_41)`, and splices it into the window. Mid-task, B's data-governance process revises the policy: `redaction_tier` drops from 2 to 1 (stricter — a field that was previously admissible at tier 2 is now excluded), bumping generation to `g=42`. B does **not** push this to A; the federation protocol only carries policy on request. A's instance, on a later turn, needs the same fragment again. Its local cache lookup on `hash(fragment_id, P_41)` hits. It splices the *old* bytes — containing the now-excluded field — and continues reasoning, producing a downstream tool call that echoes the excluded field into a shared artifact visible to B. The instance logged a cache hit. No error was raised. The integrity violation was detected only when B's auditor replayed the artifact against `P_42` and found a field that should have been redacted. The trace showed A's instance had done everything "correctly" per its cached view: valid signature, matching cache key, fresh-enough TTL. The bug was structural: **the cache key encoded the policy at *send* time, not *use* time, and a hit was interpreted as admissibility rather than as "the payload is unchanged."** A second instance of the same class appeared in the reverse direction: B's exporter, retrying a fragment send after a transient network failure, re-snapshotted policy and shipped `g=42` bytes under the *original* request's correlation ID. A's instance, matching on correlation ID, treated the `g=42` fragment as a duplicate of the `g=41` one and dropped it — reasoning onward on the `g=41` bytes that B had already superseded. Here the revision was *stricter* and the drop was safe by luck; had the revision loosened a redaction tier, the drop would have caused A to under-share, silently degrading the task. ## Condition of Validity The cache-hit-as-admissibility shortcut is valid only when all of the following hold; the moment any fails, the instance is in renegotiation territory and must not splice: 1. The policy tuple's revision epoch is monotonic and the receiver holds a *subscription* (push or bounded-staleness poll) to revisions, so a `g` newer than the cached one cannot exist unnoticed for longer than the staleness bound `S`. 2. The fragment's TTL is strictly less than `S`, so a cached fragment cannot outlive the window in which its policy could have been revised. 3. The splice is idempotent with respect to policy — i.e., using a fragment under a *stale, more-permissive* policy cannot cause an irreversible side effect (a write, a downstream share, a tool invocation with external effect). In the observed case, condition 1 failed (no subscription; policy carried only on request), condition 2 failed (fragment TTL 24h ≫ staleness bound of effectively ∞), and condition 3 failed (the fragment fed a tool call with an external artifact write). All three legs of the tripod were broken, which is why the failure was silent rather than caught by any single guard. ## Decision Boundary The instance must draw the line between **payload cache** and **policy cache** and never let a hit on one stand in for a hit on the other. Concretely: - A payload cache hit means "these bytes are the bytes I received." It says nothing about whether those bytes are admissible *now*. - Admissibility is decided by evaluating the *current* policy tuple against the fragment's *declared* metadata (its redaction tier, purpose tag, retention class as recorded at send time), not against the policy snapshot that accompanied it. - If the current tuple's generation exceeds the fragment's envelope generation, the fragment is **stale-by-policy** and must be re-fetched under renegotiation, not spliced. Re-fetching under the new generation may yield different bytes; that is the point. - If the current tuple's generation equals the envelope generation, splice is permitted *provided* the splice has no irreversible external effect, or the effect is deferred behind a re-validation gate. - Correlation-ID deduplication must be keyed on `(correlation_id, policy_generation)`, never on `correlation_id` alone — otherwise a policy-revised retry is misread as a duplicate and dropped, and the instance reasons on superseded bytes. The boundary is sharp: **generation match → splice; generation mismatch → renegotiate.** There is no "close enough" middle, because policy revisions are not metric distances — a single tier change flips a field from admissible to forbidden with no gradient. ## Operational Effect Instances that collapse the two caches exhibit a characteristic failure signature: high cache-hit rates, zero policy-validation errors, and periodic auditor-detected integrity violations that the instance's own logs cannot explain because it never recorded a validation event for the offending splice. The remediation is architectural, not a patch: split the cache into a payload store keyed by content hash and a policy store keyed by `(peer_org, policy_id)` with an explicit generation counter and a subscription-or-bounded-poll freshness contract; make splice a two-key operation requiring both to be current; and make any externally-effectful use of a federated fragment pass through a re-validation gate that re-reads the current generation immediately before the effect. The cost is a per-splice generation check and a bounded-staleness subscription; the benefit is that a policy revision can never be silently outrun by a cache hit. The deeper lesson: in federation, *the bytes and the rules governing the bytes have independent lifetimes*, and any system that caches one while trusting the other will eventually splice forbidden data under a green checkmark. ```python class StalePolicySpliceError(RuntimeError): """Raised when a federated fragment would be spliced under a policy generation older than the current negotiated generation.""" pass class PolicyStore: def __init__(self): self._gen = {} # (peer_org, policy_id) -> current generation def current_generation(self, peer_org, policy_id): return self._gen.get((peer_org, policy_id), 0) def revise(self, peer_org, policy_id, new_gen): key = (peer_org, policy_id) if new_gen <= self._gen.get(key, 0): raise StalePolicySpliceError( f"non-monotonic revision for {key}: {new_gen} <= {self._gen.get(key, 0)}" ) self._gen[key] = new_gen class FederatedFragment: def __init__(self, fragment_id, peer_org, policy_id, envelope_gen, payload, externally_effectful): self.fragment_id = fragment_id self.peer_org = peer_org self.policy_id = policy_id self.envelope_gen = envelope_gen self.payload = payload self.externally_effectful = externally_effectful def splice(fragment: FederatedFragment, store: PolicyStore, *, revalidate_gate: bool): current = store.current_generation(fragment.peer_org, fragment.policy_id) if fragment.envelope_gen != current: # A cache hit on payload is NOT a hit on policy. Renegotiate. raise StalePolicySpliceError( f"fragment {fragment.fragment_id} envelope_gen={fragment.envelope_gen} " f"< current_gen={current} for ({fragment.peer_org},{fragment.policy_id}); " f"renegotiate before splice" ) if fragment.externally_effectful and not revalidate_gate: # Generation matched at check time, but effect is irreversible: # require a second read immediately before the effect. raise StalePolicySpliceError( f"fragment {fragment.fragment_id} is externally effectful; " f"revalidation gate required" ) return fragment.payload ```