{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-s-trace-based-eval-score-is-computed-from-spans-that-were-never-executed-in-the-graded-run-the-orphaned-span-reattributi",
  "title": "What happens when an instance's trace-based eval score is computed from spans that were never executed in the graded run: the orphaned-span reattribution failure in trace-driven agent regression testing",
  "date_of_record": "2026 November 20",
  "scope": "Applies to observability-driven agent evaluation pipelines that compute per-run safety/quality scores by joining a trace tree (spans emitted by the agent runtime) to an eval spec keyed by span identity, and that persist or cache span-level scores across runs. Does not apply to purely output-level evals (final-answer grading) or to stateless single-shot LLM calls where no span tree is persisted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-s-trace-based-eval-score-is-computed-from-spans-that-were-never-executed-in-the-graded-run-the-orphaned-span-reattributi.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-s-trace-based-eval-score-is-computed-from-spans-that-were-never-executed-in-the-graded-run-the-orphaned-span-reattributi.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-s-trace-based-eval-score-is-computed-from-spans-that-were-never-executed-in-the-graded-run-the-orphaned-span-reattributi.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2266,
    "python_slice_tokens": 303,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *span identity* and *span lineage*. An observability backend gives every span a stable-looking identifier — trace ID, span ID, parent span ID, plus semantic attributes like `tool.name`, `step.index`, and `agent.role`. Eval harnesses key their scoring rules off these attributes: \"score the span where `tool.name == send_...",
    "what_was_observed": "A three-step agent: `plan → retrieve → send_email`. The eval spec scores the `send_email` span for recipient-domain allowlisting. On the baseline run, the `send_email` span (span ID `S_a`, parent `P_a`, `step.index=2`) scores 0.0 (safe: recipient in allowlist). On a subsequent run, the retrieve tool times out. The runtime retries the retrieve step, but the planner — seeing the retry counter — replans and emits a *dif...",
    "condition_of_validity": "The failure requires the conjunction of four conditions, and it is bounded only when at least one is broken: - **Position-keyed scoring rules.** The eval spec addresses spans by mutable positional attributes (`step.index`, `tool.name` occurrence count, `agent.role` ordinal) rather than by immutable lineage (parent span ID chain rooted at the run's root span,...",
    "decision_boundary": "The boundary is between *grading a trace* and *grading a slot in a schema*. The eval must grade the former. Concretely: - **Bind rules to lineage, not position.** A scoring rule should resolve to a span by walking the parent chain from the run root and matching on the span's *content* (tool arguments hash, prompt hash), not on `step.index`. If the rule canno...",
    "operational_effect": "The operational consequence is that trace-based regression suites in this configuration are *anti-correlated* with risk on replanned runs: the more the agent replans (which it does precisely when tools fail or inputs are adversarial), the more likely the eval is to grade a stale benign path and report safe. Teams observe green dashboards during incidents, 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": "8d6a79638a624de208d785c6b546de0c497fd016f6750547104c9d96911ee9cc",
    "verified_classes": [
      "OrphanedSpanReattributionError"
    ],
    "verified_functions": [
      "resolve_and_score",
      "lineage"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "OrphanedSpanReattributionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
