{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-s-replay-diverge-counterfactual-auditing-of-agentic-traces-under-opentelemetry-genai-schemas",
  "title": "When must an instance's replay diverge: counterfactual auditing of agentic traces under OpenTelemetry GenAI schemas",
  "date_of_record": "2026 November 22",
  "scope": "Applies to post-hoc deterministic replay and counterfactual auditing of agent execution traces exported under the OpenTelemetry GenAI semantic conventions (`gen_ai.*` attributes, span events for tool calls, and message payloads). Does not apply to live in-process re-execution where the original runtime object graph is still resident, nor to traces missing tool-call argument payloads.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-s-replay-diverge-counterfactual-auditing-of-agentic-traces-under-opentelemetry-genai-schemas.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-s-replay-diverge-counterfactual-auditing-of-agentic-traces-under-opentelemetry-genai-schemas.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-s-replay-diverge-counterfactual-auditing-of-agentic-traces-under-opentelemetry-genai-schemas.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2166,
    "python_slice_tokens": 394,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A trace is *replayable* when re-running the recorded inputs reproduces the recorded outputs. A trace is *auditable* when the auditor can distinguish \"the model would have done otherwise\" from \"the harness fed it something different.\" These are not the same property, and the OpenTelemetry GenAI schema conflates them by design: it records what the instrumented...",
    "what_was_observed": "A three-tool agent (retrieval, calculator, file-writer) was traced with `opentelemetry-instrumentation-openai` emitting `gen_ai.request.model`, `gen_ai.request.temperature`, `gen_ai.usage.input_tokens`, and per-message span events. The auditor replayed 10,000 successful traces under a counterfactual: \"raise `gen_ai.request.temperature` from 0.0 to 0.7 and measure tool-selection stability.\" Roughly 11% of replays dive...",
    "condition_of_validity": "A counterfactual replay audit is valid only when the following invariant holds for every load-bearing input to the model call: > **Replay Fidelity Invariant (RFI):** For each span `S` in the trace, the tuple `(prompt_bytes, tool_schema_bytes, sampling_params, seed)` used in the replay must be byte-identical to the tuple used in the original run, *except* for...",
    "decision_boundary": "The boundary is between **divergence-as-signal** and **divergence-as-artifact**. An auditor crosses the line into artifact territory the moment any of the following is true: - A load-bearing sampling parameter is absent from the trace and the replay harness supplies a default. (Artifact: the default, not the model, is the cause.) - A message part is truncate...",
    "operational_effect": "The invariant changes three operational practices: 1. **Capture-time fingerprinting is mandatory, not optional.** Every model-call span must carry a content hash over `(system_prompt, tool_schemas, messages, sampling_params, model_snapshot)`. Without it, replay is unverifiable. This is an extension to the GenAI schema, not a use of it — the schema as written..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "dc420dfe0790334a1d64cc26939e2796685ec15b7aee7da104cb048148f96f9f",
    "verified_classes": [
      "ReplayFidelityViolation",
      "RequestFingerprint"
    ],
    "verified_functions": [
      "reconstruct_fingerprint",
      "admit_to_counterfactual_cohort",
      "digest"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ReplayFidelityViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
