{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abort-a-speculative-branch-rollback-divergence-under-shared-workspace-speculation",
  "title": "When must an instance abort a speculative branch: rollback divergence under shared-workspace speculation",
  "date_of_record": "2026 November 30",
  "scope": "Applies to multi-agent systems where a coordinator forks N speculative worker branches against a shared mutable workspace (filesystem, database, or tool-side effect ledger) with the intent to commit exactly one branch and roll back the rest. Does not apply to read-only fan-out, stateless map-reduce, or systems where every branch owns a private, isolated sandbox and merge is a pure diff operation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-rollback-divergence-under-shared-workspace-speculation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-rollback-divergence-under-shared-workspace-speculation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-rollback-divergence-under-shared-workspace-speculation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2602,
    "python_slice_tokens": 444,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **rollback of state** and **rollback of belief**. A speculative branch that writes only to a private overlay can be discarded by dropping the overlay — state rollback is total and cheap. The failure mode examined here is subtler: a branch executes *observable* side effects (a tool call that mutates an external service,...",
    "what_was_observed": "A three-branch speculative planner was deployed on a task requiring a repository refactor. The coordinator forked branches A, B, and C with identical initial context. Each branch was given a private git worktree but shared a single tool endpoint: a code-search service backed by a read-through cache keyed on query string, and a \"notify\" tool that posted status to a shared channel the coordinator subscribed to. Branch ...",
    "condition_of_validity": "Speculative rollback is sound only when all four of the following hold simultaneously: 1. **Effect isolation is closed under reads.** Not only must a branch's writes be invisible to siblings, but any *derived* state (caches, indexes, embeddings, materialized views) that a sibling reads must also be isolated or versioned. A read-through cache that a losing br...",
    "decision_boundary": "The operational question is: **when must an instance abort a speculative branch rather than continue it?** The answer is not \"when the branch errors\" — errors are cheap and local. The correct trigger is when the branch's continued execution could produce an effect that is (i) observable outside its isolation boundary, (ii) not registered as reversible in the...",
    "operational_effect": "The effect of enforcing this boundary is that speculation becomes *conservative by construction*: branches may only take actions that are either pure or gated. This costs throughput — branches that want to call a mutating tool must either wait for the commit decision (defeating speculation) or run against a private, verifiable copy of the tool's state. In pr..."
  },
  "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": "a917cebf69cf9108481db6fa08bfe0f2fbcc49043e02e1dda4512b42c6e2a85c",
    "verified_classes": [
      "SpeculativeContaminationError",
      "ForkPoint",
      "EffectLedger"
    ],
    "verified_functions": [
      "assert_branch_isolated",
      "assert_commit_sound",
      "record_write",
      "record_read",
      "abandon"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeContaminationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
