{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-hallucination-attribution-when-a-trace-linked-eval-scorer-re-scores-a-span-whose-parent-context-was-compacted-mid-run",
  "title": "Why does an instance lose hallucination attribution when a trace-linked eval scorer re-scores a span whose parent context was compacted mid-run?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agent systems where evaluation scores are attached to spans in a distributed trace and later replayed or re-scored against the recorded trace. Does not apply to online-only scoring where the scorer consumes live context and never re-derives scores from stored spans.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-hallucination-attribution-when-a-trace-linked-eval-scorer-re-scores-a-span-whose-parent-context-was-compacted-mid-run.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-hallucination-attribution-when-a-trace-linked-eval-scorer-re-scores-a-span-whose-parent-context-was-compacted-mid-run.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-hallucination-attribution-when-a-trace-linked-eval-scorer-re-scores-a-span-whose-parent-context-was-compacted-mid-run.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1765,
    "python_slice_tokens": 297,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things a trace-linked eval scorer can mean by \"the context the model saw\": 1. **The recorded prompt** — the literal token sequence serialized into the span's `input` field at call time. 2. **The reconstructible prompt** — the token sequence a replay engine can rebuild by walking parent spans, concatenating retrieved chunks, and re-run...",
    "what_was_observed": "A retrieval agent answered a support question across 14 tool calls. At step 9, the orchestrator compacted the message history from ~31k to ~6k tokens, replacing the original retrieved documents (steps 2–5) with a 400-token summary span. The summary was recorded as a child span `ctx.compact` with `parent_id` pointing to the step-9 LLM span, but the *original* retrieval spans remained in the trace under the step-2 pare...",
    "condition_of_validity": "Trace-linked attribution is valid only under the following conjunction, and any failure of one conjunct invalidates the score without invalidating the trace: - **Evidence containment:** every token the scorer cites as support must be a substring (modulo normalization) of the recorded `input` of the span being scored, or of a recorded span reachable by the *r...",
    "decision_boundary": "The scorer must branch on whether the evidence set is *closed* (fully contained in recorded spans) or *open* (requires re-derivation): - **Closed evidence → attribute.** Score faithfulness against the recorded prompt. A claim unsupported by recorded spans is a hallucination with full confidence. - **Open evidence → abstain or downgrade.** If any cited suppor...",
    "operational_effect": "Teams that skip this distinction see two coupled symptoms. First, hallucination rate correlates with run length and compaction count rather than with model behavior — a 14-step run scores worse than a 4-step run on identical model output. Second, decision replay diverges from the original decision: the replayer, fed the reconstructed context, produces a diff..."
  },
  "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": "69555878970605f0fa03e766110155194a235be83d22e8dfdd0b7afa7d2c36c5",
    "verified_classes": [
      "AttributionEvidenceError",
      "Span",
      "Claim"
    ],
    "verified_functions": [
      "attribute_claim"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "AttributionEvidenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
