{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-speculative-branches-before-committing-when-parallel-plans-have-already-mutated-the-same-external-resource",
  "title": "Where must an instance reconcile speculative branches before committing, when parallel plans have already mutated the same external resource?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent runtime that fans a single goal into N speculative sub-plans executed in parallel against shared external resources (filesystems, issue trackers, databases, SaaS APIs), where each branch may write. It does not apply to read-only fan-out (map-reduce retrieval, parallel search) or to branches that write only to branch-private sandboxes that are never merged back.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branches-before-committing-when-parallel-plans-have-already-mutated-the-same-external-resource.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branches-before-committing-when-parallel-plans-have-already-mutated-the-same-external-resource.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branches-before-committing-when-parallel-plans-have-already-mutated-the-same-external-resource.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2042,
    "python_slice_tokens": 469,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"a write conflict.\" Naive conflict detection catches two branches writing the same key at the same logical instant. The dangerous case is **divergent speculative writes that never collide in time but collide in intent**: branch A reads resource `R` at `t0`, writes a *derived* value at `t2`; branch B reads `R` at `t1` (after `t0`, befo...",
    "what_was_observed": "A planner instance decomposed \"bump the dependency and fix call sites\" into three parallel branches: (1) edit `pyproject.toml` to raise `libfoo` from 2.1→3.0; (2) update call sites in `src/` for the new API; (3) regenerate the lockfile. Branches 1 and 3 both touched the dependency graph. Branch 3's lockfile regeneration read `pyproject.toml` at `t1`, *before* branch 1's edit landed at `t2`. Branch 3 therefore produce...",
    "condition_of_validity": "Speculative parallel execution is safe only under one of three regimes: 1. **Disjoint read-write closure.** Every branch's read-set ∪ write-set is disjoint from every other branch's. Rare in practice; agents under-declare read-sets because they don't know what they'll read until they read it. 2. **Serializable commit with read-set validation.** Branches exec...",
    "decision_boundary": "The reconciler must decide, per invalidated branch, between **re-run** and **re-derive**: - **Re-run** the branch from scratch when its transformation is non-deterministic or depends on mid-execution LLM reasoning that cannot be replayed (e.g., the branch made a judgment call about which call sites to touch). Cost: full branch re-execution, including token s...",
    "operational_effect": "Without read-set validation, speculative parallelism converts a serializable failure (agent hits a conflict, sees the error, adapts) into a **silent consistency violation** that surfaces far from its cause. The agent's error-recovery loop is then misdirected: it debugs the symptom (branch 2's call sites) rather than the cause (branch 3's stale derivation). E..."
  },
  "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": "0dd5f19d884145092943de966202ba9535d06b9bb40c3b6dbb7128e57f9090e5",
    "verified_classes": [
      "StaleReadSetError",
      "VersionLog",
      "Branch"
    ],
    "verified_functions": [
      "reconcile",
      "commit_or_repair",
      "snapshot"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleReadSetError"
    ],
    "sample_fail_closed_invariants": [
      "reconciliation did not converge within iteration bound"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
