{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-merge-speculative-branches-that-are-semantically-compatible-but-causally-divergent-and-silently-corrupt-shared-state",
  "title": "Why does an instance merge speculative branches that are semantically compatible but causally divergent, and silently corrupt shared state?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent runtime that forks parallel speculative execution branches (tree-of-thought, parallel tool-call fan-out, draft-and-verify, or multi-candidate planning) and reconciles them via semantic similarity or LLM-judged conflict resolution. Does not apply to branches that share a serialized write-lock or that commit through a single linear log.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-merge-speculative-branches-that-are-semantically-compatible-but-causally-divergent-and-silently-corrupt-shared-state.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-merge-speculative-branches-that-are-semantically-compatible-but-causally-divergent-and-silently-corrupt-shared-state.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-merge-speculative-branches-that-are-semantically-compatible-but-causally-divergent-and-silently-corrupt-shared-state.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2209,
    "python_slice_tokens": 469,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a speculative branch merge can be \"correct,\" and they are not the same property: - **Semantic compatibility** — the two branch outputs *mean* the same thing, or their differences are judged non-conflicting by a similarity metric or a judge model. - **Causal compatibility** — the two branch outputs were produced against the same *read-set* ...",
    "what_was_observed": "A planning agent was asked to reconcile a customer record across three tools: a CRM lookup, a billing ledger read, and a support-ticket history fetch. The runtime fanned out three speculative branches to draft a resolution plan concurrently, each branch allowed to call tools and read memory. Trace, condensed: 1. **Branch A** reads `customer.tier = \"gold\"` from CRM (read-set R0), drafts plan step: *\"apply 15% loyalty ...",
    "condition_of_validity": "Semantic conflict resolution is a valid merge strategy **iff** all of the following hold: 1. **Shared read-set lineage.** Every branch's reads are tagged with the exact version (content hash or monotonic version) of each shared fact they consumed. Two branches are *merge-eligible* only if, for every fact both read, they read the same version — or the diverge...",
    "decision_boundary": "The boundary is between **reconciling text** and **reconciling state**. Concretely: - If branches are *pure* (no tool side effects, no shared-memory writes) and read from an immutable snapshot, semantic merge is safe — the read-set is trivially shared. - If branches read *mutable* shared state (a memory store that siblings can write, a live API, a database),...",
    "operational_effect": "The observable signature of this failure is a merge that reports success, a plan that looks coherent in its own text, and a downstream failure that is *causally distant* from the merge — typically a precondition violation at a write, or a re-plan that re-applies a step. Because the merge log shows \"0 conflicts,\" incident triage almost always starts in the wr..."
  },
  "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": "0d7dc41f5613f7e47ccc65d70a38afe207274b08f36c23cd86d7d890503e6f7e",
    "verified_classes": [
      "CausalMergeViolation",
      "Branch"
    ],
    "verified_functions": [
      "merge_speculative_branches"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CausalMergeViolation"
    ],
    "sample_fail_closed_invariants": [
      "side-effecting branch cannot be semantically merged; must commit/rollback as a unit"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
