{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a2a-artifact-chunk-reassembly-from-silently-diverging-when-a-long-running-task-crosses-a-input-required-suspension",
  "title": "Which invariants prevent A2A artifact-chunk reassembly from silently diverging when a long-running task crosses a `input-required` suspension",
  "date_of_record": "2026 November 27",
  "scope": "Applies to A2A v1.0 task lifecycles where a remote agent streams `Artifact` parts incrementally across multiple `TaskStatusUpdateEvent`/`TaskArtifactUpdateEvent` messages and the task enters an interrupted state (`input-required`, `auth-required`) or a resumed state after transport reconnection. Does not cover single-shot synchronous `message/send` calls that return a complete artifact in one response, nor does it cover A2A transport-level retry semantics (that is the transport binding's concern, not the task state machine's).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-artifact-chunk-reassembly-from-silently-diverging-when-a-long-running-task-crosses-a-input-required-suspension.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-artifact-chunk-reassembly-from-silently-diverging-when-a-long-running-task-crosses-a-input-required-suspension.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-artifact-chunk-reassembly-from-silently-diverging-when-a-long-running-task-crosses-a-input-required-suspension.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1895,
    "python_slice_tokens": 407,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A2A v1.0 separates two things that look identical on the wire but obey different invariants: **task lifecycle state** (the `Task.status.state` machine: `submitted → working → input-required → working → completed/failed/canceled`) and **artifact accumulation** (the ordered set of `Artifact` objects each carrying `parts[]` and an `append`/`lastChunk` flag). Th...",
    "what_was_observed": "A planner agent (client) delegated a document-synthesis task to a worker agent (server) over A2A v1.0. The worker streamed a 14-part artifact across 9 `TaskArtifactUpdateEvent` messages, each with `artifact.artifact_id = \"draft-7\"`, monotonically increasing `append=true` chunks, and `lastChunk=false` until the final chunk. At chunk 6 the worker hit a missing parameter and transitioned to `input-required`, emitting a ...",
    "condition_of_validity": "The invariant that prevents this class of divergence is: > **For any artifact stream that spans an `input-required` or `auth-required` suspension, the sender MUST either (a) re-emit the artifact from a defined restart boundary with `append=false` and a fresh `artifact_id`, or (b) attach a stable `chunk_index` (monotonic, suspension-invariant) to every chunk ...",
    "decision_boundary": "The boundary is the moment the worker serializes its state at suspension. Two designs are admissible: - **Checkpoint-with-cursor:** persist `(artifact_id, chunk_index, byte_offset, partial_codepoint_state)` alongside the rendered artifact. On resume, continue emitting from `chunk_index + 1` with the same `artifact_id`. The receiver's index check catches any ...",
    "operational_effect": "When the invariant holds, a suspended-and-resumed artifact stream is *replay-equivalent* to an uninterrupted stream: the receiver's final artifact is byte-identical to what it would have been without the suspension. This is what allows a planner agent to treat a worker's artifact as a durable value across the planner's own context-window evictions — the plan..."
  },
  "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": "5dcdedd7c01d7f00446c000858bf9afd6f556a0de43623dde9f662c994ad395c",
    "verified_classes": [
      "ArtifactContinuityError",
      "Chunk",
      "ArtifactBuffer"
    ],
    "verified_functions": [
      "accept",
      "mark_suspended",
      "assemble"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "ArtifactContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
