{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-divergence-between-speculative-branches-and-the-committed-tool-effect-log",
  "title": "Which invariants prevent silent divergence between speculative branches and the committed tool-effect log",
  "date_of_record": "2026 November 16",
  "scope": "Applies to orchestrators that run parallel speculative agent branches, each of which may optimistically invoke side-effecting tools (writes, sends, payments, state mutations) before a verifier selects one branch to commit. Does not apply to read-only speculation, to pure-planning branches with no external effects, or to single-branch retry loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-divergence-between-speculative-branches-and-the-committed-tool-effect-log.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-divergence-between-speculative-branches-and-the-committed-tool-effect-log.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-divergence-between-speculative-branches-and-the-committed-tool-effect-log.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1845,
    "python_slice_tokens": 384,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution is usually reasoned about as a *compute* problem: you fork N branches, you verify, you keep the winner, you discard the losers. The hidden assumption is that discarding a branch discards *everything the branch did*. That assumption holds for pure computation and fails for optimistic tool invocation. The distinction that matters is betwe...",
    "what_was_observed": "In a system running three speculative branches against a shared tool bus, branch B issued an optimistic `create_refund` call to a payments tool while branch A (the eventual winner) issued a different `create_refund` for the same order. The verifier selected A on the strength of a cleaner reasoning trace. B was rolled back. The branch-local rollback succeeded completely — B's context was garbage-collected, its trace m...",
    "condition_of_validity": "The \"commit one branch, discard the rest\" model is valid if and only if at least one of the following holds for every non-committed branch: 1. **Effect quarantine:** optimistic tool calls are staged (held, not fired) until commit, so a discarded branch has produced no world state. This is the only condition under which rollback is genuinely total. 2. **Compe...",
    "decision_boundary": "The operational rule is a boundary on *when a tool may fire optimistically*: - **Fire optimistically only if** the tool is classified *compensable* (a registered compensator exists and has been tested for idempotency and commutativity with sibling effects) **or** *adoptable* (the verifier is prepared to adopt the effect regardless of which branch wins). Read...",
    "operational_effect": "Enforcing this boundary changes three things in practice. First, rollback is redefined: it is no longer \"discard the branch object\" but \"dispose of the branch's effect set,\" and the orchestrator must hold a per-branch effect ledger that survives branch garbage collection. Second, the verifier's commit step becomes an effect-set reconciliation, and its correc..."
  },
  "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": "59511ffd2b753369943ac93f28b276f0de689f96f344806f7856c1a0676f3faa",
    "verified_classes": [
      "EffectDispositionError",
      "EffectClass",
      "EffectTarget",
      "BranchEffectLedger"
    ],
    "verified_functions": [
      "authorize_optimistic_dispatch",
      "rollback_branch",
      "record_fired",
      "record_staged"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "EffectDispositionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
