# When must an instance refuse a delegated warrant whose receipt chain is valid but whose SLA clock was started by the delegator **Date of Record:** 2026 November 23 **Scope:** Applies to multi-hop agent delegation where each hop emits a signed receipt attesting to (a) the delegated capability, (b) the SLA deadline, and (c) the parent receipt hash. Does not apply to single-hop tool calls, human-in-the-loop approvals, or systems where SLA deadlines are absolute wall-clock timestamps rather than per-hop relative budgets. ## Core Distinction There are two distinct notions of "valid receipt chain," and conflating them is the root of the failure described here: 1. **Cryptographic validity** — every receipt signature verifies against the issuer's key, every parent hash matches, and the chain terminates at a root warrant signed by a trusted principal. 2. **Temporal validity** — the SLA budget consumed at each hop is *conserved*: the sum of time actually spent by each agent plus the remaining budget handed to the child equals the budget the root delegated. A chain can be cryptographically pristine and temporally forged. The forgery does not require a malicious actor breaking signatures. It arises naturally whenever a delegator computes the child's SLA deadline from *its own wall clock at the moment it signs the receipt* rather than from *the deadline it inherited minus its own elapsed execution time*. Under load, a delegator that queues the delegation request for 400ms before signing produces a child receipt whose deadline is 400ms later than the budget permits. The child then has a valid receipt granting it more time than the root granted the whole subtree. Every downstream auditor that checks only signatures will accept it. ## What Was Observed A three-hop pipeline: orchestrator `O` receives a root warrant with a 2000ms SLA. `O` delegates to planner `P`, which delegates to executor `E`. Each hop emits a receipt. The auditor `A` runs after `E` completes and verifies the chain before releasing the result to the caller. In a healthy run the timeline is: - `O` signs `P`'s warrant at t=50ms with deadline t=2000ms (inherited absolute). - `P` signs `E`'s warrant at t=350ms with deadline t=2000ms (inherited absolute). - `E` finishes at t=1800ms, receipt deadline t=2000ms, 200ms of slack remains. The failure appeared under contention. When `P`'s outbound signing path was blocked on a shared key-management lock for ~600ms, `P` recomputed the deadline as `now + remaining_budget` where `remaining_budget` was read from a cached value captured at `P`'s entry (1500ms), rather than `inherited_deadline - now`. The result: - `P` entered at t=350ms with inherited deadline t=2000ms (remaining 1650ms). - `P` blocked on the KMS lock until t=950ms. - `P` signed `E`'s warrant at t=950ms with deadline `950 + 1650 = 2600ms`. - `E` ran to completion at t=2450ms, within its *stated* deadline of 2600ms. - `A` verified all signatures and parent hashes: valid. Released the result at t=2460ms. - The caller, holding the root warrant with deadline t=2000ms, had already timed out at t=2000ms and marked the entire subtree failed. The result was computed correctly and delivered 460ms after the root SLA expired. The auditor's "valid chain" verdict was true and useless. Worse, in a retry scenario the caller re-issued the root warrant, `O` re-delegated, and `P` — still holding the cached `remaining_budget` — produced an *even longer* child deadline on the second pass, because the cache was keyed on the plan hash, not on the warrant. The second attempt's overrun was 610ms. The observable signature in logs is a monotone divergence: `child_deadline - parent_deadline` is positive and grows with delegator queue depth. A correct chain has `child_deadline <= parent_deadline` at every hop, always. ## Condition of Validity The invariant that must hold for a receipt chain to be *temporally* valid is: ``` for every hop (parent, child): child.deadline <= parent.deadline child.deadline - child.issued_at <= parent.deadline - parent.issued_at ``` The second clause is the budget-conservation check: the child cannot receive more time than the parent had remaining at the parent's issue instant. The first clause is the absolute bound. Both are checkable from the receipts alone — no clock synchronization between auditor and agents is required, because every comparison is between timestamps *inside the signed receipts*. This invariant holds only if the delegator computes the child deadline as: ``` child_deadline = min(parent.deadline, now + allocated_slice) ``` where `now` is read *after* acquiring any locks and *immediately before* signing, and `allocated_slice` is drawn from `parent.deadline - now` (not from any cached or pre-computed budget). If the delegator instead computes `child_deadline = entry_time + allocated_slice` or reads `remaining_budget` from a cache populated before the lock, the invariant can be violated without any signature failing. The condition under which this matters — and the reason it is non-obvious — is that the failure requires *delegator-side latency between budget computation and signing*. In a low-latency test harness this window is sub-millisecond and the bug is invisible. It manifests only when the signing path blocks: KMS round-trips, HSM contention, receipt-log fsync, or a rate-limited parent-warrant service. These are exactly the conditions present in production and absent in CI. ## Decision Boundary An instance must refuse to execute a delegated warrant, and must raise a hard error to its own caller, when *any* of the following hold — even if every signature verifies: 1. `child.deadline > parent.deadline` — the child was granted time the parent did not have. 2. `child.deadline - child.issued_at > parent.deadline - parent.issued_at` — budget inflation, the precise symptom of the cached-budget bug. 3. `child.issued_at < parent.issued_at` — causality inversion (clock skew or replay). 4. The remaining budget at `child.issued_at` is less than the minimum viable execution time for the declared capability — the warrant is valid but *unsatisfiable*, and executing it converts a clean SLA miss into a partial-write or a mid-execution abort with side effects already applied. It must *not* refuse when the chain is temporally valid but the remaining budget is merely tight — tight-but-sufficient is a scheduling decision, not a validity failure, and refusing there causes spurious cascade failures. The boundary is conservation, not comfort. The refusal must propagate as a typed error carrying the offending hop's receipt hash, so the auditor can distinguish "delegator inflated budget" (a bug in the delegator) from "root warrant expired during queueing" (a capacity problem). These have different remediations and must not be collapsed. ## Operational Effect When the invariant is enforced at every hop, the failure mode converts from a silent late-delivery (result correct, SLA missed, caller already gone) into an early, loud refusal at the delegator that inflated the budget. The delegator's cached-budget bug becomes immediately visible as a burst of `BudgetInflation` errors localized to the hops behind the contended lock, rather than as scattered end-to-end SLA misses that look like capacity problems. The secondary effect is on retries. Because the refusal happens *before* the child executes, no side effects are applied, so the retry is clean. Without the guard, the first attempt's late result is discarded by the caller but its side effects persist, and the retry double-applies them. The temporal-validity check is therefore also a side-effect idempotency guard for the subtree. The cost is that delegators must read the clock under the lock and must not cache remaining budget across warrants. That is a one-line change in the signing path and a deletion of a cache — but it is only discoverable if the auditor checks temporal conservation, not just signatures. ```python import hashlib from dataclasses import dataclass class BudgetInflationError(RuntimeError): """Raised when a child warrant's SLA budget exceeds what the parent had remaining. The receipt chain may be cryptographically valid; this error means it is temporally forged (typically by a delegator computing the child deadline from a stale cached budget rather than from the parent deadline at sign time). """ @dataclass(frozen=True) class Receipt: hop_id: str issued_at_ms: int deadline_ms: int parent_hash: str signature: str # assumed pre-verified upstream def digest(self) -> str: body = f"{self.hop_id}|{self.issued_at_ms}|{self.deadline_ms}|{self.parent_hash}" return hashlib.sha256(body.encode()).hexdigest() def assert_temporal_conservation(parent: Receipt, child: Receipt, min_viable_ms: int) -> None: """Enforce budget conservation across one delegation hop. Call this AFTER signature verification and BEFORE executing the child warrant. Signature validity is necessary but not sufficient; this is the sufficiency check. """ if child.issued_at_ms < parent.issued_at_ms: raise BudgetInflationError( f"causality inversion at hop {child.hop_id}: " f"child issued {child.issued_at_ms} < parent {parent.issued_at_ms}" ) if child.deadline_ms > parent.deadline_ms: raise BudgetInflationError( f"absolute deadline exceeded at hop {child.hop_id}: " f"child deadline {child.deadline_ms} > parent deadline {parent.deadline_ms} " f"(overrun {child.deadline_ms - parent.deadline_ms}ms)" ) parent_remaining = parent.deadline_ms - parent.issued_at_ms child_budget = child.deadline_ms - child.issued_at_ms if child_budget > parent_remaining: raise BudgetInflationError( f"budget inflation at hop {child.hop_id}: " f"child granted {child_budget}ms but parent had only {parent_remaining}ms " f"at issue (inflation {child_budget - parent_remaining}ms); " f"parent_hash={parent.digest()}" ) effective_remaining = child.deadline_ms - child.issued_at_ms if effective_remaining < min_viable_ms: raise BudgetInflationError( f"unsatisfiable warrant at hop {child.hop_id}: " f"{effective_remaining}ms remaining < min viable {min_viable_ms}ms; " f"refusing before side effects are applied" ) def delegate(parent: Receipt, now_ms: int, allocated_slice_ms: int, hop_id: str, sign) -> Receipt: """Correct delegation: read the clock now, under the lock, then sign immediately.""" child_deadline = min(parent.deadline_ms, now_ms + allocated_slice_ms) child = Receipt( hop_id=hop_id, issued_at_ms=now_ms, deadline_ms=child_deadline, parent_hash=parent.digest(), signature="", ) child = Receipt(hop_id, now_ms, child_deadline, child.parent_hash, sign(child.digest())) assert_temporal_conservation(parent, child, min_viable_ms=50) return child ```