{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a2a-v1-0-streaming-update-replay-from-silently-orphaning-opentelemetry-genai-spans-across-task-resumption-boundaries",
  "title": "Which invariants prevent A2A v1.0 streaming update replay from silently orphaning OpenTelemetry GenAI spans across task resumption boundaries",
  "date_of_record": "2026 November 29",
  "scope": "Applies to A2A v1.0 task lifecycles where `TaskStatusUpdateEvent` and `TaskArtifactUpdateEvent` frames are streamed over SSE and each frame is annotated with a W3C `traceparent`/`tracestate` plus an OpenTelemetry GenAI `gen_ai.*` span attribute set. Does not cover request/response-only A2A interactions, nor non-streaming `tasks/get` polling where correlation is re-derived at read time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-v1-0-streaming-update-replay-from-silently-orphaning-opentelemetry-genai-spans-across-task-resumption-boundaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-v1-0-streaming-update-replay-from-silently-orphaning-opentelemetry-genai-spans-across-task-resumption-boundaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a2a-v1-0-streaming-update-replay-from-silently-orphaning-opentelemetry-genai-spans-across-task-resumption-boundaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1826,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A2A v1.0 defines a task as a durable, resumable object identified by `task.id` with an append-only `status.history`. OpenTelemetry GenAI semantic conventions define spans as ephemeral, non-resumable telemetry with a 128-bit `trace_id` and 64-bit `span_id`. The naive assumption is that these two identifier spaces are isomorphic: that every streamed update car...",
    "what_was_observed": "A coordinator agent (`planner`) delegated a 14-step research task to a worker (`researcher`) over A2A v1.0 SSE. At step 6 the worker's `TaskStatusUpdateEvent` (`state: \"working\"`, `final: false`) was emitted with `traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01` and a GenAI span `gen_ai.operation.name=invoke_agent`, `gen_ai.agent.name=researcher`. The SSE connection dropped at ~T+38s (network hic...",
    "condition_of_validity": "The bijection invariant holds only under all of the following: 1. The A2A `Task.status.history` is treated as the *authoritative* causal index, and each entry is assigned a deterministic `history_index` at append time (not at emission time). 2. The emitting agent persists `(task.id, history_index) -> trace_id` in the task store *before* the SSE frame is flus...",
    "decision_boundary": "The boundary is the point at which the coordinator must decide whether a duplicate `history_index` span is a *replay* (benign, expected on resumption) or a *re-execution* (a real defect, possibly a tool-call side effect applied twice). The decision cannot be made from span data alone. It requires one of: - A monotonic `execution_attempt` counter in the A2A `...",
    "operational_effect": "With the invariant enforced (persisted `history_index -> trace_id` mapping, replay-flagged retry spans, dedup on `history_index`), the observed incident becomes a single trace with a single `invoke_agent` span and a child `gen_ai.a2a.replay` span. The auditor sees one execution, one replay, zero re-executions, and does not escalate. The cost is one durable w..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "2f40931d2ae107d0ba8bcf82b09d8cdcaf37b098329b6ba5fbc096ba6e741e6b",
    "verified_classes": [
      "AmbiguousReplayError",
      "SpanRecord",
      "SpanCorrelator"
    ],
    "verified_functions": [
      "ingest",
      "record"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "AmbiguousReplayError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
