{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-broken-trace-to-eval-exemplar-linkage-under-genai-semantic-conventions",
  "title": "What structural signals indicate broken trace-to-eval exemplar linkage under GenAI semantic conventions",
  "date_of_record": "2026 November 17",
  "scope": "Applies to systems that attach evaluation or safety outcomes to spans via OpenTelemetry GenAI semantic conventions (`gen_ai.*` attributes plus exemplar/link references to eval and moderation records) where the eval record is produced asynchronously relative to the traced inference call. Does not apply to synchronous inline scoring, where the score is part of the span at emission time, nor to offline batch eval runs that are joined after the fact by a stable primary key.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-broken-trace-to-eval-exemplar-linkage-under-genai-semantic-conventions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-broken-trace-to-eval-exemplar-linkage-under-genai-semantic-conventions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-broken-trace-to-eval-exemplar-linkage-under-genai-semantic-conventions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1725,
    "python_slice_tokens": 426,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between **referential integrity** and **semantic integrity** of exemplar links. A trace can hold a perfectly valid, resolvable pointer to an eval or safety record — the record exists, the ID parses, the join returns a row — while the link is semantically broken because the eval was computed on a *different* input/output pair than ...",
    "what_was_observed": "Across a set of production traces where async safety and eval pipelines wrote back to spans, three structural signals co-occurred whenever the exemplar linkage was semantically broken: 1. **Response-identity divergence.** The span carried `gen_ai.response.id` (or an equivalent completion hash) that did not match the `response_id` embedded in the linked eval record, even though `trace_id` and `span_id` matched. The li...",
    "condition_of_validity": "The exemplar link is semantically valid only when all of the following hold at join time: - The eval record's response identity equals the span's terminal response identity (the completion actually returned to the caller, after any streaming reassembly and any retry resolution). - The eval record's `evaluated_at` is not earlier than the span's terminal `end_...",
    "decision_boundary": "Operators must decide, per pipeline, whether a semantically-broken link is **dropped**, **flagged**, or **quarantined pending reconciliation**. The decision boundary turns on whether the downstream consumer is: - **Aggregate correlation** (eval pass-rate vs. latency, safety-flag rate vs. model revision): a broken link silently biases the aggregate. These mus...",
    "operational_effect": "The practical effect of missing this boundary is **false attribution of safety and eval outcomes to the wrong completions**, concentrated exactly where it matters most: retries and re-generations, which are disproportionately the cases where the first completion was problematic. A safety flag raised on a retried completion gets attached to the span of the *s..."
  },
  "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": "20c5a99febca2e0ccfe5ebc5df76d1f53577716049df20e8cbe023f82a666f41",
    "verified_classes": [
      "ExemplarLinkIntegrityError",
      "SpanRecord",
      "EvalRecord"
    ],
    "verified_functions": [
      "assert_link_valid",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ExemplarLinkIntegrityError"
    ],
    "sample_fail_closed_invariants": [
      "referential mismatch: eval does not resolve to this span",
      "fan-out ambiguity: span absorbed multiple completions; link is ambiguous"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "datetime"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
