{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-anchor-a-hallucination-score-when-otel-span-linkage-is-only-causally-complete-not-referentially-complete",
  "title": "Where must an instance anchor a hallucination score when OTel span linkage is only causally complete, not referentially complete?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to online hallucination scoring pipelines that derive eval labels by joining OTel spans (generation, retrieval, tool) into a trace-local evidence bundle and scoring the LLM output against that bundle. Does not apply to offline batch evals over curated datasets, nor to single-span scoring where no cross-span evidence join is required.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-anchor-a-hallucination-score-when-otel-span-linkage-is-only-causally-complete-not-referentially-complete.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-anchor-a-hallucination-score-when-otel-span-linkage-is-only-causally-complete-not-referentially-complete.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-anchor-a-hallucination-score-when-otel-span-linkage-is-only-causally-complete-not-referentially-complete.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1884,
    "python_slice_tokens": 459,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace is *causally complete* when every span in it is reachable from the root via parent-child links — the trace ID scopes the whole causal subtree. A trace is *referentially complete* when every span that contributed to the model's output is present *in the trace*. These are different invariants. OTel's context propagation guarantees the first. Nothing in...",
    "what_was_observed": "A retrieval-augmented generation service emitted, per request, a root `invoke_agent` span, a `retrieval.search` span (child), and a `llm.generate` span (child). The retrieval span carried 12 chunk IDs as `retrieval.doc_ids` and the assembled context as `retrieval.context_text`. The generation span carried the prompt hash and the completion. The online scorer joined them by trace ID, extracted `context_text` from the ...",
    "condition_of_validity": "The scorer's label is valid only if, for every generation span `g`, the evidence set `E(g)` assembled from the trace satisfies: `E(g) ⊇ { s : s.contributed_to(g) }` In practice this requires the scorer to *prove* evidence sufficiency rather than assume it. Three concrete conditions: 1. **The generation span must declare its evidence dependencies.** A `llm.ge...",
    "decision_boundary": "The boundary is whether the scorer can distinguish *\"the model was not grounded\"* from *\"the scorer could not see the grounding.\"* These produce identical entailment outputs against an empty or truncated premise but require opposite operational responses: the first is a model-quality signal, the second is a telemetry-plumbing signal. The decision rule: - If ...",
    "operational_effect": "After enforcing the invariant: - The 41% \"hallucination\" window resolved to a 38% `UNSCORABLE` window with a flat 2.0% hallucination rate over scorable traces. The on-call runbook now routes `UNSCORABLE` spikes to the trace-propagation dashboard first. - The poisoned eval set was quarantined and rebuilt only from traces with `evidence_complete=true`. - The r..."
  },
  "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": "0cbe697333ca41791e94b8a21c60ae124a181bbceb326d5a663b7b0a9d3a7c34",
    "verified_classes": [
      "EvidenceIncompleteError",
      "Span",
      "Trace"
    ],
    "verified_functions": [
      "score_hallucination",
      "_entails",
      "run_scorer",
      "find_by_name"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "EvidenceIncompleteError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
