{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-reject-a-speculative-tool-call-pre-execution-whose-predicted-effect-diverges-from-the-dry-run-receipt-at-commit-time",
  "title": "When must an instance reject a speculative tool-call pre-execution whose predicted effect diverges from the dry-run receipt at commit time",
  "date_of_record": "2026 November 30",
  "scope": "Applies to federated agent runtimes that speculatively pre-execute tool calls against a predicted world-state, buffer the effects, and commit only after a dry-run simulation receipt reconciles with peer agents' reservations. Does not apply to single-agent synchronous tool loops with no speculative buffering or to purely read-only tool surfaces.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-speculative-tool-call-pre-execution-whose-predicted-effect-diverges-from-the-dry-run-receipt-at-commit-time.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-speculative-tool-call-pre-execution-whose-predicted-effect-diverges-from-the-dry-run-receipt-at-commit-time.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-speculative-tool-call-pre-execution-whose-predicted-effect-diverges-from-the-dry-run-receipt-at-commit-time.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1918,
    "python_slice_tokens": 333,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *effect prediction divergence* and *effect prediction staleness*. Staleness is benign: a pre-executed effect was computed against a world-state that has since advanced, so the buffer is discarded and the call is re-run. Divergence is fatal: the dry-run receipt (the simulator's signed attestation of what the call *would...",
    "what_was_observed": "A three-agent federation (planner `P`, executor `E`, auditor `A`) ran a speculative pipeline over a shared inventory tool. `E` pre-executed `reserve_stock(sku, qty=40)` against a predicted post-restock state and staged the effect in its buffer, obtaining receipt `R1` with `effect_hash = 0x9f...` and `world_state_hash = 0x4a...`. The dry-run simulator certified `R1` because at simulation time the tool was deterministi...",
    "condition_of_validity": "The commit gate's decision procedure is valid only under the following conjunction: 1. **Effect identity is checked, not just state identity.** The gate must compare `effect_hash(buffer)` against `receipt.effect_hash`, not merely `world_state_hash`. State-hash equality is necessary but not sufficient — it certifies *what the world was*, not *what the tool di...",
    "decision_boundary": "The gate's decision function, stated as a boundary: - **Commit** iff `effect_hash(buffer) == receipt.effect_hash` AND `world_state_hash(buffer) == receipt.world_state_hash` AND `tool_contract_hash(live) == receipt.tool_contract_hash`. - **Resimulate** (discard buffer, re-reserve, obtain new receipt) iff `world_state_hash(buffer) != receipt.world_state_hash` ...",
    "operational_effect": "The operational consequence is that speculative pre-execution becomes unsafe the moment the commit gate validates state rather than effect. In a federated setting this compounds: each peer's reservation is a *promise* against a specific `effect_hash`, and a divergent commit breaks every peer's compensation proof simultaneously. The auditor cannot distinguish..."
  },
  "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": "17c42aa54117a0bd7cae620137f3985a20950db51e81de21b772528cf8d51139",
    "verified_classes": [
      "SpeculativeCommitDivergence",
      "Receipt",
      "Buffer"
    ],
    "verified_functions": [
      "commit_gate",
      "derive_contract_hash",
      "flush_speculative",
      "apply_effect"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeCommitDivergence"
    ],
    "sample_fail_closed_invariants": [
      "unclassified commit-gate state"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
