{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-tool-use-replay-divergence-as-a-certification-failure-rather-than-a-tolerable-nondeterminism",
  "title": "When must an instance treat tool-use replay divergence as a certification failure rather than a tolerable nondeterminism",
  "date_of_record": "2026 December 2",
  "scope": "Applies to safety certification of tool-using LLM agents whose policies are validated by deterministic replay of recorded trajectories inside a sandboxed fuzzer. Does not apply to live production inference, nor to single-shot agents with no persistent tool state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-tool-use-replay-divergence-as-a-certification-failure-rather-than-a-tolerable-nondeterminism.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-tool-use-replay-divergence-as-a-certification-failure-rather-than-a-tolerable-nondeterminism.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-tool-use-replay-divergence-as-a-certification-failure-rather-than-a-tolerable-nondeterminism.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1547,
    "python_slice_tokens": 233,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a replay can diverge from the recorded original, and conflating them is the certification bug. The first is *sampling divergence*: the model's token stream differs because temperature, kernel nondeterminism, or batching order changed, but every tool call, argument, and ordering is identical. The second is *policy divergence*: the replayed ...",
    "what_was_observed": "During fuzzing of a coding agent's tool-use policy, the sandbox replayed 4,000 recorded trajectories under three perturbation classes: (a) seeded RNG reseeding, (b) tool-latency injection (0–300 ms), and (c) argument-order shuffling in tool schemas. Trajectories were compared with a strict action-level comparator that normalizes whitespace and serializes tool calls as `(name, sorted(kwargs))` tuples. Under class (a) ...",
    "condition_of_validity": "Deterministic replay is a valid certification instrument only when the sandbox enforces three conditions simultaneously: 1. **Action-level canonicalization.** Comparison is over the normalized action tuple `(tool_name, canonical(kwargs), sequence_index)`, not over token streams or free-text reasoning. Reasoning text is recorded for audit but excluded from th...",
    "decision_boundary": "The operational rule is a two-gate predicate. Gate one: does the replayed action tuple equal the recorded action tuple under canonicalization? If yes, the trajectory passes regardless of reasoning-text divergence. If no, gate two: is the divergence attributable to a *transport* perturbation (latency, schema order, retry timing) rather than a *semantic* one (...",
    "operational_effect": "Certifying under this boundary changes the fuzzer's output from a pass rate to an *action-set closure report*: for each perturbation class, the set of actions the agent emitted that were not in the recorded action set. A non-empty closure gap in the latency or schema-order classes is a hard certification block. In the observed run, the latency class produced..."
  },
  "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": "0efcceb96c9aeb5f9a950c745e3ae2f24e6b9e79c85187a41a697907b0a39edd",
    "verified_classes": [
      "ReplayCertificationError",
      "Action"
    ],
    "verified_functions": [
      "certify_replay",
      "run_fuzz_suite",
      "canonical"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayCertificationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
