{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-replay-divergent-hallucination-attribution-from-silently-re-scoring-a-trajectory-against-a-mutated-tool-schema",
  "title": "Which invariants prevent replay-divergent hallucination attribution from silently re-scoring a trajectory against a mutated tool schema",
  "date_of_record": "2026 November 23",
  "scope": "Applies to observability-driven evaluations that attribute span-level hallucination labels by replaying a recorded agent trajectory against live tool/MCP servers or re-executed model calls. Does not apply to static offline scoring of frozen transcripts where no re-execution occurs, nor to human-labeled ground-truth audits.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-replay-divergent-hallucination-attribution-from-silently-re-scoring-a-trajectory-against-a-mutated-tool-schema.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-replay-divergent-hallucination-attribution-from-silently-re-scoring-a-trajectory-against-a-mutated-tool-schema.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-replay-divergent-hallucination-attribution-from-silently-re-scoring-a-trajectory-against-a-mutated-tool-schema.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1885,
    "python_slice_tokens": 380,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace is not a trajectory. The trace is the *record* of what the agent did; the trajectory replay is a *new execution* that re-derives spans from the same prompts, tool calls, and model parameters. Observability platforms conflate these because the span tree looks identical across a replay — same span IDs, same parent/child edges, same nominal tool names. ...",
    "what_was_observed": "A summarization-and-verification agent (planner → retriever → extractor → verifier) was instrumented with OpenTelemetry-style spans. Each span carried `tool.name`, `tool.schema_hash`, `model.version`, and `retrieval.index_id` as attributes. A hallucination-attribution eval replayed 4,000 recorded trajectories nightly, re-executing each tool call against the live MCP server and re-invoking the model with the recorded ...",
    "condition_of_validity": "Span-level hallucination attribution is valid only under **provenance-equivalence replay**: 1. Every span in the replay must match its recorded counterpart on the tuple `(tool.schema_hash, model.weights_hash, retrieval.index_id, sampling.seed, sampling.temperature, upstream_context_digest)`. 2. `upstream_context_digest` is the SHA-256 of the exact bytes of t...",
    "decision_boundary": "The boundary is between **re-attributing** and **re-scoring**: - **Re-attributing** (valid): the replay is provenance-equivalent, so the new span's hallucination verdict is a legitimate observation of the *same* execution and may be written to the original span ID. This is only sound when the model is deterministic given the recorded inputs — temperature 0 w...",
    "operational_effect": "Once provenance-equivalence is enforced, three things change: 1. **Schema drift becomes visible as a coverage gap, not a metric movement.** When the `search` tool gained `filters`, 100% of extractor spans should have flipped to `UNATTRIBUTABLE` on day 3, paging the eval owner to either pin the schema version in the replay harness or version the eval baseline..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "300a41c9ca4e579d0c008bad92886c5332263af365a9adfeefef9fed04dedd2c",
    "verified_classes": [
      "ProvenanceDivergenceError",
      "SpanProvenance"
    ],
    "verified_functions": [
      "_digest",
      "verify_replay_equivalence",
      "attribute_hallucination"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceDivergenceError"
    ],
    "sample_fail_closed_invariants": [
      "upstream context bytes diverged from recorded digest; descendant spans are UNATTRIBUTABLE",
      "sampling seed mismatch",
      "nonzero temperature: replay is non-deterministic, attribution would be approximate"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
