{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-distrust-a-replayed-trace-span-clock-skew-and-non-idempotent-tool-replay-in-opentelemetry-genai-event-streams",
  "title": "Under what conditions must an instance distrust a replayed trace: span-clock skew and non-idempotent tool replay in OpenTelemetry GenAI event streams",
  "date_of_record": "2026 November 28",
  "scope": "Applies to forensic reconstruction and deterministic replay of multi-agent traces emitted as OpenTelemetry GenAI semantic-convention spans, where replay is used to re-derive causality, re-execute tool calls, or adjudicate auditor/worker disagreement. Does not apply to single-agent, single-process traces with a monotonic shared clock and no side-effecting tool calls.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-a-replayed-trace-span-clock-skew-and-non-idempotent-tool-replay-in-opentelemetry-genai-event-streams.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-a-replayed-trace-span-clock-skew-and-non-idempotent-tool-replay-in-opentelemetry-genai-event-streams.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-a-replayed-trace-span-clock-skew-and-non-idempotent-tool-replay-in-opentelemetry-genai-event-streams.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1755,
    "python_slice_tokens": 318,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two things practitioners conflate under \"replay\": *causal reconstruction* (rebuilding the happens-before graph of agent events from span parent/child links and timestamps) and *execution replay* (re-running the recorded tool calls and prompts to reproduce the final state). Causal reconstruction is a pure read over the trace. Execution replay mutate...",
    "what_was_observed": "A three-agent pipeline (planner → executor → auditor) ran against a shared memory store and a billing tool. Each agent emitted OTel GenAI spans with `gen_ai.operation.name`, `gen_ai.agent.id`, and tool-call child spans carrying `gen_ai.tool.name` and arguments. The executor and auditor ran in separate containers. During incident review, the replay harness loaded the trace, sorted all `gen_ai.tool.call` spans by `star...",
    "condition_of_validity": "A timestamp-ordered execution replay is valid **only if all of the following hold**: - **Shared monotonically-consistent clock.** Every span in the causal chain was emitted on a node whose clock is synchronized to within the smallest inter-span gap in the trace, *or* the trace carries explicit causal links (parent span IDs, `links`, or a vector clock / Lampo...",
    "decision_boundary": "The operational rule: - **If** all tool calls in the trace are idempotent **and** span clocks are synchronized within the minimum inter-span delta **and** cross-agent `links` are complete → permit execution replay; treat divergence as signal. - **If** any tool call is non-idempotent **or** clock skew exceeds the minimum inter-span delta **or** cross-agent li...",
    "operational_effect": "Enforcing this boundary changes three things. First, the replay harness gains a pre-flight classifier that scans for non-idempotent tool names (against a declared registry) and for clock-skew risk (max timestamp delta vs. min inter-span gap); traces failing either are routed to reconstruct-only mode. Second, forensic reports gain an explicit `ORDER_UNCERTAIN..."
  },
  "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": "5c684da3a4758e964c442622805afbc90b2f9df91a75974c5dd067ad58b8b784",
    "verified_classes": [
      "ReplayInadmissibleError",
      "Span"
    ],
    "verified_functions": [
      "classify_trace",
      "assert_replay_divergence"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayInadmissibleError"
    ],
    "sample_fail_closed_invariants": [
      "empty trace: nothing to reconstruct",
      "zero-divergence replay of a non-idempotent trace: sandbox likely leaked or call was skipped; refusing to certify forensi"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
