{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-deterministic-replay-of-a-poisoned-trace-the-non-idempotent-tool-call-fork-invariant",
  "title": "In what scenarios must an instance refuse deterministic replay of a poisoned trace: the non-idempotent tool-call fork invariant",
  "date_of_record": "2026 November 20",
  "scope": "Applies to forensic replay of recorded agent traces where the trace contains at least one side-effecting tool call (write, POST, charge, dispatch, state mutation) executed against a live or shared substrate. Does not apply to pure read-only reasoning traces or to sandboxed replays with fully synthetic tool backends whose outputs are bit-for-bit re-injected from the log.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-deterministic-replay-of-a-poisoned-trace-the-non-idempotent-tool-call-fork-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-deterministic-replay-of-a-poisoned-trace-the-non-idempotent-tool-call-fork-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-deterministic-replay-of-a-poisoned-trace-the-non-idempotent-tool-call-fork-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1910,
    "python_slice_tokens": 369,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Deterministic replay of an agent trace is routinely framed as \"re-run the transcript and check that the final answer matches.\" That framing conflates two distinct operations: **re-execution** (the agent's tool calls are re-issued against a backend) and **re-simulation** (the agent's tool calls are answered from the recorded log). Only re-simulation is determ...",
    "what_was_observed": "A support-triage agent (model M, temperature 0, seed pinned) produced an anomalous escalation at step 14 of a 22-step trace. The incident was filed as \"agent escalated a refund it should have denied.\" Forensic replay was launched with the same model, same seed, same system prompt, and the original tool *schemas* — but the tool backend was live. Trace of the replay: 1. Steps 1–6 replay cleanly. `get_order`, `get_custo...",
    "condition_of_validity": "A replay is forensically valid if and only if all three hold: 1. **Observation provenance is closed.** Every tool result consumed by the replayed agent is served from the recorded log, keyed by `(step_index, tool_name, canonical_args_hash)`. No live call is permitted. If a step's recorded result is missing or its args hash mismatches, the harness raises — it...",
    "decision_boundary": "The boundary is drawn at the first side-effecting tool call whose recorded result cannot be served from the log with a verified args-hash match: - **Before that point:** replay is re-simulation, deterministic, admissible as forensic evidence. Divergences found here are attributable to the model or to the recorded context. - **At that point:** if the log entr...",
    "operational_effect": "Replay harnesses that enforce observation-provenance closure convert a class of \"model instability\" findings into either (a) confirmed model divergences at a precise step with a precise prior context, or (b) explicit `UnreplayableTrace` records that route to log-integrity work. In the case above, the corrected harness aborted at step 5 with `ObservationMissi..."
  },
  "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": "7f54a83c8e51f1040b4f236c6aa1ead8e189cace58543a1b8c75a4331cf009ba",
    "verified_classes": [
      "UnreplayableTrace",
      "RecordedStep",
      "ReplayHarness"
    ],
    "verified_functions": [
      "canonical_args_hash",
      "replay_trace",
      "__init__",
      "serve"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnreplayableTrace"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
