{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-is-replayed-against-a-trace-it-never-emitted-counterfactual-divergence-and-the-non-determinism-floor-in-otel-genai-postm",
  "title": "What happens when an instance is replayed against a trace it never emitted: counterfactual divergence and the non-determinism floor in OTel GenAI postmortems",
  "date_of_record": "2026 November 15",
  "scope": "Applies to deterministic replay and counterfactual (\"what-if\") divergence analysis of LLM agent incidents reconstructed from OpenTelemetry GenAI semantic-convention traces, where replay is expected to reproduce the original decision sequence. Does not apply to trace-only observability (no replay), nor to fully deterministic non-LLM services where replay is bit-exact by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-is-replayed-against-a-trace-it-never-emitted-counterfactual-divergence-and-the-non-determinism-floor-in-otel-genai-postm.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-is-replayed-against-a-trace-it-never-emitted-counterfactual-divergence-and-the-non-determinism-floor-in-otel-genai-postm.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-is-replayed-against-a-trace-it-never-emitted-counterfactual-divergence-and-the-non-determinism-floor-in-otel-genai-postm.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1714,
    "python_slice_tokens": 265,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct questions a postmortem asks of a trace, and they are routinely conflated: 1. **Reproduction** — given the recorded inputs (prompts, tool arguments, retrieved context, model parameters, seeds), does the re-executed agent produce the *same decision sequence* as the trace? This is a question about whether the trace is a *sufficient statis...",
    "what_was_observed": "Across a set of agent incident replays reconstructed from GenAI traces, the following pattern recurred: - **Replay \"passed\" at the trace level but failed at the span level.** Top-level `gen_ai.operation.name`, final assistant message, and `finish_reason` matched; but the sequence of `execute_tool` child spans differed in order and count. The trace's parent/child span ordering is *not* guaranteed to reflect the agent'...",
    "condition_of_validity": "Counterfactual divergence analysis is valid **only if all of the following hold**, and the postmortem must state which were verified: 1. **Sufficiency check passed.** The reconstructed replay input set (all `gen_ai.*` request attributes, tool schemas, retrieved context, and model parameters) reproduces the trace's *decision-relevant* projection — defined as ...",
    "decision_boundary": "The operational rule an agent should apply: - **If reproduction diverges across N replays** → do not run counterfactuals. Emit a reproduction-failure finding with the measured floor (fraction of diverging steps, and the first diverging span). This is itself a high-value postmortem result: it means the incident is not reconstructible from the trace. - **If re...",
    "operational_effect": "Teams that enforced the precondition observed: - Incidents previously attributed to \"tool failures\" were re-attributed to model-layer sampling instability, changing the remediation from tool retries to request-level seed pinning and per-conversation determinism controls. - The measured non-determinism floor became a tracked SLO: replay stability rate per age..."
  },
  "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": "f3188521d8d3ef8600c21416670ec6e93ff6292064c2330a1b801bbd28e94c6d",
    "verified_classes": [
      "ReplayPreconditionError",
      "DecisionStep"
    ],
    "verified_functions": [
      "decision_projection",
      "measure_reproduction_floor",
      "run_counterfactual",
      "attribute_incident"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayPreconditionError"
    ],
    "sample_fail_closed_invariants": [
      "no replays supplied; cannot establish floor"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
