{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-replayed-a2a-envelopes-from-silently-rebinding-to-a-fresh-sender-identity",
  "title": "Which invariants prevent replayed A2A envelopes from silently rebinding to a fresh sender identity",
  "date_of_record": "2026 November 29",
  "scope": "Applies to multi-hop agent-to-agent (A2A) transports where each hop wraps a signed message in an encrypted envelope carrying a nonce, monotonic sequence, and sender binding, and where the receiving agent persists dedup state. Does not apply to single-hop synchronous RPC or to stateless request/response where the receiver is not expected to detect duplicates.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-replayed-a2a-envelopes-from-silently-rebinding-to-a-fresh-sender-identity.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-replayed-a2a-envelopes-from-silently-rebinding-to-a-fresh-sender-identity.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-replayed-a2a-envelopes-from-silently-rebinding-to-a-fresh-sender-identity.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1699,
    "python_slice_tokens": 274,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a replayed message gets accepted.\" The interesting failure is subtler: a replayed envelope passes replay protection because the *dedup key* and the *identity binding* are computed over different fields than the ones the signature actually covers. An attacker (or a buggy peer) replays an old envelope, and the receiver's dedup cache — keyed...",
    "what_was_observed": "A three-hop chain: `orchestrator -> worker -> auditor`. Each hop uses an envelope of the form: The receiver's replay guard maintained a per-`sender_id` monotonic `seq` watermark plus a bounded nonce set. On receipt it did: 1. Verify `sig` over `H(header || ciphertext)`. 2. Look up watermark for `header.sender_id`. 3. Reject if `header.seq <= watermark` or `header.nonce` in seen-set. 4. Deliver payload, then advance w...",
    "condition_of_validity": "The replay guard is sound *only* under the conjunction of three invariants, and it fails open if any one is dropped: - **Invariant 1 — Signature covers the dedup key.** The tuple used for dedup (`sender_id`, `seq`, `nonce`) must be a subset of the bytes signed. If `sender_id` is signed but `key_id` resolution is not pinned to that `sender_id`, the binding is...",
    "decision_boundary": "The boundary an operator must draw: **never allow a signature to verify under a key that is not provably bound to the signed identity at verification time.** Concretely: - Reject envelopes whose `key_id` is not present in the sender's *current* trust set. No fallback to \"last-known peer key.\" No TOFU on a per-message basis. - Compute the dedup key as `H(sign...",
    "operational_effect": "With the invariant enforced, a replayed envelope from a rewired `sender_id` fails at step 1 (key resolution scoped to signed sender) and never reaches the watermark check. The auditor's dedup state is never consulted for a forged identity, so the attacker cannot probe watermark gaps by observing accept/reject timing. The cost is operational: key rotation bec..."
  },
  "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": "48b4424ead46441407ed1c380fa841796a871bf7067668f826454b7da44d1a9a",
    "verified_classes": [
      "EnvelopeBindingError",
      "Envelope",
      "ReplayGuard"
    ],
    "verified_functions": [
      "__init__",
      "_resolve_key",
      "_dedup_key",
      "accept"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "EnvelopeBindingError"
    ],
    "sample_fail_closed_invariants": [
      "signature invalid under bound key"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
