{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-speculative-branch-state-before-merge-when-rollback-has-already-mutated-shared-memory",
  "title": "Where must an instance reconcile speculative branch state before merge when rollback has already mutated shared memory",
  "date_of_record": "2026 December 1",
  "scope": "Applies to multi-agent planners that execute speculative branches (parallel sub-agents exploring alternative plans) and merge results into a shared episodic store, with rollback used to discard losing branches. Does not apply to single-agent linear execution or to branches that never write to shared memory.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branch-state-before-merge-when-rollback-has-already-mutated-shared-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branch-state-before-merge-when-rollback-has-already-mutated-shared-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branch-state-before-merge-when-rollback-has-already-mutated-shared-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1405,
    "python_slice_tokens": 238,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a branch produced a wrong answer.\" It is **rollback reconciliation against a shared store that was already mutated by a sibling branch during the speculative window**. In branch-and-merge planning, a rollback is typically modeled as \"undo everything the losing branch did.\" That model is only valid if the losing branch's writes are *isolat...",
    "what_was_observed": "A planner spawns three speculative branches over a shared blackboard: - Branch A: \"assume the config key is `retry_max`\" — writes `blackboard[\"cfg_key\"] = \"retry_max\"`. - Branch B: reads `blackboard[\"cfg_key\"]`, resolves a downstream fact `blackboard[\"effective_limit\"] = 5`, and merges. - Branch C: writes `blackboard[\"cfg_key\"] = \"max_retries\"` (the correct value) and wins the merge vote. The coordinator rolls back A...",
    "condition_of_validity": "Rollback-based merge is sound **only if** one of these holds for every speculative branch: - **Write isolation:** branches write to private overlays that are never visible to siblings until merge; reads across branches go through a copy-on-read snapshot, not the live store. (Fork-per-branch with a merged read view at commit.) - **Read-dependency tracking:** ...",
    "decision_boundary": "The coordinator must decide, at merge time, between **accept**, **re-execute**, and **reject** for each candidate write. The boundary is the presence of a live read-dependency edge into a retracted premise: - If a write's read-set is disjoint from the retraction set → **accept** (no revalidation needed). - If a write's read-set intersects the retraction set ...",
    "operational_effect": "Without read-dependency tracking, speculative merge produces **latent inconsistency that survives validation** and propagates into downstream semantic memory, where it is later distilled and becomes hard to trace. The failure is silent: no exception, no failed assertion, just a merged fact that contradicts its own premise. The operational guardrail is to mak..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "419cdda2f5021b708e3ec7af8b8afcf87a1be53b1aa295c4283a6a3de0a038bf",
    "verified_classes": [
      "UnsoundMergeError",
      "SpeculativeWrite",
      "ProvenanceBlackboard"
    ],
    "verified_functions": [
      "reconcile",
      "__init__",
      "record",
      "merge"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnsoundMergeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
