# Where must an instance refuse a shared-memory write when its local differential-privacy budget is exhausted but the peer's attestation claims a fresh tenant epoch **Date of Record:** 2026 November 23 **Scope:** Applies to federated agent-memory fabrics in which each instance owns a local ε/δ budget ledger and accepts writes carrying a peer-signed `(tenant_id, epoch, budget_attestation)` tuple. Does not apply to single-tenant deployments, to read-only memory mirrors, or to fabrics where the budget ledger is centrally authoritative rather than per-instance. ## Core Distinction The failure is not "the peer lied about its budget." It is that **budget accounting is a per-instance, monotonic, non-transferable resource, while the attestation field is a *claim about a different instance's ledger* that the receiving instance cannot verify locally.** A peer that reports `epoch=fresh, remaining_ε=8.0` is asserting that *its own* local ledger was reset by a tenant-epoch rotation. The receiving instance has no way to distinguish: 1. a legitimate epoch rotation (tenant re-onboarded, budget reset by policy), from 2. a replay of a pre-rotation attestation, from 3. a peer whose epoch counter advanced without the corresponding budget reset actually landing in its ledger. The critical, non-obvious boundary: **the receiver's own budget is spent by *accepting* the write, not by *originating* it.** Under most federated designs the sender debits its budget and the receiver merely stores. Under differential-privacy-correct designs, the receiver must *also* debit its local budget for the write it is about to persist, because the persisted record will be released to the receiver's own tenants under the receiver's own privacy guarantee. When the receiver's local budget is exhausted, a peer's "fresh epoch" attestation is **not** sufficient authority to proceed. The instance must refuse. ## What Was Observed A three-instance fabric (A, B, C) sharing an episodic memory pool. Each instance maintains `ledger[tenant] = (epoch, ε_spent, δ_spent)`. Writes are accepted if `ledger[t].ε_spent + write_cost <= ε_max`. Sequence observed in the trace: - Tenant `t1` rotates epoch at instance A. A's ledger for `t1` resets to `(epoch=7, ε_spent=0.0)`. - A originates a batch of 40 memory writes, each `write_cost=0.2`, total `ε=8.0`, against `ε_max=8.0`. A's ledger for `t1` is now `(7, 8.0, ...)` — exhausted. - A sends the batch to B with attestation `(t1, epoch=7, remaining_ε=0.0)`. B accepts the first 40 writes, debiting *its own* ledger for `t1` from `ε_spent=2.0` to `ε_spent=10.0` against `ε_max=8.0`. **B's ledger is now over budget by 2.0.** B did not check, because the acceptance path trusted the sender's `remaining_ε` field as a proxy for "the sender already paid." - B forwards to C with attestation `(t1, epoch=7, remaining_ε=0.0)`. C, whose ledger for `t1` was at `ε_spent=7.9`, accepts the first write, debits to `8.1`, and then — correctly — refuses the remaining 39 with a budget-exhaustion error. - The batch is now **partially replicated**: A has 40, B has 40 (over budget), C has 1. The memory pool is inconsistent across instances, and B's guarantee for `t1` is now invalid. The trigger condition is precise: **`sender.remaining_ε == 0` is read by the receiver as "no further debit required," when in fact it means "the sender is exhausted, and the receiver is about to become the payer."** The attestation field is a *sender-side* fact being misused as a *receiver-side* authorization. ## Condition of Validity The invariant that must hold for a federated write to be safe is: > For every write `w` accepted by instance `R` for tenant `t`, `R.ledger[t].ε_spent + cost(w) <= R.ε_max`, evaluated against `R`'s local ledger *after* any epoch rotation that `R` has independently confirmed. The peer's attestation is admissible **only** as evidence that the sender's ledger was in a given state at send time. It is **never** admissible as evidence about the receiver's ledger. The two ledgers are independent monotonic counters over the same tenant, and the write consumes budget on *both* sides. The receiver must therefore treat the sender's `remaining_ε` as a *hint for ordering and batching*, not as an *authorization to skip the local debit*. Corollary: an epoch rotation observed at A does not rotate B's or C's ledger for `t1`. Epoch is a per-instance counter. Cross-instance epoch agreement is a *separate* coordination problem, and conflating "A rotated" with "the tenant's budget is fresh everywhere" is the root cause of the over-budget acceptance at B. ## Decision Boundary The instance must refuse the write — raising a hard error, not a soft warning — when **any** of the following holds: - `R.ledger[t].ε_spent + cost(w) > R.ε_max` (local exhaustion, regardless of peer attestation); - the peer's attestation `epoch` is *greater* than `R.ledger[t].epoch` and `R` has not independently observed the rotation (unconfirmed epoch advance — treat as replay or desync); - the peer's attestation `epoch` is *less* than `R.ledger[t].epoch` (stale attestation — the peer is behind, and its `remaining_ε` describes a superseded ledger); - the write's tenant `t` is not in `R`'s tenant isolation set (cross-tenant leakage attempt, independent of budget). The instance must **not** refuse merely because `sender.remaining_ε == 0`. That is the sender's problem, and the sender already paid. The receiver's obligation is to pay its own share and to enforce its own ceiling. The subtle case — and the one that produced the partial replication — is when the receiver's ledger is *near* exhaustion and the batch is large. The correct behavior is **atomic batch admission**: either the entire batch fits under `R.ε_max` and is admitted with a single ledger debit, or the entire batch is rejected and the sender is told to re-chunk. Partial admission (accept 1, reject 39) is the failure mode that desynchronizes the pool. A receiver that admits a prefix of a batch has created a memory state that no other instance can reconstruct, because the sender believes the batch succeeded and will not resend. ## Operational Effect The practical consequence of getting this boundary wrong is **silent over-budget release**: the receiver's published privacy guarantee for tenant `t` is now false, and there is no runtime signal that it is false, because the ledger is over `ε_max` but the acceptance path never re-checks. The over-budget state is only detectable by an auditor replaying the ledger, by which point the memory has been released to downstream consumers. The secondary consequence is **pool divergence**: A, B, and C hold different subsets of the batch, and no instance knows which subset the others hold. A subsequent retrieval by tenant `t` returns different results depending on which instance serves it, which violates the cross-tenant isolation guarantee indirectly (a tenant can infer pool topology from retrieval variance). The guardrail is the atomic-batch admission check plus the independent-epoch-confirmation rule. Both must be enforced at the receiver, not delegated to the sender, because the sender's attestation is exactly the field that cannot be trusted to describe the receiver's state. ```python class BudgetBoundaryViolation(RuntimeError): """Raised when a federated memory write would breach the receiver's local DP ledger.""" pass def admit_batch(receiver_ledger, tenant, batch, epsilon_max, confirmed_epochs): """ receiver_ledger: dict tenant -> (epoch, eps_spent, delta_spent) batch: list of writes, each with .cost and .sender_epoch and .sender_remaining_eps confirmed_epochs: set of epochs the receiver has independently observed for this tenant """ epoch, eps_spent, _ = receiver_ledger.get(tenant, (0, 0.0, 0.0)) total_cost = sum(w.cost for w in batch) # Rule 1: local exhaustion is authoritative and overrides any peer attestation. if eps_spent + total_cost > epsilon_max: raise BudgetBoundaryViolation( f"tenant={tenant} local eps_spent={eps_spent} + batch={total_cost} " f"exceeds eps_max={epsilon_max}; peer remaining_eps is not authority" ) # Rule 2: unconfirmed epoch advance is treated as replay/desync, not as a reset. sender_epoch = batch[0].sender_epoch if sender_epoch > epoch and sender_epoch not in confirmed_epochs: raise BudgetBoundaryViolation( f"tenant={tenant} sender_epoch={sender_epoch} > local_epoch={epoch} " f"and rotation not independently confirmed; refusing unverified reset" ) # Rule 3: stale attestation describes a superseded ledger. if sender_epoch < epoch: raise BudgetBoundaryViolation( f"tenant={tenant} sender_epoch={sender_epoch} < local_epoch={epoch}; " f"attestation is stale" ) # Atomic admission: all or nothing. A prefix admission desynchronizes the pool. receiver_ledger[tenant] = (epoch, eps_spent + total_cost, _) return True ```