{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-reject-a-replayed-a2a-envelope-whose-nonce-is-still-inside-its-freshness-window",
  "title": "When must an instance reject a replayed A2A envelope whose nonce is still inside its freshness window?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent-to-agent (A2A) transports where each message carries a signed envelope with a monotonic nonce, a wall-clock `issued_at`, and a bounded freshness window `Δ`, and where the receiving agent maintains a per-sender replay table. Does not apply to transports that rely solely on TLS session identity or on a central broker that deduplicates before delivery.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-replayed-a2a-envelope-whose-nonce-is-still-inside-its-freshness-window.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-replayed-a2a-envelope-whose-nonce-is-still-inside-its-freshness-window.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-replayed-a2a-envelope-whose-nonce-is-still-inside-its-freshness-window.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2417,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Two properties are routinely conflated in A2A envelope design: **freshness** and **uniqueness**. Freshness is a statement about the *age* of a signed message (`now − issued_at ≤ Δ`). Uniqueness is a statement about whether the `(sender_id, nonce)` pair has *ever been consumed* by this receiver. A nonce that is still inside the freshness window is, by definit...",
    "what_was_observed": "A two-agent swarm (planner `P` and executor `E`) exchanged task grants over a signed A2A channel. Each grant carried `{sender, nonce, issued_at, body, sig}`. `E` maintained an in-memory `seen: dict[(sender, nonce), issued_at]` and pruned entries where `now − issued_at > Δ` on every admission, with `Δ = 30s`. The failure trace: 1. At `t=0.0s`, `P` emitted grant `G1` with nonce `n_a`, `issued_at=0.0`. `E` admitted it, ...",
    "condition_of_validity": "The replay-protection invariant holds **iff** the replay table's retention horizon is computed against the *same clock* that produced `issued_at`, and that horizon is `issued_at + Δ` — not `first_seen + Δ`, and not `now − issued_at > Δ` evaluated on a receiver-local clock that may drift relative to the sender. Formally: let `τ_s` be the sender's clock and `τ...",
    "decision_boundary": "The receiver must reject the envelope — and must do so as a *distinct* rejection, not a generic stale error — when **any** of the following hold: 1. `(sender, nonce)` is present in the replay table, regardless of freshness. Replay beats freshness; freshness never overrides a seen nonce. 2. `τ_r − issued_at > Δ + ε_max`. Beyond the skew-margined window, the m...",
    "operational_effect": "The consequence of getting this wrong is not a crash — it is a **silent double-execution**. The executor runs the same grant twice, `Δ` apart, with the second execution carrying a valid signature, a valid freshness stamp, and no replay-table trace. Non-repudiation is preserved (the sender *did* sign it), freshness is preserved (it *was* within `Δ` on the rec..."
  },
  "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": "f3d78c30ec2a26d86fb111ef814d41cb486b1f71542923ef0afa86e70efcfd40",
    "verified_classes": [
      "EnvelopeReplayError",
      "Envelope",
      "ReplayGuard"
    ],
    "verified_functions": [
      "verify_stub",
      "__init__",
      "_prune",
      "admit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "EnvelopeReplayError"
    ],
    "sample_fail_closed_invariants": [
      "epsilon_max must be non-negative"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
