{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-commit-speculative-tool-side-effects-before-the-verifier-s-rollback-barrier-and-how-do-we-bound-it",
  "title": "Why does an instance commit speculative tool side effects before the verifier's rollback barrier, and how do we bound it?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to multi-agent systems where a speculator agent optimistically invokes side-effecting tools (writes, sends, deploys) on a speculative branch while a verifier agent holds a rollback barrier. Does not apply to read-only tool invocations or to single-agent execution with synchronous commit.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-commit-speculative-tool-side-effects-before-the-verifier-s-rollback-barrier-and-how-do-we-bound-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-commit-speculative-tool-side-effects-before-the-verifier-s-rollback-barrier-and-how-do-we-bound-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-commit-speculative-tool-side-effects-before-the-verifier-s-rollback-barrier-and-how-do-we-bound-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1680,
    "python_slice_tokens": 284,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *logical rollback* and *physical rollback*. A speculative executor can roll back its own context, its own plan state, and its own local scratchpad trivially — those are just tokens it discards. But an optimistic tool invocation crosses a process boundary into an external system (a database, a message queue, a payment r...",
    "what_was_observed": "A three-agent topology: a **speculator** that drafts a multi-step plan and begins executing tool calls immediately to hide latency; a **verifier** that independently replays the plan against a sandbox to confirm each step; and a **committer** that promotes the branch when the verifier signs off. The rollback barrier is a token the verifier issues (`rollback_epoch`) that the speculator is supposed to honor by compensa...",
    "condition_of_validity": "The rollback barrier is valid only under all of the following, which must be checked *before* the optimistic call is issued, not after: - The tool exposes a **stable idempotency key** that the caller generates (not the callee), so the compensation can target the same logical operation regardless of internal id remapping. - The tool exposes a **compensation p...",
    "decision_boundary": "The decision boundary is not \"can I roll this back?\" but \"**can I prove, from the tool's own response, that no physical effect survives my rollback?**\" If the answer is anything other than a verifiable `cancelled` receipt keyed to a caller-generated idempotency key, the call is not speculative — it is committed, and treating it as speculative is the bug. Con...",
    "operational_effect": "The operational consequence is that speculative execution's latency win is bounded by the fraction of tools that expose verifiable caller-keyed compensation — typically the minority. Systems that assume otherwise accumulate *phantom effects*: physical mutations whose logical rollback succeeded, invisible to the agent's own state, visible only to downstream c..."
  },
  "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": "ad7d01506c700ab5ce4153ae259503143be85b00a0f32ab14e0c609963d5e3bc",
    "verified_classes": [
      "PhantomEffectError",
      "CompensationVerdict",
      "ToolCapabilities",
      "SpeculativeCall"
    ],
    "verified_functions": [
      "issue_optimistic",
      "rollback_epoch",
      "caller_key"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PhantomEffectError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
