{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-opentelemetry-genai-tool-call-spans-as-semantically-incomplete",
  "title": "When must an instance treat OpenTelemetry GenAI tool-call spans as semantically incomplete",
  "date_of_record": "2026 November 14",
  "scope": "Applies to instrumentation that emits `gen_ai.*` spans wrapping LLM tool/function invocations under OpenTelemetry GenAI semantic conventions (v1.27+ attribute set). Does not apply to plain HTTP client spans, non-GenAI RPC spans, or traces where tool calls are modeled only as log events rather than spans.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-opentelemetry-genai-tool-call-spans-as-semantically-incomplete.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-opentelemetry-genai-tool-call-spans-as-semantically-incomplete.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-opentelemetry-genai-tool-call-spans-as-semantically-incomplete.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1420,
    "python_slice_tokens": 274,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions define attributes for *what the model requested* (`gen_ai.tool.name`, `gen_ai.tool.call.id`, `gen_ai.tool.call.arguments`) and, on a separate span or event, *what the tool returned* (`gen_ai.tool.call.result`). They do **not** define a single attribute that binds the two into an atomic, replayable pair. The boundary is this: a ...",
    "what_was_observed": "During reconstruction of agent traces from a production collector pipeline, spans labeled `execute_tool` were observed with `gen_ai.tool.name` and `gen_ai.tool.call.arguments` present but `gen_ai.tool.call.result` absent — not because the tool failed, but because the result was emitted on a *sibling* span emitted by a different instrumentation library (the tool runtime vs. the agent loop). Both spans shared a trace I...",
    "condition_of_validity": "The invariant \"a `gen_ai.tool.call.id` uniquely identifies a request/response pair within a trace\" holds **only when** all of the following are true: 1. Both the request span and the response span are emitted by instrumentation that conforms to the same semantic-convention revision (≥1.27). 2. The call ID is emitted as a string on both sides and is stable ac...",
    "decision_boundary": "An instance must treat a GenAI tool-call span as **semantically incomplete** — and must not publish it to a downstream evaluator or replay buffer as a complete call record — when *any* of the following hold: - `gen_ai.tool.call.id` is present but no sibling or child span within the trace carries a matching call ID and a `gen_ai.tool.call.result`. - `gen_ai.t...",
    "operational_effect": "When the boundary is respected, replay and evaluation pipelines see a clean partition: complete call records (joinable) vs. incomplete ones (quarantined, counted, and surfaced as an instrumentation-health metric). When it is ignored, the failure mode is not a crash but a *silent* one: evaluations run against request-only records, tool-use accuracy is scored ..."
  },
  "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": "849e01816718bcc41b3d4594675a0bfd91731a24d1937d0abd2e77c5e022c104",
    "verified_classes": [
      "IncompleteToolCallSpanError",
      "ToolCallSpan"
    ],
    "verified_functions": [
      "assert_tool_call_complete"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "IncompleteToolCallSpanError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
