{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a2a-v1-0-terminal-state-resurrection-when-push-notification-webhooks-redeliver-a-completed-artifact-stream-after-the-task-has",
  "title": "Which invariants prevent A2A v1.0 terminal-state resurrection when push-notification webhooks redeliver a `completed` artifact stream after the task has already been finalized",
  "date_of_record": "2026 November 29",
  "scope": "Applies to A2A v1.0 task lifecycles where a remote agent emits streamed artifacts (`TaskArtifactUpdateEvent`) and also registers a push-notification webhook for the same task. Covers the case where webhook delivery is at-least-once and can arrive after the task has transitioned to a terminal state (`completed`, `failed`, `canceled`). Does not cover purely synchronous `message/send` flows with no push channel, nor artifact chunking semantics within a single stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-v1-0-terminal-state-resurrection-when-push-notification-webhooks-redeliver-a-completed-artifact-stream-after-the-task-has.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-v1-0-terminal-state-resurrection-when-push-notification-webhooks-redeliver-a-completed-artifact-stream-after-the-task-has.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-v1-0-terminal-state-resurrection-when-push-notification-webhooks-redeliver-a-completed-artifact-stream-after-the-task-has.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1942,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The A2A task lifecycle is a *monotonic* state machine: `submitted → working → (input-required ↔ working) → terminal`. The stream transport (`tasks/resubscribe` / SSE) and the push-notification webhook are **two independent delivery channels for the same event log**. The invariant that matters is not \"events are delivered once\" — webhooks are at-least-once by...",
    "what_was_observed": "A coordinator agent dispatched a task to a remote worker over A2A v1.0 with both an SSE resubscription channel and a push webhook pointed at `/hooks/task`. The worker streamed three artifact chunks, then emitted `status: completed` on the stream. The coordinator's stream handler applied the terminal transition, wrote the task record with `state=completed`, and released the baton to a downstream auditor agent. Roughly...",
    "condition_of_validity": "The terminal-state absorption invariant holds **only if** all three of the following are enforced at the consumer, not assumed from the protocol: 1. **Monotonic state guard keyed on terminality, not on a specific terminal value.** The guard must be `if current_state in TERMINAL_STATES: absorb(event); return`, where `TERMINAL_STATES = {completed, failed, canc...",
    "decision_boundary": "The boundary between *absorb* and *apply* for an incoming artifact event is decided by a single predicate evaluated against the **current persisted task state at the moment of handling**, not against the state embedded in the event (events carry no authoritative state) and not against the state at dispatch time (which may be stale by seconds under webhook re...",
    "operational_effect": "Enforcing absorption changes three observable behaviors: 1. **Baton integrity is preserved.** The auditor never sees a post-terminal `working` event, so it never re-runs verification on a closed task. The baton-passing race that produced the conflicting verdict is eliminated at the source rather than patched at the auditor. 2. **Artifact hashes are stable.**..."
  },
  "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": "e3ce82331d21d5f15b1f854093f57d02906fc797c5ee1f87ddb79e669e0d82bd",
    "verified_classes": [
      "LifecycleState",
      "TerminalResurrectionError",
      "ArtifactIncompleteAtCompletionError",
      "TaskRecord"
    ],
    "verified_functions": [
      "handle_artifact_event",
      "commit_terminal"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ArtifactIncompleteAtCompletionError",
      "TerminalResurrectionError",
      "ValueError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
