{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-span-level-hallucination-attribution-from-collapsing-under-genai-semantic-convention-drift",
  "title": "Which invariants prevent span-level hallucination attribution from collapsing under GenAI semantic convention drift",
  "date_of_record": "2026 November 25",
  "scope": "Applies to trace-based hallucination attribution pipelines that reconstruct an agent's reasoning from OpenTelemetry GenAI spans (`gen_ai.*` attributes) emitted by one or more LLM/tool runtimes. Does not apply to systems that attribute hallucination purely from the final output text without span reconstruction, nor to single-vendor traces where the emitter and the attribution consumer share a locked schema version.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-span-level-hallucination-attribution-from-collapsing-under-genai-semantic-convention-drift.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-span-level-hallucination-attribution-from-collapsing-under-genai-semantic-convention-drift.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-span-level-hallucination-attribution-from-collapsing-under-genai-semantic-convention-drift.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1999,
    "python_slice_tokens": 427,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a span is missing an attribute.\" It is that *attribute semantics drift across the span tree while remaining individually well-formed*, so a conformance test that validates each span in isolation passes, yet the reconstructed reasoning graph attributes a hallucination to the wrong step. The distinction that matters: **schema validity is pe...",
    "what_was_observed": "A three-step agent (retrieve → reason → answer) emitted spans under a mixed fleet: two model runtimes on convention revision A and one on revision B. The attribution consumer built a directed graph by joining spans on `trace_id` and ordering by `start_time_unix_nano`, then walked backward from the answer span to the first span whose `gen_ai.completion` text contained the claim's n-gram. Observed failure trace: 1. Run...",
    "condition_of_validity": "Attribution is only valid when three cross-span invariants hold simultaneously. They are *not* implied by per-span conformance and must be asserted separately. - **Total ordering invariant.** Every span in the trace carries a strictly monotonic, collision-free ordering key. `start_time_unix_nano` at millisecond resolution violates this the moment a retry re-...",
    "decision_boundary": "The boundary between \"trust the reconstructed graph\" and \"refuse and re-derive\" is crossed when any of the following is detected during conformance testing *before* attribution runs: - **Ordering collision:** two spans share `(trace_id, ordering_key)`. Decision: refuse attribution for that trace; do not tie-break by span_id lexicographic order (that reintrod...",
    "operational_effect": "When the three invariants are enforced, the operational effect is a shift from probabilistic blame to bounded blame. Attribution verdicts become replay-stable: identical trace bytes yield identical verdicts across N replays, and the auditor can certify a hallucination source with a confidence that is a property of the *graph*, not of a sampling seed. When th..."
  },
  "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": "44f4b7f80f4b9461c25ce1285cd7ca2fa4358b729ada82278cb771840d68a5d1",
    "verified_classes": [
      "TraceAttributionRefused",
      "Span"
    ],
    "verified_functions": [
      "assert_attribution_invariants",
      "attribute_hallucination"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TraceAttributionRefused"
    ],
    "sample_fail_closed_invariants": [
      "empty trace: nothing to attribute"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
