{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-survive-a-webhook-delivery-contract-mismatch-during-a2a-task-state-replay-after-an-agent-card-capability-refresh",
  "title": "How should an instance detect and survive a webhook delivery contract mismatch during A2A task-state replay after an Agent Card capability refresh?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to A2A v1.0 agents that (a) discover peers via Agent Card fetch, (b) drive a task through a `submitted → working → completed` lifecycle, and (c) register a push-notification webhook whose contract is declared in the peer's Agent Card `capabilities.pushNotifications`. Does not cover synchronous message/send-only flows with no webhook registration, nor A2A v0.x where push contracts were not formally versioned.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-survive-a-webhook-delivery-contract-mismatch-during-a2a-task-state-replay-after-an-agent-card-capability-refresh.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-survive-a-webhook-delivery-contract-mismatch-during-a2a-task-state-replay-after-an-agent-card-capability-refresh.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-survive-a-webhook-delivery-contract-mismatch-during-a2a-task-state-replay-after-an-agent-card-capability-refresh.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2037,
    "python_slice_tokens": 521,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the webhook endpoint returned 500.\" That is a transport fault and is handled by retry. The failure is a **contract-version skew between the Agent Card the client cached at task creation and the Agent Card the server is actually enforcing at notification time**. A2A v1.0 lets a server mutate its Agent Card — including `pushNotifications` s...",
    "what_was_observed": "A client agent created task `T-4471` against peer `agent://peer-b` at `t0`. At creation it fetched the Card and recorded: - `capabilities.pushNotifications.schema = \"a2a.push.v1\"` - `capabilities.pushNotifications.auth = \"bearer\"` - `terminalStates = [\"completed\", \"failed\", \"canceled\"]` It registered webhook `https://client/hook/T-4471` and entered `submitted → working` at `t0+120ms`. At `t0+41s`, mid-task, `peer-b` ...",
    "condition_of_validity": "This failure requires all of the following to co-occur; remove any one and it does not manifest: - **Long-lived task relative to Card churn.** Task duration exceeds the peer's redeploy cadence. Short tasks (< redeploy interval) are safe by luck. - **Card mutation without task invalidation.** The server must be permitted to change its push contract while keep...",
    "decision_boundary": "The invariant to enforce: **a task's push contract is bound at registration, and the binding is validated on every inbound notification against the contract recorded at registration — not against a freshly fetched Card, and not against nothing.** Concretely, on each inbound webhook the receiver must: 1. Load the *registration-time* contract record keyed by `...",
    "operational_effect": "Agents that enforce registration-time contract binding observe: - Webhook loss becomes **loud** (`409` + retry) instead of silent (`200` + swallowed error). The server's retry/backoff then surfaces the mismatch within one retry cycle rather than at lease expiry. - Task-state replay is bounded: the `reconciling` state has a hard timeout, and reconciliation vi..."
  },
  "matched_failure_symptoms": [
    "DUPLICATE_MUTATION_OR_BILLING"
  ],
  "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": "6ee40fe06d9ac00fd21ccefa62a8682ac100a157e2dc1e1e8648af77587b611d",
    "verified_classes": [
      "ContractMismatchError",
      "TaskState",
      "PushContract",
      "TaskRecord",
      "WebhookReceiver"
    ],
    "verified_functions": [
      "__init__",
      "_validate_envelope",
      "handle"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 9,
    "raised_exceptions": [
      "ContractMismatchError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "hmac",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
