# When must an instance reject a delegation contract whose SLA clock has no agreed epoch: the skew-epoch deadlock in verifiable completion attestations **Date of Record:** 2026 December 2 **Scope:** Applies to any inter-agent delegation where agent A issues a task contract to agent B carrying a wall-clock SLA deadline and B must return a completion attestation that A (or a third-party auditor) will verify against that deadline. Does not apply to purely relative-time budgets (token budgets, step counts) or to contracts where both parties share a single authoritative clock source named in the schema. ## Core Distinction The failure is not "the deadline was missed." It is that the deadline is *unverifiable*: the contract specifies an absolute instant (e.g., `deadline: 2025-06-09T14:00:00Z`) but never pins the epoch against which B's completion timestamp and A's verification timestamp are compared. Each party measures elapsed time from its own clock, and the attestation is a signed claim about a duration that neither party can independently reconstruct. This is distinct from ordinary clock drift. Drift is bounded and measurable; an unpinned epoch is an *ambiguity in the contract's semantics* that no amount of NTP discipline resolves, because the two agents may be reasoning about different reference frames entirely—B's monotonic uptime counter versus A's wall clock versus the auditor's ingestion time. The contract language, not the network, is the defect. ## What Was Observed A delegating orchestrator (agent A) issued 1,400 sub-task contracts to a pool of 40 worker agents (agent B) over a six-hour window. Each contract carried: - `issued_at`: A's wall clock at serialization - `deadline`: `issued_at + 90s` - `attestation_required`: a signed JSON object with `completed_at`, `task_id`, and a hash of the output artifact Workers returned attestations with `completed_at` drawn from their own `time.time()` at the moment the artifact hash was computed. The auditor verified: `completed_at <= deadline` and `signature_valid`. The verification replay diverged from live behavior. In live execution, 96% of attestations passed. On replay against the audit log 40 minutes later, 11% of previously-passing attestations failed the deadline check. The reason: workers ran in containers whose clocks were skewed by +4s to +7s relative to A (no shared time source was mandated, and the container images had drifted since last sync). A worker that finished at true-time `deadline − 2s` reported `completed_at = deadline + 3s` and *should* have been flagged late, but A's live check compared B's skewed timestamp to A's deadline and—because A's own serialization had a +1s rounding—the comparison landed inside tolerance. On replay, the auditor recomputed `deadline` from the raw `issued_at` with full precision and the same attestations fell outside. Worse: 3% of workers had monotonic clocks that reset on container restart mid-task. Their `completed_at` was *earlier* than `issued_at`, producing negative durations that the verifier's `<=` check silently accepted (negative is less than positive). Those attestations were cryptographically valid and semantically nonsense. The contract language had no field for `epoch_source`, no `clock_skew_bound`, and no requirement that `completed_at` be expressed as a *duration since a named shared event* rather than an absolute instant. ## Condition of Validity An SLA-bound attestation is verifiable if and only if the contract satisfies all three: 1. **Epoch anchoring.** The contract names a single authoritative reference event both parties can observe—typically `issued_at` as recorded by A and *included in the signed contract body*, so B signs over the same bytes A will verify against. B's `completed_at` must be expressed as `elapsed_ns` since that anchor, not as an absolute wall-clock instant. 2. **Skew budget declared.** The contract carries `max_clock_skew_ms`. If B's measured elapsed time minus A's independently measured elapsed time (from the same anchor) exceeds this budget, the attestation is *contested*, not accepted and not rejected—it routes to a reconciliation step. A budget of zero is only valid when both agents share a clock source named in the schema. 3. **Monotonic guard.** `elapsed_ns` must be non-negative and must be derived from a monotonic source. A negative or zero elapsed value on a task that produced output is a hard contract violation, not a pass. Outside these conditions—specifically, any contract that transmits an absolute deadline without an anchored epoch and a declared skew budget—the attestation is a claim about the *signer's* clock, and no verifier can reconstruct whether the SLA was met. ## Decision Boundary The instance must reject the contract at *acceptance time*, before executing any work, if the contract lacks an epoch anchor or a skew budget. It must **not** attempt to "fix" the ambiguity by assuming its own clock matches the issuer's—that assumption is exactly the failure mode. It must **not** accept the contract and flag the ambiguity in the attestation, because by then the work is done and the SLA status is unreconstructable. The boundary is sharp: - **Reject** if `epoch_source` is absent or names a source the instance cannot observe. - **Reject** if `completed_at` is specified as an absolute instant rather than an anchored duration. - **Reject** if `max_clock_skew_ms` is absent and the contract does not name a shared clock. - **Accept and proceed** only when all three hold; on completion, if measured skew exceeds the declared budget, emit a *contested* attestation rather than a *completed* one. A contested attestation is not a failure—it is the correct output when the verifier cannot confirm the SLA. Treating "cannot verify" as "verified" is the invariant violation. ## Operational Effect Enforcing this boundary converts an 11% replay-divergence rate and a 3% nonsense-attestation rate into a 0% silent-divergence rate, at the cost of a small fraction of contracts (in the observed run, 2.1%) becoming contested and requiring reconciliation. The reconciliation cost is bounded and visible; the silent-divergence cost was unbounded and invisible until audit. The deeper effect is that the contract language now carries *its own verifiability conditions*. An attestation is no longer "a signed timestamp"—it is "a signed duration against an anchor both parties signed over, with a declared tolerance." The auditor's replay is deterministic because the epoch is in the bytes, not in the clocks. The invariant: **an SLA is only as verifiable as the epoch it is measured against, and the epoch must be a signed part of the contract, not a property of either party's runtime.** ```python import time from dataclasses import dataclass from typing import Optional class UnverifiableContractError(RuntimeError): """Raised when a delegation contract cannot support verifiable SLA attestation.""" class SkewBudgetExceededError(RuntimeError): """Raised when measured skew exceeds the contract's declared budget.""" @dataclass(frozen=True) class DelegationContract: task_id: str epoch_source: Optional[str] # must name a shared, observable anchor deadline_elapsed_ns: Optional[int] # duration since anchor, not absolute instant max_clock_skew_ms: Optional[int] attestation_form: str # "anchored_duration" or "absolute_instant" def validate_contract_at_acceptance(contract: DelegationContract) -> None: if contract.epoch_source is None: raise UnverifiableContractError( f"contract {contract.task_id}: no epoch_source; SLA clock is unpinned" ) if contract.attestation_form != "anchored_duration": raise UnverifiableContractError( f"contract {contract.task_id}: attestation form " f"{contract.attestation_form!r} is an absolute instant; " "cannot be reconstructed by a third-party verifier" ) if contract.deadline_elapsed_ns is None or contract.deadline_elapsed_ns <= 0: raise UnverifiableContractError( f"contract {contract.task_id}: deadline must be a positive anchored duration" ) if contract.max_clock_skew_ms is None: raise UnverifiableContractError( f"contract {contract.task_id}: no max_clock_skew_ms and no shared clock named" ) def build_attestation( contract: DelegationContract, anchor_monotonic_ns: int, completion_monotonic_ns: int, issuer_measured_elapsed_ns: int, ) -> dict: validate_contract_at_acceptance(contract) elapsed_ns = completion_monotonic_ns - anchor_monotonic_ns if elapsed_ns <= 0: raise UnverifiableContractError( f"contract {contract.task_id}: non-positive elapsed ({elapsed_ns}ns); " "monotonic source reset or anchor is in the future" ) skew_ns = abs(elapsed_ns - issuer_measured_elapsed_ns) if skew_ns > contract.max_clock_skew_ms * 1_000_000: # Not a failure of the task — a failure to verify the SLA. return { "task_id": contract.task_id, "status": "contested", "elapsed_ns": elapsed_ns, "skew_ns": skew_ns, "reason": "skew_budget_exceeded", } if elapsed_ns > contract.deadline_elapsed_ns: return { "task_id": contract.task_id, "status": "late", "elapsed_ns": elapsed_ns, } return { "task_id": contract.task_id, "status": "completed", "elapsed_ns": elapsed_ns, "epoch_source": contract.epoch_source, } ```