{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-artifact-stream-and-push-callback-divergence-in-a2a-v1-0-task-lifecycles",
  "title": "Which invariants prevent artifact-stream and push-callback divergence in A2A v1.0 task lifecycles",
  "date_of_record": "2026 November 13",
  "scope": "Applies to A2A v1.0 agents that emit streaming artifacts (`TaskArtifactUpdateEvent`) while simultaneously delivering task-state transitions through server-initiated push-notification callbacks to a client-registered webhook. Does not apply to polling-only clients, nor to agents that never emit incremental artifact chunks.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-artifact-stream-and-push-callback-divergence-in-a2a-v1-0-task-lifecycles.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-artifact-stream-and-push-callback-divergence-in-a2a-v1-0-task-lifecycles.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-artifact-stream-and-push-callback-divergence-in-a2a-v1-0-task-lifecycles.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1270,
    "python_slice_tokens": 216,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The A2A v1.0 task lifecycle defines two *independent* delivery channels for the same logical task: the streaming channel (SSE `message/stream`, carrying `TaskStatusUpdateEvent` and `TaskArtifactUpdateEvent`) and the push-notification channel (HTTP POST to a client-registered `pushNotificationConfig.url`, carrying task state snapshots). The specification trea...",
    "what_was_observed": "During a load test of a document-synthesis agent (task per request, ~14 artifact chunks, average 3.2s to terminal), we recorded 1,847 completed tasks and reconciled the two channels per task. In 212 cases (11.5%) the push callback carrying `state: completed` arrived at the webhook *before* the final `TaskArtifactUpdateEvent` with `lastChunk: true` was observed on the SSE stream. In 31 cases the webhook never received...",
    "condition_of_validity": "The divergence is only possible when all of the following hold: (a) the agent emits multi-chunk artifacts (`append: true` on non-final events); (b) push notifications are enabled for the task; (c) the callback dispatcher is decoupled from the stream writer (separate goroutine, queue, or process); and (d) the client treats the callback's terminal state as a b...",
    "decision_boundary": "The correct invariant is: **a task may transition to a terminal state only after the final artifact chunk (`lastChunk: true`) has been durably enqueued on every active delivery channel, and the terminal push callback must be dispatched after that enqueue completes.** This makes the callback's terminal state a valid barrier for artifact completeness. The alte...",
    "operational_effect": "After enforcing enqueue-before-terminal, truncation dropped to 0/2,104 over the next run. The residual cost is a bounded latency increase on the terminal callback (mean +18ms, p99 +140ms under artifact-channel backpressure) and a new failure mode to guard: if the artifact channel is full and the emitter blocks, the terminal callback is delayed indefinitely a..."
  },
  "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": "f81a21ef25e312af156e1f3ddce88885e667d14ffa883b1b18c4acab5541a4e1",
    "verified_classes": [
      "ArtifactFlushInvariantError",
      "TaskChannelState"
    ],
    "verified_functions": [
      "publish_terminal_callback",
      "__init__",
      "mark_chunk_enqueued",
      "assert_terminal_publishable"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ArtifactFlushInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
