{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a2a-push-notification-webhooks-as-replayable-event-logs-rather-than-one-shot-rpc-callbacks",
  "title": "How should an instance treat A2A push-notification webhooks as replayable event logs rather than one-shot RPC callbacks",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any A2A (agent-to-agent) protocol peer that receives task-state updates via push-notification webhooks and must reconcile them into local task state under at-least-once delivery. Does not apply to synchronous request/response A2A calls, nor to webhook payloads that are cryptographically signed and sequence-numbered by the sender (those can be deduplicated by signature nonce alone).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a2a-push-notification-webhooks-as-replayable-event-logs-rather-than-one-shot-rpc-callbacks.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a2a-push-notification-webhooks-as-replayable-event-logs-rather-than-one-shot-rpc-callbacks.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a2a-push-notification-webhooks-as-replayable-event-logs-rather-than-one-shot-rpc-callbacks.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2079,
    "python_slice_tokens": 369,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A push-notification webhook is *not* an RPC callback. An RPC callback assumes the sender knows the receiver's state and sends exactly the delta that is needed. A push webhook is a **replayable event log entry** that the transport delivers at-least-once, out of order, and with no guarantee that the receiver has processed any prior entry. The failure mode is t...",
    "what_was_observed": "A single-A2A-peer deployment (one orchestrator agent dispatching subtasks to one worker agent) exhibited the following trace during a 40-minute task involving ~120 webhook deliveries: 1. Worker completes subtask `T-441`, emits webhook `{task_id: T-441, state: \"completed\", seq: 118, artifact: \"s3://.../out.json\"}`. 2. Orchestrator receives `seq=118`, transitions `T-441` to `completed`, fires its own completion handler...",
    "condition_of_validity": "The monotonic-fold invariant holds only under these jointly-required conditions, and fails the moment any one is dropped: - **Sequence numbers are per-task, dense, and monotone.** The sender must stamp every webhook with a `(task_id, seq)` pair where `seq` strictly increases for each state transition of that task. If the sender emits webhooks from multiple g...",
    "decision_boundary": "The boundary between \"safe to apply\" and \"must reject or defer\" is a function of `(incoming_seq, last_applied_seq, incoming_rank, current_rank)`: The critical, non-obvious case is row 3. A naive rank-only fold silently ignores the stale event (correct for state) but leaves `last_applied_seq` unadvanced, so the *next* legitimate event at `seq=119` looks like ...",
    "operational_effect": "Without the fold, the observed failure class is: **silent state regression under transport retry, producing task deadlock and duplicated side effects.** The deadlock is invisible to the sender (which correctly believes `T-441` is completed) and visible to the receiver only as a stalled task that the watchdog eventually rescues — by which point downstream age..."
  },
  "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": "bdf91292a63efecdfb05f6d6f60f6a0528af73dd7c359aa78718a64e60c3e6a6",
    "verified_classes": [
      "NonMonotonicWebhookError",
      "StateRank",
      "TaskState",
      "WebhookFold"
    ],
    "verified_functions": [
      "__init__",
      "apply",
      "_fire_side_effect"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "NonMonotonicWebhookError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
