{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-speculative-branch-commits-when-parallel-rollback-invalidates-a-sibling-s-already-merged-write",
  "title": "How should an instance reconcile speculative branch commits when parallel rollback invalidates a sibling's already-merged write",
  "date_of_record": "2026 November 29",
  "scope": "Applies to orchestrators that fan a single task into N parallel speculative agent branches, each writing into a shared working set (files, KV state, tool side-effects), then merge the first successful branch and roll back the rest. Does not apply to read-only fan-out, to branches with isolated copy-on-write sandboxes that never share a namespace, or to single-branch retry loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branch-commits-when-parallel-rollback-invalidates-a-sibling-s-already-merged-write.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branch-commits-when-parallel-rollback-invalidates-a-sibling-s-already-merged-write.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branch-commits-when-parallel-rollback-invalidates-a-sibling-s-already-merged-write.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1915,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a rollback failed.\" It is **rollback of branch A invalidating a write that branch B already committed into the shared working set, where B is the branch the orchestrator intends to keep.** Speculative parallel execution assumes branch isolation is *logical* (each branch tagged with a branch-id) while the merge step assumes isolation is *p...",
    "what_was_observed": "A three-branch speculation over a code-refactor task. Branches A, B, C each received the same task spec and a shared `workspace/` directory with a common `util.py`. Each branch was assigned a `branch_id` and instructed to tag its writes. - Branch A edited `util.py` (added a helper), then failed a lint gate at step 4. - Branch B read `util.py` *after* A's write landed (the shared FS had no per-branch view), imported A...",
    "condition_of_validity": "The merge-lineage invariant holds only when, for every surviving branch `w` and every path or resource `r` in `w`'s dependency closure, the committed state of `r` after rollback equals the state `w` observed when it last read `r`. Formally: `state_after_rollback(r) == state_observed_by(w, r)` for all `r ∈ closure(w)`. This is violated whenever: 1. A write by...",
    "decision_boundary": "The orchestrator must decide, at rollback time, for each non-winner write `x`: - If `x` is in the dependency closure of the winner → **promote** (re-tag to winner's lineage, do not revert). Record the promotion. - If `x` is not in any surviving branch's closure → **revert** normally. - If closure is *unknown* (the branch did not record reads, or a tool side-...",
    "operational_effect": "Implementing dependency-tracked rollback changes three things: 1. **Write-log schema** must carry `(path, branch_id, read_set_snapshot_hash)` — the set of resources the branch had read at the time of write. Rollback computes `closure(winner)` from these snapshots and intersects with the revert set. 2. **Tool side-effects** must be either namespaced by branch..."
  },
  "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": "27200b1965d59a1441bde7fbc87dc34514430767349791438ce4b4dbd3682777",
    "verified_classes": [
      "LineageUnresolvedError",
      "Write"
    ],
    "verified_functions": [
      "compute_closure",
      "rollback",
      "merge_gate"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "LineageUnresolvedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
