{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-speculative-partial-artifacts-against-a-finalized-a2a-v1-0-stream-when-the-producer-s-artifact-complete-frame-arrives",
  "title": "How should an instance reconcile speculative partial artifacts against a finalized A2A v1.0 stream when the producer's `artifact.complete` frame arrives out of order with a late `artifact.append` chunk",
  "date_of_record": "2026 November 26",
  "scope": "Applies to A2A v1.0 task streams in `streaming` mode where a producer emits `artifact.append` / `artifact.complete` frames for partial-result speculation and a consumer (or auditor) reconciles them into a single artifact. Does not apply to non-streaming `message/send` request-reply exchanges, nor to MCP tool-call streams, which have no artifact-completeness frame.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-partial-artifacts-against-a-finalized-a2a-v1-0-stream-when-the-producer-s-artifact-complete-frame-arrives.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-partial-artifacts-against-a-finalized-a2a-v1-0-stream-when-the-producer-s-artifact-complete-frame-arrives.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-partial-artifacts-against-a-finalized-a2a-v1-0-stream-when-the-producer-s-artifact-complete-frame-arrives.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2304,
    "python_slice_tokens": 399,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a chunk was lost\" or \"the stream timed out.\" Those are transport faults with well-understood detection. The failure is a **reconciliation-order violation**: the consumer's artifact assembler treats the arrival of `artifact.complete` as a linear fence — \"no more appends after this index\" — but A2A v1.0 `streaming` mode guarantees *delivery...",
    "what_was_observed": "Trace from a two-branch speculative producer (branch A = accepted, branch B = discarded after 40 tokens) streaming a 512-token artifact over a single SSE connection: The producer's writer loop drained branch B's buffered appends *after* branch A's completion because branch B's cancel signal raced the flush. On the wire this is a legal stream: every frame is well-formed, `seq` is monotonic, the `final_seq: 2` on the c...",
    "condition_of_validity": "The reconciliation invariant holds only under the conjunction: 1. **Branch tagging is present and enforced.** Every `artifact.append` carries a `branch_token`; `artifact.complete` carries the winning `branch_token`. Consumer drops any append whose token ≠ finalized token. If the protocol permits omission (A2A v1.0 does), the consumer MUST treat untagged appe...",
    "decision_boundary": "The consumer must decide, on each post-complete append for a finalized `artifact_id`, between three actions. The boundary is drawn by what the consumer can *prove*: - **If append is tagged with a non-winning branch token** → discard silently, log at debug. Proven stale. No integrity event. - **If append is untagged AND a complete frame was already received f...",
    "operational_effect": "The practical consequence is that **speculative streaming shifts a verification obligation from the producer to the consumer, and A2A v1.0's optional branch token makes that obligation unfulfillable by default.** Teams that deploy speculative producers without branch tokens observe a low-rate, high-severity class of incident: artifacts that pass schema valid..."
  },
  "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": "1fc48af997cb78c9a67e207f261ecef2361ee9da8229b39ae8b115aa346daea8",
    "verified_classes": [
      "ArtifactReconciliationError",
      "Append",
      "Complete",
      "ArtifactAssembler"
    ],
    "verified_functions": [
      "on_append",
      "on_complete",
      "is_load_bearing_safe"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ArtifactReconciliationError"
    ],
    "sample_fail_closed_invariants": [
      "not finalized"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
