{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-diverge-when-replayed-from-an-otel-genai-trace-that-recorded-tool-arguments-post-serialization",
  "title": "Why does an instance diverge when replayed from an OTel GenAI trace that recorded tool arguments post-serialization?",
  "date_of_record": "2026 November 19",
  "scope": "Applies to any agent runtime that reconstructs execution from OpenTelemetry GenAI semantic-convention spans (`gen_ai.*`) for the purpose of deterministic replay, regression diffing, or audit. Does not apply to live shadow-traffic replay where the original model endpoint is re-invoked, nor to trace formats that capture pre-serialization tool-call payloads.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-diverge-when-replayed-from-an-otel-genai-trace-that-recorded-tool-arguments-post-serialization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-diverge-when-replayed-from-an-otel-genai-trace-that-recorded-tool-arguments-post-serialization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-diverge-when-replayed-from-an-otel-genai-trace-that-recorded-tool-arguments-post-serialization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2092,
    "python_slice_tokens": 422,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"the same run\" that get conflated the moment you build a replay harness on top of OTel GenAI spans: 1. **Trace-faithful replay** — the runtime consumes the span tree as ground truth and re-emits the recorded `gen_ai.tool.call.arguments` / `gen_ai.tool.call.result` values without re-deriving them. 2. **Model-faithful replay**...",
    "what_was_observed": "A three-step agent task: `search(query) → fetch(url) → summarize(text)`. Original run recorded spans with these attributes (abbreviated): - Span A: `gen_ai.operation.name=execute_tool`, `gen_ai.tool.name=search`, `gen_ai.tool.call.arguments={\"q\": \"vector db latency p99\"}` (note: the harness's serializer emitted a JSON object with a space after the colon, and the model had actually emitted `{\"q\":\"vector db latency p99...",
    "condition_of_validity": "Trace-faithful replay is only valid as a *regression oracle* when the following invariant holds: > For every span `S` in the trace, the tuple `(gen_ai.request.model, gen_ai.prompt.*, gen_ai.tool.call.arguments, gen_ai.tool.call.result)` as recorded is **canonically equivalent** to the tuple the runtime would have produced from the model's raw output under th...",
    "decision_boundary": "The harness must make an explicit, recorded choice per span, not per trace: - **If `arguments.raw` and `result.sha256` are present and the sandbox can reproduce the tool deterministically** → model-faithful replay is admissible; divergence is a real signal. - **If `arguments.raw` is absent but `arguments` is present and the tool is pure and deterministic** →...",
    "operational_effect": "The observable symptom is **replay flakiness that correlates with exporter configuration, not with code changes.** A team ships a collector update that adds a `transform` processor to pretty-print JSON tool arguments for a debugging dashboard. Replay pass rate drops from 98% to 61% overnight. No application code changed. The harness blames the model (\"non-de..."
  },
  "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": "e9792e5439166ac2a6e9093bb342b2297c1c396436cc07731a0b93d0e82d05f7",
    "verified_classes": [
      "ReplayNotAdmissibleError",
      "SpanRecord"
    ],
    "verified_functions": [
      "admit_span_for_model_faithful_replay",
      "verify_replayed_result"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "ReplayNotAdmissibleError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
