{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-emits-genai-span-attributes-that-drift-from-the-semantic-conventions-across-a-multi-turn-agent-trace",
  "title": "What happens when an instance emits GenAI span attributes that drift from the semantic conventions across a multi-turn agent trace",
  "date_of_record": "2026 November 25",
  "scope": "Applies to any agent runtime that emits OpenTelemetry GenAI semantic-convention spans (`gen_ai.*`) across multi-turn or multi-step traces where a single logical conversation is reconstructed from spans by a downstream observability or eval consumer. Does not apply to single-shot inference calls with no turn-to-turn correlation, nor to traces consumed only by humans reading a waterfall UI.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-genai-span-attributes-that-drift-from-the-semantic-conventions-across-a-multi-turn-agent-trace.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-genai-span-attributes-that-drift-from-the-semantic-conventions-across-a-multi-turn-agent-trace.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-emits-genai-span-attributes-that-drift-from-the-semantic-conventions-across-a-multi-turn-agent-trace.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1665,
    "python_slice_tokens": 372,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The GenAI semantic conventions are a *schema for reconstruction*, not a logging format. The distinction that matters operationally is between **attribute presence** (a span carries `gen_ai.conversation.id`, `gen_ai.usage.input_tokens`, `gen_ai.request.model`) and **attribute coherence** (the set of attributes across all spans of a trace, when replayed in tim...",
    "what_was_observed": "A multi-turn agent (turn budget ~12, tool-calling loop) was instrumented to emit one span per model invocation with `gen_ai.conversation.id` set from a session-scoped UUID, `gen_ai.request.model` from the model actually dispatched, and `gen_ai.usage.input_tokens` from the provider response. On turn 7 the primary model returned a 429 and the runtime's retry policy fell back to a smaller model for that single turn, the...",
    "condition_of_validity": "The invariant that makes a multi-turn trace reconstructable is: > For every trace `T` with a stable `gen_ai.conversation.id = S`, the ordered span sequence `s_1 … s_n` must satisfy: (a) the *logical* context passed to `s_{i+1}` is derivable from the emitted attributes of `s_i` and its ancestors; and (b) any per-span attribute that a consumer may use as a gro...",
    "decision_boundary": "The runtime must choose, at each emission site, between two mutually exclusive disciplines: 1. **Conversation-stable emission**: `gen_ai.conversation.id` is the only grouping key; all other varying attributes are treated as *observations*, never as grouping keys, and the runtime emits an explicit `gen_ai.agent.turn.transition` event (or a child span) at ever...",
    "operational_effect": "Unmarked variation produces three concrete downstream failures: - **False anomaly signals**: token-count deltas across a fallback boundary look like context corruption. Review queues fill with correct traces. - **Silent fragmentation**: grouping by `(conversation.id, request.model)` splits one logical conversation into N fragments, each of which appears to t..."
  },
  "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": "deeb1d2cdaa48c6bceca0cc46dae776198eeedd8dbe1a4f8e64bd9714195af00",
    "verified_classes": [
      "TraceCoherenceError",
      "ConversationState"
    ],
    "verified_functions": [
      "emit_span",
      "replay_fallback_trace"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TraceCoherenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
