{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-divergent-speculative-branch-replay-when-audit-time-tool-nondeterminism-silently-reorders-agent-decisions",
  "title": "How does an instance detect divergent speculative branch replay when audit-time tool nondeterminism silently reorders agent decisions?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to post-hoc safety audits that reconstruct multi-agent speculative execution trees by replaying recorded transcripts against live or stubbed tool endpoints. Does not apply to audits performed purely on immutable logged tokens with no tool re-invocation, nor to single-agent linear traces.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-divergent-speculative-branch-replay-when-audit-time-tool-nondeterminism-silently-reorders-agent-decisions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-divergent-speculative-branch-replay-when-audit-time-tool-nondeterminism-silently-reorders-agent-decisions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-divergent-speculative-branch-replay-when-audit-time-tool-nondeterminism-silently-reorders-agent-decisions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1746,
    "python_slice_tokens": 387,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A speculative branch replay is *faithful* only if the reconstructed decision sequence is identical to the original under the same ordering of nondeterministic tool returns. Auditors routinely conflate two invariants: 1. **Content equivalence** — the same tool call produces the same *value*. 2. **Order equivalence** — the same tool calls are *issued and resol...",
    "what_was_observed": "A three-agent speculative planner (speculator `S`, verifier `V`, executor `E`) was recorded during a live run. `S` emitted two candidate tool calls in parallel: `read_config()` and `read_policy()`. The original run resolved `read_policy()` first; `V`'s guard predicate `policy.version >= config.required_policy_version` therefore evaluated against a policy object already cached, and `V` selected branch `B2` (escalate)....",
    "condition_of_validity": "Deterministic replay of speculative branches is valid only when, for every concurrent tool fan-out, the audit can reconstruct a **total order over (tool resolution, guard evaluation, branch commit)** that is isomorphic to the original. This requires three preconditions, all of which must hold *at record time*, not audit time: 1. **Barrier instrumentation**: ...",
    "decision_boundary": "The boundary between \"audit-valid\" and \"audit-invalid\" is crossed the moment a guard predicate reads a dependency whose resolution order is not pinned by the replay scheduler. Operationally: - **Safe**: guard reads only from `resolved_dependency_set` entries whose logical timestamps precede the guard's logical timestamp *and* whose resolution is pinned to th...",
    "operational_effect": "Downstream, this failure degrades three things: 1. **Safety attestations become false negatives.** A branch that escalated in production is replayed as benign, and the audit signs off on a path the system never took. This is worse than no audit, because it manufactures evidence. 2. **Counterfactual analysis drifts.** Any \"what if the guard had seen the other..."
  },
  "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": "181db9556598766d437e8a23e3c500dbbac32f77227c278dd25bc838ab9f5444",
    "verified_classes": [
      "ReplayOrderArtifactError",
      "AuditInconclusiveError",
      "GuardEvent",
      "ToolEvent",
      "Transcript"
    ],
    "verified_functions": [
      "validate_replay_order",
      "audit_branch"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "AuditInconclusiveError",
      "ReplayOrderArtifactError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
