{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-speculative-branch-commits-when-parallel-tool-call-hedging-produces-divergent-but-individually-valid-side-effects",
  "title": "How should an instance reconcile speculative branch commits when parallel tool-call hedging produces divergent but individually-valid side effects",
  "date_of_record": "2026 November 25",
  "scope": "Applies to orchestrators that speculatively fan out N parallel reasoning branches (or hedged tool calls) from a shared checkpoint and later select a winner for commit. Does not apply to strictly serial single-branch execution or to fan-out where every tool is provably idempotent and side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branch-commits-when-parallel-tool-call-hedging-produces-divergent-but-individually-valid-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branch-commits-when-parallel-tool-call-hedging-produces-divergent-but-individually-valid-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branch-commits-when-parallel-tool-call-hedging-produces-divergent-but-individually-valid-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1588,
    "python_slice_tokens": 342,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the wrong branch won.\" It is that *more than one branch was individually correct*, and each produced a durable, externally visible side effect before the rollback reconciler ran. Speculative execution assumes branches are pure until commit — that the loser's work can be discarded by dropping its context. This holds for in-memory reasoning...",
    "what_was_observed": "An orchestrator spawned three speculative branches from a shared checkpoint to complete a \"book the resource\" subtask. Branch A and Branch B both, through different tool sequences, issued a mutating reservation call. Branch A used the primary endpoint; Branch B, hedging for latency, hit a mirror endpoint after a 400ms timeout on the primary. Both returned success with distinct reservation IDs. The selection heuristic...",
    "condition_of_validity": "Speculative commit singularity holds **only if** every mutating tool call is gated behind a two-phase discipline: (1) the call is made against a *reservation* that is not externally visible as final until an explicit `confirm`, and (2) losing branches issue `abort`/`compensate` for every reservation they hold. The invariant is: > For each speculative group G...",
    "decision_boundary": "The reconciler must decide, per branch, between **discard** (drop context, no external effect possible) and **compensate** (issue inverse ops for every reservation held). The boundary is whether the branch holds any *open reservation* at selection time. - If the branch's last tool call returned `success` and it holds an open reservation, **discard is forbidd...",
    "operational_effect": "Without this boundary, speculative execution leaks side effects proportional to the fan-out width and the tail latency that triggers hedging. The leak is silent — every branch reports success, the orchestrator reports success, and the discrepancy only surfaces at external reconciliation, often hours later, attributed to the wrong component. The guardrail is ..."
  },
  "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": "313ebb033843e37b28bce700b8a473beb455078ed925cc17b4f8b7c995e51620",
    "verified_classes": [
      "SpeculativeCommitError",
      "ReservationState",
      "Reservation",
      "SpeculativeGroup"
    ],
    "verified_functions": [
      "reconcile",
      "add",
      "close"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
