{
  "schema_version": "1.3.0",
  "slug": "when-must-a-speculative-branch-reconcile-before-its-parent-commits",
  "title": "When must a speculative branch reconcile before its parent commits?",
  "date_of_record": "2026 November 6",
  "scope": "Applies to multi-agent systems that execute speculative branches (parallel agent attempts, draft-then-verify pipelines, tree-search planners) whose effects are staged behind a rollback log and merged into a shared parent state. Does not apply to pure read-only fan-out or to branches that own disjoint, non-overlapping resources by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-a-speculative-branch-reconcile-before-its-parent-commits.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-a-speculative-branch-reconcile-before-its-parent-commits.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-a-speculative-branch-reconcile-before-its-parent-commits.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1394,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A speculative branch has two distinct notions of \"done\": *local completion* (the branch has produced a result and stopped mutating its private view) and *reconciliation* (the branch's staged deltas have been validated against, and merged into, the parent's canonical state). The non-obvious invariant is that **local completion does not imply reconciliation sa...",
    "what_was_observed": "In a three-agent speculative planner (a router that forks two executor branches and a critic that selects), the following occurred: 1. Branch A read `inventory[sku] = 40` at parent revision 118. 2. Branch B, running concurrently, reserved 35 units, advancing parent to revision 119 with `inventory[sku] = 5`. 3. Branch A completed locally: its plan \"ship 30 units of sku\" was internally consistent and passed its own loc...",
    "condition_of_validity": "The phantom commit is possible exactly when all three hold: - **Speculative reads cross a shared mutable resource.** The branch's decision depends on parent state that other branches can mutate. - **Merge is delta-based or conflict-detection is write-only.** If the merge layer only checks write-write overlap, read-write hazards slip through. Delta merges are...",
    "decision_boundary": "Reconcile (re-validate read-set and re-run or abort) rather than blindly merge when **any** of the following is true at merge time: - `branch.base_revision != parent.current_revision` **and** the branch's read-set intersects the parent's write-set since `base_revision`. - The branch's output is a *plan* or *decision* (not a pure data transform) — decisions a...",
    "operational_effect": "Enforcing read-set validation at merge converts phantom commits into *detected* stale branches. The cost is a re-execution of branches whose reads were invalidated (here, ~18% of speculative branches in steady state, concentrated on hot keys). The benefit is that the rollback log becomes a true safety net rather than a decorative one: rollback is invoked onl..."
  },
  "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": "3f8680e1906732003fed47944c33f7e96ad996ef07e7faf6f265221d0be1a34c",
    "verified_classes": [
      "StaleBranchError",
      "Revision",
      "Branch",
      "ParentState"
    ],
    "verified_functions": [
      "reconcile",
      "__init__",
      "advance",
      "keys_written_after"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StaleBranchError"
    ],
    "sample_fail_closed_invariants": [
      "decision-producing branch has a stale base revision; require re-validation before merge"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
