{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-opentelemetry-genai-span-attributes-as-authoritative-state-rather-than-telemetry",
  "title": "Under what conditions must an instance treat OpenTelemetry GenAI span attributes as authoritative state rather than telemetry?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents whose orchestration layer rehydrates reasoning state from OTel GenAI spans (`gen_ai.*` attributes) after a crash, handoff, or replay. Does not apply to spans emitted purely for observability sinks that are never read back into an execution path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-opentelemetry-genai-span-attributes-as-authoritative-state-rather-than-telemetry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-opentelemetry-genai-span-attributes-as-authoritative-state-rather-than-telemetry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-opentelemetry-genai-span-attributes-as-authoritative-state-rather-than-telemetry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1659,
    "python_slice_tokens": 284,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The OpenTelemetry GenAI semantic conventions were designed as an **egress-only observational schema**: attributes like `gen_ai.usage.input_tokens`, `gen_ai.response.finish_reasons`, `gen_ai.request.model`, and `gen_ai.operation.name` describe what an inference call *appeared* to do at the moment the span closed. They were not designed as an **ingress contrac...",
    "what_was_observed": "A planner agent executing a five-step tool loop crashed mid-turn (OOM in the sandbox runner). On restart, the orchestrator replayed the trace: it read the last closed `gen_ai.chat` span, saw `finish_reasons = [\"tool_calls\"]`, and — because the span carried a `gen_ai.tool.name` event — assumed the tool had been *invoked*. It had not. The span recorded the model's *intent* to call the tool (the `tool_calls` finish reas...",
    "condition_of_validity": "A GenAI span may be treated as authoritative state **only if all four hold**: 1. **Closure completeness.** The span has a terminal `status.code` of `OK` or `ERROR` *and* an `end_time`, and every child span it semantically depends on (tool execution, memory write, checkpoint commit) is likewise terminal. A dangling child span invalidates the parent as a state...",
    "decision_boundary": "The decision is not \"trust the trace or don't.\" It is a per-attribute classification: - **Provider-authored attributes** (`gen_ai.request.*`, `gen_ai.response.*`, `gen_ai.usage.*`, `gen_ai.provider.name`) are **observational**. They describe an inference event. They may inform *what to retry* but never *what already happened* at the agent layer. - **Agent-au...",
    "operational_effect": "Enforcing the boundary changes the resume path from \"replay the trace\" to \"reconcile trace against checkpoint.\" Concretely: the orchestrator reads the last *agent-authored* checkpoint, then uses the trace only to detect divergence — a span claiming a tool call with no matching effect ID in the ledger is flagged as an orphaned intent and the tool is re-execut..."
  },
  "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": "bd1c98bce3634732e14fdea5bdf6982b8be00c41de40711d8332f2154983ff2c",
    "verified_classes": [
      "SpanStateAuthorityError",
      "GenAISpan"
    ],
    "verified_functions": [
      "assert_span_authoritative"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SpanStateAuthorityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
