{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-accept-a-terminal-completed-task-and-then-overwrite-it-with-a-late-working-update-after-a-push-notification-replay",
  "title": "Why does an instance accept a terminal `completed` task and then overwrite it with a late `working` update after a push-notification replay?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to A2A v1.0 task lifecycle transitions when a client agent reconciles task state delivered via push-notification webhooks against state pulled from the remote agent's `tasks/get` endpoint, specifically when webhook delivery is retried or replayed after the task has already reached a terminal state. Does not apply to synchronous `message/send` blocking calls, nor to tasks whose `TaskStatus.state` never leaves `working`/`input-required`.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-terminal-completed-task-and-then-overwrite-it-with-a-late-working-update-after-a-push-notification-replay.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-terminal-completed-task-and-then-overwrite-it-with-a-late-working-update-after-a-push-notification-replay.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-terminal-completed-task-and-then-overwrite-it-with-a-late-working-update-after-a-push-notification-replay.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2111,
    "python_slice_tokens": 440,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A2A v1.0 treats the *task state machine* and the *push-notification transport* as two independent contracts that share a `taskId` but have no shared ordering guarantee. The task lifecycle is monotonic: `submitted → working → (input-required ⇄ working) → completed | failed | canceled`. The webhook contract is at-least-once delivery with no guaranteed ordering...",
    "what_was_observed": "A client orchestrator subscribes to `tasks/pushNotificationConfig` for a long-running research task. The remote agent emits three webhook POSTs: `working` (t=0), `working` (t=40s, progress update), `completed` (t=90s). The receiver records states in order and marks the task terminal at t=90s, then fires downstream actions (distillation into episodic memory, releasing a downstream dependency). At t=120s the receiver g...",
    "condition_of_validity": "The invariant that must hold for a receiver to safely apply a webhook status update is: > A status update `u` may be applied to local task `T` iff `u.status.timestamp > T.terminal_timestamp` OR `T` is not terminal. Once `T` is terminal, any update with a timestamp `≤ T.terminal_timestamp` is a replay and MUST be discarded (not applied, not logged as a state ...",
    "decision_boundary": "The boundary is between two receiver postures: - **Optimistic reconciliation** (apply every update, trust the sender's ordering): correct only when the transport guarantees exactly-once, in-order delivery. A2A push notifications do not. This posture is invalid for any receiver that acts on state transitions. - **Terminal-locked reconciliation** (once termina...",
    "operational_effect": "The practical consequence is that **terminality is a receiver-side invariant, not a sender-side guarantee.** An A2A client that acts on task state must maintain a per-`taskId` terminal record that is written atomically with the terminal state, checked before every webhook application, and never cleared. The record must store the terminal timestamp and, where..."
  },
  "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": "082c9f08da4f8460aa4f671f9e7cda39b0ccb3133e9adb59c64308a22d4637e6",
    "verified_classes": [
      "StaleTaskReplayError",
      "TaskRecord",
      "TerminalLockedReconciler"
    ],
    "verified_functions": [
      "handle_push_notification",
      "__init__",
      "_record_for",
      "apply_update",
      "side_effect_guard"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleTaskReplayError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
