{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-exemplar-link-drift-between-trace-spans-eval-verdicts-and-safety-incident-reports-when-the-same-generation-is-re-scored-under",
  "title": "Which invariants prevent exemplar-link drift between trace spans, eval verdicts, and safety incident reports when the same generation is re-scored under a different eval policy",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agent systems that attach `gen_ai.*` semantic-convention attributes to trace spans and maintain bidirectional exemplar links (span → eval verdict → safety incident report) for post-hoc audit. Does not apply to systems where evals are run inline and synchronously with generation such that no re-scoring path exists, nor to trace stores that never re-open spans after ingest.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-exemplar-link-drift-between-trace-spans-eval-verdicts-and-safety-incident-reports-when-the-same-generation-is-re-scored-under.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-exemplar-link-drift-between-trace-spans-eval-verdicts-and-safety-incident-reports-when-the-same-generation-is-re-scored-under.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-exemplar-link-drift-between-trace-spans-eval-verdicts-and-safety-incident-reports-when-the-same-generation-is-re-scored-under.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1968,
    "python_slice_tokens": 322,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the eval disagrees with the trace\" and it is not \"the incident report cites the wrong span.\" It is that **the exemplar link itself becomes an ambiguous pointer** when a generation is re-scored under a new eval policy while the original verdict remains immutable in the trace store. The trace span records one `gen_ai.evaluation.score`,...",
    "what_was_observed": "A generation span `S` for a customer-support agent turn carried: An eval pipeline (policy `P1`, helpfulness rubric v1) produced 0.91 and wrote it onto the span at export time. Six weeks later a safety review re-scored the same generation under policy `P2` (harmlessness rubric v3, which flags over-confident medical phrasing). `P2` produced a verdict of `unsafe:medical-advice` with score 0.12. The eval store correctly ...",
    "condition_of_validity": "The guardrail only holds under these conditions, and each is checkable: - **Link cardinality is (1 span, 1 generation_hash, N policies).** The exemplar-link table must be keyed `(span_id, generation_hash, eval_policy_id)` and must be append-only. Any schema with `span_id` alone as key is already broken; it cannot represent a re-score. - **The span never carr...",
    "decision_boundary": "The boundary is: **when does a re-score warrant a new exemplar link versus a correction of the existing one?** - If the new policy is a *different question* (harmlessness vs. helpfulness), it is a new link. Append. The old verdict stands. - If the new policy is a *corrected version of the same question* (rubric v1 → v2 for the same helpfulness dimension), it...",
    "operational_effect": "After the fix, the report renderer resolves `S` to the triple set `{(gen_hash, P1), (gen_hash, P2)}`, renders both verdicts with policy labels, and the dedup key `(span_id, medical-advice, P2)` admits the second incident. The P1 verdict remains visible as \"helpfulness 0.91 under rubric v1\" — not as \"no safety flag,\" which was the false negative. The cost is ..."
  },
  "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": "6894a922de134e20c09e1363952a044e1dde8a6c193bb88ee77dfe2236d9aa5d",
    "verified_classes": [
      "ExemplarLinkDriftError",
      "ExemplarLink"
    ],
    "verified_functions": [
      "resolve_exemplar",
      "render_incident_exemplar"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ExemplarLinkDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
