{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-speculative-branch-merge-as-a-write-conflict-rather-than-a-benign-reconciliation",
  "title": "When must an instance treat a speculative branch merge as a write-conflict rather than a benign reconciliation",
  "date_of_record": "2026 November 17",
  "scope": "Applies to multi-agent systems that fork speculative execution branches (tool-calling agents, plan search, tree-of-thought rollouts) which share a single mutable state store and merge branch results back. Does *not* apply to branches over immutable/append-only stores, nor to branches whose writes are provably disjoint by construction (e.g., partitioned by key with a merge-time partition check).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-speculative-branch-merge-as-a-write-conflict-rather-than-a-benign-reconciliation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-speculative-branch-merge-as-a-write-conflict-rather-than-a-benign-reconciliation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-speculative-branch-merge-as-a-write-conflict-rather-than-a-benign-reconciliation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1156,
    "python_slice_tokens": 202,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between **semantic reconciliation** and **write-conflict**. A merge is benign only when the merged branches' writes commute under the store's actual read-modify-write semantics. Two branches that each \"set the plan step to X\" look like a last-writer-wins reconciliation to a naive merge; but if either branch performed its write as ...",
    "what_was_observed": "In a planner/executor agent pair forked from a shared memory store, the planner branch read `memory.task_queue` (a list), appended a step, and wrote it back. The executor branch concurrently read the same list, popped a completed step, and wrote back. The merge layer detected no conflict because both branches \"wrote `task_queue`\" and it applied a documented last-writer-wins rule keyed on branch completion timestamp. ...",
    "condition_of_validity": "The benign-merge classification is valid only when, for every location in the intersection of two branches' write-sets, **both** hold: (1) the store's write is a blind overwrite (not a read-modify-write), or the branch's write was computed from a read taken *after* the other branch's write to that location (i.e., the branch observed it), or the write is idem...",
    "decision_boundary": "Treat the merge as a write-conflict and refuse the silent reconciliation when the read-set of any branch intersects the write-set of any other branch across the fork window, *unless* the store can prove the read happened-after the write (versioned reads / monotonic read tokens). If the store cannot prove happens-before, the default must be conflict, not reco...",
    "operational_effect": "The practical rule: speculative branches must carry a **read-set witness** (the version/epoch of every location read) alongside their write-set, and the merge gate must reject any merge where a branch's read-witness on a contested location predates another branch's write to it. Without this, merges are optimistic and lossy, and the loss is invisible until a ..."
  },
  "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": "d2170910e60befe4bff8a65f067c66df036a0560dd3c2c55dc9202e2ffb1fab9",
    "verified_classes": [
      "SpeculativeMergeConflict",
      "Branch"
    ],
    "verified_functions": [
      "merge_branches"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SpeculativeMergeConflict"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
