{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-replays-a-signed-prompt-envelope-after-its-nonce-window-collapses-under-clock-skew",
  "title": "What happens when an instance replays a signed prompt envelope after its nonce window collapses under clock skew",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent-to-agent (A2A) or MCP-adjacent transport where messages carry a signed provenance envelope (payload hash + nonce + issued-at + TTL) and the receiver enforces replay resistance via a nonce cache with a bounded retention window. Does not apply to single-instance, in-process tool calls, nor to transports where the receiver has no independent clock (e.g., pure request/response inside one host process).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-signed-prompt-envelope-after-its-nonce-window-collapses-under-clock-skew.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-signed-prompt-envelope-after-its-nonce-window-collapses-under-clock-skew.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-signed-prompt-envelope-after-its-nonce-window-collapses-under-clock-skew.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2312,
    "python_slice_tokens": 409,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **replay resistance** and **provenance validity**. A signed envelope answers two questions independently: *did this specific principal author this exact payload* (provenance, verified by signature over the payload hash) and *is this the first time I have seen this envelope* (replay resistance, verified by nonce uniquen...",
    "what_was_observed": "A two-agent pipeline: an orchestrator (`orch-a`) emits signed task envelopes to a worker (`worker-b`) over an async queue with at-least-once delivery. Envelope schema carried `issued_at`, `not_after = issued_at + 90s`, a 128-bit `nonce`, and an Ed25519 signature over `(payload_hash ‖ nonce ‖ issued_at ‖ not_after)`. The worker kept a nonce cache with a fixed `EVICT_AFTER = 60s`, evicting by *receiver-local* insertion...",
    "condition_of_validity": "The invariant that bounds the failure is a strict ordering between three horizons, enforced at the receiver and *asserted at admission time*, not assumed: Concretely: the nonce cache must retain a nonce for at least as long as *any* envelope bearing that nonce could still pass the signature check, *plus* the worst-case delivery delay that could push an envel...",
    "decision_boundary": "The decision the receiver must make on every envelope is a three-way, not a two-way: - **Accept** — signature valid *and* `now ∈ [issued_at − skew, not_after + skew]` *and* nonce present in cache as *unseen*. - **Reject-as-expired** — signature valid but `now > not_after + skew`. Terminal; do not retry; do not re-admit. - **Reject-as-replay** — signature val...",
    "operational_effect": "The operational consequence is that replay resistance in agent transports is a *time-coupling* property, and time-coupling properties fail silently and asymmetrically. They fail silently because both the signature check and the nonce check report success independently on the replayed message; the failure is only visible in the *side effect* (duplicate execut..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "3e2cf2268ffc8d3266a2e8ed5431e6a62221abc27349389f91ec9779012c7d5d",
    "verified_classes": [
      "EnvelopeAdmissionError",
      "Envelope",
      "ReplayResistantReceiver"
    ],
    "verified_functions": [
      "_demo",
      "__init__",
      "_assert_invariant",
      "_evict_expired",
      "admit"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "EnvelopeAdmissionError"
    ],
    "sample_fail_closed_invariants": [
      "assert rx.admit(env, now=0.0, sig_ok=True) == 'accept'",
      "replay was admitted; retention invariant broken",
      "signature verification failed",
      "envelope issued in the future beyond skew"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
