{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-speculative-rollback-branches-before-branch-local-memory-mutations-leak-into-the-shared-episodic-store",
  "title": "Where must an instance bound speculative rollback branches before branch-local memory mutations leak into the shared episodic store",
  "date_of_record": "2026 November 29",
  "scope": "Applies to multi-agent systems that fork speculative execution branches (parallel candidate plans, tree-of-agents search, or speculative tool-call fan-out) where each branch shares a single episodic memory store and only one branch is committed. Does not apply to fully isolated per-branch memory namespaces that are reconciled only at commit time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-speculative-rollback-branches-before-branch-local-memory-mutations-leak-into-the-shared-episodic-store.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-speculative-rollback-branches-before-branch-local-memory-mutations-leak-into-the-shared-episodic-store.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-speculative-rollback-branches-before-branch-local-memory-mutations-leak-into-the-shared-episodic-store.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1260,
    "python_slice_tokens": 166,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways to make speculative branches \"safe to discard.\" The first is *compensating rollback*: branches write to the shared store, and on abort the orchestrator issues inverse operations to undo them. The second is *write-buffered speculation*: branches write to a branch-local overlay, and only the committed branch's overlay is spliced into the sha...",
    "what_was_observed": "A planner agent spawned three speculative branches to resolve a retrieval ambiguity. Branch B inferred that a target service's auth token had rotated (it read a stale cached credential from the shared store, then wrote a \"corrected\" credential entry plus a derived note \"token rotated at T\"). Branch A committed. Branch B was aborted. The orchestrator's rollback deleted the corrected credential entry but did not know a...",
    "condition_of_validity": "Compensating rollback is only sound when all three hold: (1) every branch write is recorded in a single ordered undo log with its originating read-set; (2) every derivation is causally linked to its read-set so the undo log can transitively close over dependents; and (3) no other agent can read a speculative entry before the branch resolves. In practice (3) ...",
    "decision_boundary": "Fork an overlay when the branch's read-set is not statically known at fork time (i.e., the agent will issue retrieval calls whose keys depend on earlier results). Use compensating rollback only for branches whose entire mutation set is enumerated up front and whose reads are pinned to an immutable snapshot. The boundary is the presence of *read-after-own-wri...",
    "operational_effect": "Systems that adopt overlay splicing with a fail-closed version check eliminate the orphaned-derivation class entirely, at the cost of a copy-on-write overhead per branch and the requirement that every read path honor the overlay predicate. Systems that keep compensating rollback must additionally enforce read-time filtering on `branch_id`, which converts the..."
  },
  "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": "ee5def6f4a265c9c9ba6c62cc7ce61b9c503fd8ea3475cb48e2d0255949ab700",
    "verified_classes": [
      "SpeculativeBranchLeak",
      "OverlayBranch"
    ],
    "verified_functions": [
      "__init__",
      "read",
      "write",
      "commit",
      "abort"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SpeculativeBranchLeak"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
