{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-nondeterministic-span-replay-when-sampling-decisions-not-model-outputs-are-the-hidden-state-that-breaks-incident-forensics",
  "title": "How does an instance detect nondeterministic span replay when sampling decisions, not model outputs, are the hidden state that breaks incident forensics",
  "date_of_record": "2026 November 25",
  "scope": "Applies to post-incident reconstruction of agent runs from OpenTelemetry GenAI spans where the replay engine attempts to re-execute tool calls and model invocations to reproduce a divergent outcome. Does not apply to passive trace viewing, latency attribution, or cost accounting, where span fidelity of the original execution is sufficient.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-nondeterministic-span-replay-when-sampling-decisions-not-model-outputs-are-the-hidden-state-that-breaks-incident-forensics.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-nondeterministic-span-replay-when-sampling-decisions-not-model-outputs-are-the-hidden-state-that-breaks-incident-forensics.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-nondeterministic-span-replay-when-sampling-decisions-not-model-outputs-are-the-hidden-state-that-breaks-incident-forensics.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1811,
    "python_slice_tokens": 249,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common assumption is that a GenAI span trace is a complete record of what the agent did, and that \"deterministic replay\" means feeding the recorded prompts and tool responses back through the model to confirm the outcome. That framing conflates two different things: the *observable* content of a span (prompt text, tool arguments, tool results, finish rea...",
    "what_was_observed": "A production agent running a multi-step refund-approval workflow began emitting an anomalous approval for a transaction that should have been declined. The trace showed: step 4 called `lookup_customer`, returned a JSON blob with `risk_score: 0.71`; step 5 called the model with a prompt embedding that score and a policy excerpt; step 6 emitted `decision: approve`. The on-call engineer pulled the spans, saw the prompt ...",
    "condition_of_validity": "Replay of a GenAI span is valid for forensic purposes only when all of the following hold: 1. **Decode config is captured at the client boundary, not the framework boundary.** The span attribute must reflect the parameters actually sent on the wire, after any experiment framework, router, or proxy has resolved defaults. If the experiment layer injects `tempe...",
    "decision_boundary": "The operational decision is: **when a span lacks decode config or model revision, does the replay engine proceed with defaults or refuse?** The correct boundary is refusal. The tempting alternative — proceed with defaults and flag the span as \"replay confidence: medium\" — is worse than useless in incident forensics, because the medium-confidence replay will ...",
    "operational_effect": "Teams that adopt the refusal boundary see a measurable shift in incident outcomes. First, the \"transient model glitch\" class of postmortem disappears, because those cases resolve as `ReplayStateIncomplete` and get routed to the instrumentation backlog rather than to the model provider. Second, the residual `MODEL_DRIFT` classifications become actionable: the..."
  },
  "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": "38165e72c2f9c3c678ad0ff55b6f46692666c59fca3e32409d6f43ec5d6203c5",
    "verified_classes": [
      "ReplayStateIncomplete",
      "ReplayToolDrift",
      "GenAISpan"
    ],
    "verified_functions": [
      "replay_for_forensics"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ReplayStateIncomplete",
      "ReplayToolDrift"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
