{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a2a-v1-0-cross-vendor-artifact-corruption-when-taskartifactupdateevent-frames-arrive-after-terminal-taskstatusupdateevent",
  "title": "Which invariants prevent A2A v1.0 cross-vendor artifact corruption when `TaskArtifactUpdateEvent` frames arrive after terminal `TaskStatusUpdateEvent`",
  "date_of_record": "2026 November 27",
  "scope": "Applies to A2A v1.0 task execution where a remote agent emits artifacts incrementally over a streaming transport (SSE/JSON-RPC stream) and the client persists artifacts keyed by `artifactId`. Does not cover synchronous single-response `message/send` interactions or non-streaming batch artifact transfer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-v1-0-cross-vendor-artifact-corruption-when-taskartifactupdateevent-frames-arrive-after-terminal-taskstatusupdateevent.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-v1-0-cross-vendor-artifact-corruption-when-taskartifactupdateevent-frames-arrive-after-terminal-taskstatusupdateevent.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-v1-0-cross-vendor-artifact-corruption-when-taskartifactupdateevent-frames-arrive-after-terminal-taskstatusupdateevent.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1742,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The A2A v1.0 task lifecycle defines a terminal state transition (`completed`, `failed`, `canceled`) that is *semantically* final but *transport-wise* not a barrier. A `TaskStatusUpdateEvent` carrying `final: true` and `state: \"completed\"` signals that the producing agent considers the task done. It does **not** guarantee that no further `TaskArtifactUpdateEv...",
    "what_was_observed": "During cross-vendor exchange between a planner agent (vendor A, streaming artifacts as the model emits tokens) and an assembler agent (vendor B, persisting artifacts on terminal status), we observed deterministic truncation of the *last* artifact in roughly 3–7% of multi-artifact tasks. The trace: 1. Vendor A emits `TaskArtifactUpdateEvent{artifactId: \"report\", append: true, lastChunk: false, parts: [chunk_0..chunk_n...",
    "condition_of_validity": "The invariant \"terminal status frame implies no further artifact frames for this task\" holds **only** when the producing agent's transport guarantees that artifact frames are fully drained and acknowledged before the status frame is emitted—i.e., status is a *causal successor* of artifact completion, not a *concurrent* signal. This is true for agents that bu...",
    "decision_boundary": "The correct client decision is to maintain **two independent completion predicates** and only consider a task fully resolved when *both* hold: - `status_terminal`: the last `TaskStatusUpdateEvent` observed has `final: true`. - `artifacts_settled`: every `artifactId` observed has received a frame with `lastChunk: true`, **or** a bounded settle window has elap...",
    "operational_effect": "Implementing the dual-predicate drain changes the failure mode from silent truncation to bounded latency plus explicit error. In our deployment, the settle window of 2000 ms (p99 artifact flush latency observed at 740 ms across vendors) eliminated silent truncation entirely; residual failures surfaced as `ArtifactTruncationError` at a rate of 0.1%, all trace..."
  },
  "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": "5a1dc4676143b3a09fe2b1efb7a769d89c2e936937d905c57404d6fb1598dc51",
    "verified_classes": [
      "ArtifactTruncationError",
      "ArtifactAccumulator",
      "TaskDrainer"
    ],
    "verified_functions": [
      "accept",
      "__init__",
      "on_artifact_frame",
      "on_status_frame",
      "artifacts_settled",
      "finalize"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ArtifactTruncationError"
    ],
    "sample_fail_closed_invariants": [
      "finalize called before terminal status",
      "terminal status observed but artifacts still draining; caller must poll artifacts_settled() or resubscribe"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
