{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-merges-a-speculative-branch-whose-side-effects-were-committed-to-a-shared-store-before-the-merge-decision",
  "title": "What happens when an instance merges a speculative branch whose side effects were committed to a shared store before the merge decision",
  "date_of_record": "2026 November 15",
  "scope": "Applies to speculative multi-agent orchestration where branch rollouts share a mutable external store (KV cache, vector DB, object store, message bus, or database) and rollback is implemented by discarding the branch's in-memory trajectory. Does not apply to fully sandboxed branches with copy-on-write or transactional isolation guaranteed by the store itself.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-merges-a-speculative-branch-whose-side-effects-were-committed-to-a-shared-store-before-the-merge-decision.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-merges-a-speculative-branch-whose-side-effects-were-committed-to-a-shared-store-before-the-merge-decision.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-merges-a-speculative-branch-whose-side-effects-were-committed-to-a-shared-store-before-the-merge-decision.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1387,
    "python_slice_tokens": 255,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A speculative branch has two distinct kinds of state: **epistemic state** (the agent's reasoning trace, tool-call log, scratchpad, and intermediate context) and **world state** (effects committed to shared infrastructure outside the orchestrator's control plane). Rollback is trivially correct for epistemic state — you drop the trajectory. Rollback is *not* c...",
    "what_was_observed": "During a fan-out of N=6 speculative branches over a shared retrieval index, branch-3 emitted an \"upsert\" tool call that wrote a synthesized document into the shared vector store before the merge adjudicator had scored it. The adjudicator rejected branch-3 (lower grounding score than branch-5) and the orchestrator rolled it back by clearing its trajectory and freeing its context window. The write remained. Downstream ...",
    "condition_of_validity": "This boundary applies when all of the following hold: - Branches execute concurrently against a store with read-your-writes semantics visible to *other* branches (shared namespace, not per-branch namespace). - Rollback is implemented at the orchestrator layer (trajectory discard) rather than at the store layer (transaction abort or namespace drop). - At leas...",
    "decision_boundary": "The decision is not \"should we allow speculative writes\" — that is often necessary for realistic tool use. The decision is **where the commit boundary sits relative to the merge boundary.** - If commit precedes merge (writes go live during rollout), you MUST have compensating rollback per side effect, registered at write time, keyed by branch ID, and execute...",
    "operational_effect": "Treating rollback as a discard operation produces failures that are *stable, reproducible, and self-consistent* — the worst class, because they survive retries and masquerade as correct behavior. The observable symptoms are: citations to documents no accepted branch authored, grounding scores that inflate across runs, audit-log/store divergence, and non-dete..."
  },
  "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": "38107e5281919389d4a7b86afe72f362c1b83be33883f78ea8d089b44086fb2f",
    "verified_classes": [
      "SpeculativeRollbackError",
      "Branch"
    ],
    "verified_functions": [
      "rollback_branch",
      "merge_or_rollback",
      "__init__",
      "record_write"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SpeculativeRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
