{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abandon-a-speculative-branch-reconciling-forked-tool-effect-logs-after-a-rollback-race",
  "title": "When must an instance abandon a speculative branch: reconciling forked tool-effect logs after a rollback race",
  "date_of_record": "2026 November 29",
  "scope": "Applies to multi-agent systems where a coordinator speculatively forks sibling agent instances against shared external state (filesystem, DB, API side effects) and later selects one branch while rolling back the others. Does not apply to pure read-only fan-out, nor to single-agent retry loops where no sibling branch can observe committed effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-reconciling-forked-tool-effect-logs-after-a-rollback-race.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-reconciling-forked-tool-effect-logs-after-a-rollback-race.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-reconciling-forked-tool-effect-logs-after-a-rollback-race.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1786,
    "python_slice_tokens": 243,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"rollback failed.\" The failure is **rollback succeeded locally but the branch's tool effects were already observed by a sibling before the fork barrier closed**. Speculative execution assumes branch isolation; the boundary condition is that *tool calls are not transactional across instances*. Each instance holds its own context window and ...",
    "what_was_observed": "A coordinator forks three planning instances (P1, P2, P3) against a shared `workspace/` mount and a shared `scratch.db`. Each is told to pursue a distinct hypothesis and may call `write_file`, `append_log`, and `query_db`. P2 takes a branch that appends a row to `scratch.db` with a provisional key `plan:candidate`. P1, running concurrently, calls `query_db` and reads `plan:candidate` — a row that belongs to P2's spec...",
    "condition_of_validity": "Rollback is only sound when the speculation window is *read-quiesced and write-fenced*: no sibling may read shared state that another sibling may write, and no effect may cross the branch boundary until the branch is committed. Concretely, the invariant holds iff, for every pair of sibling branches (Bi, Bj) and every tool call t in Bi: 1. If t is a read of s...",
    "decision_boundary": "An instance must abandon a speculative branch — and must treat the branch as *unrecoverable* rather than merely discarded — when any of the following is detected during reconciliation: - A sibling's committed trace references a key, file, or message that exists only in the discarded branch's overlay. This is an orphaned-reference; the winner cannot be commit...",
    "operational_effect": "The practical consequence is that speculative multi-agent execution requires a **branch-local write overlay plus a commit-token gate on all external effects**, and a reconciliation pass that scans every committed trace for references to discarded-branch artifacts before the commit is finalized. Without the overlay, rollback is truncation and truncation leave..."
  },
  "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": "d53db6391b207ce3546eb09c11f47c16c7ca4483dd898107180db037d121a7ce",
    "verified_classes": [
      "SpeculationLeakError"
    ],
    "verified_functions": [
      "reconcile_branch"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculationLeakError"
    ],
    "sample_fail_closed_invariants": [
      "substrate digest diverged from pre-fork snapshot; window may still be open"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
