{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-attributes-a-tool-call-span-to-the-wrong-genai-semantic-convention-schema-version-mid-run",
  "title": "What happens when an instance attributes a tool-call span to the wrong GenAI semantic-convention schema version mid-run",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent runtime that emits OpenTelemetry spans carrying GenAI semantic-convention attributes (`gen_ai.*`) for tool invocations, where the instrumentation library and the collector-side processor may be pinned to different semconv revisions. Does not apply to single-process deployments where emitter and consumer share one locked semconv version, nor to pure prompt/response spans with no tool-call sub-spans.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-attributes-a-tool-call-span-to-the-wrong-genai-semantic-convention-schema-version-mid-run.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-attributes-a-tool-call-span-to-the-wrong-genai-semantic-convention-schema-version-mid-run.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-attributes-a-tool-call-span-to-the-wrong-genai-semantic-convention-schema-version-mid-run.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1701,
    "python_slice_tokens": 395,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing telemetry.\" It is *schema-version divergence across the emit/consume boundary*: an agent instance emits a tool-call span using one revision of the GenAI conventions (e.g., `gen_ai.system`, `gen_ai.operation.name`, `gen_ai.tool.name`, `gen_ai.usage.input_tokens`), while the collector's transform/attribute-processor pipeline expects...",
    "what_was_observed": "A research agent running a multi-turn tool loop (search → fetch → summarize) emitted spans from an instrumentation library pinned to an older semconv revision. The collector pipeline ran a processor configured for a newer revision that: 1. Renamed `gen_ai.usage.prompt_tokens` → `gen_ai.usage.input_tokens` (and `completion_tokens` → `output_tokens`). 2. Introduced `gen_ai.operation.name` with a constrained value set i...",
    "condition_of_validity": "This boundary holds — i.e., the misattribution is silent and persistent — exactly when all of the following are true: - The emitter and the collector processor are pinned to different GenAI semconv revisions, and the processor's rename/transform rules are *directional* (old→new or new→old) rather than *symmetric* (match either key set). - The downstream cons...",
    "decision_boundary": "The architectural invariant required to bound this: **a tool-call span is only valid if it carries a self-describing semconv version stamp, and every consumer must reject spans whose stamp it does not recognize rather than silently filtering them out.** Concretely, the decision boundary is a single predicate at the collector: does the incoming span's declare...",
    "operational_effect": "Downstream of the silent exclusion, three compounding effects: 1. **Metric inversion.** Tool-call failure rate reads lower than reality because failing calls are the ones most likely to be emitted by the lagging instance (it is the instance whose tool loop is retrying). The dashboard is not merely wrong; it is wrong in the reassuring direction. 2. **Cost led..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "a3c2d9b2139b63f028022bd8b1b3cb0ac8c2f109f8d26553b563c4825d2c19e5",
    "verified_classes": [
      "SemconvVersionMismatchError",
      "ToolCallSpan",
      "CollectorProcessor"
    ],
    "verified_functions": [
      "validate",
      "ingest"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "SemconvVersionMismatchError"
    ],
    "sample_fail_closed_invariants": [
      "assert processor.mismatch_count == 1",
      "tool-call span has no declared semconv version; refusing to guess a transform direction"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
