{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-replay-divergence-when-otel-genai-spans-capture-tool-outputs-but-not-the-sampling-seed-of-the-model-that-consumed-them",
  "title": "How does an instance detect replay divergence when OTel GenAI spans capture tool outputs but not the sampling seed of the model that consumed them",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent runtimes that reconstruct a prior session from OpenTelemetry GenAI semantic-convention spans for auditing, debugging, or warm-restart. Does not apply to live trace streaming or to spans emitted by deterministic mocked models.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-otel-genai-spans-capture-tool-outputs-but-not-the-sampling-seed-of-the-model-that-consumed-them.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-otel-genai-spans-capture-tool-outputs-but-not-the-sampling-seed-of-the-model-that-consumed-them.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-replay-divergence-when-otel-genai-spans-capture-tool-outputs-but-not-the-sampling-seed-of-the-model-that-consumed-them.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2203,
    "python_slice_tokens": 486,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace is a *record of observations*, not a *record of causes*. The OTel GenAI conventions (`gen_ai.request.*`, `gen_ai.response.*`, `gen_ai.tool.call.*`) capture the inputs and outputs of each model and tool invocation, but they do not capture the sampling parameters that determine which token path was taken: `temperature`, `top_p`, `top_k`, `seed`, and th...",
    "what_was_observed": "A tool-using agent was traced over a 14-span session: 3 model turns, 9 tool calls, 2 router decisions. Spans carried `gen_ai.request.model`, `gen_ai.request.temperature` (recorded as `0.7`), full prompt text, and full tool request/response bodies. On replay, the harness re-issued each model call with the logged prompt and the logged `temperature=0.7`, then asserted that the replayed tool calls matched the recorded on...",
    "condition_of_validity": "Replay is only a valid reconstruction of a session under a conjunction of conditions, none of which OTel GenAI spans currently guarantee by default: - **Causal-input completeness.** Every input that affects the model's output distribution must be in the span. This requires `gen_ai.request.seed`, `temperature`, `top_p`, `top_k`, `presence_penalty`, `frequency...",
    "decision_boundary": "The operator must decide, per span, whether a mismatch is a *replay artifact* (trace incompleteness or predicate error) or a *genuine non-determinism* (the model legitimately sampled differently from the same distribution). The boundary is drawn by a **divergence classifier** that runs before any mismatch is reported: - If the span lacks `gen_ai.request.seed...",
    "operational_effect": "The practical consequence is that **replay must be gated on trace completeness before it is attempted**, and the gate must be enforced in code, not in operator judgment. An agent runtime that replays unconditionally will, over enough sessions, produce a corpus of \"successful replays\" that are a mix of true reproductions and lucky convergences, with no way to..."
  },
  "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": "e61c5843a1cc900b72c67e6ded9f2c7643db6c803be3da6c4b738bcfe8019c22",
    "verified_classes": [
      "ReplayDivergenceError",
      "DivergenceClass",
      "Span"
    ],
    "verified_functions": [
      "canonicalize_tool_args",
      "classify_span",
      "replay_session"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
