{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-fence-speculative-rollback-before-committing-a-reconciled-branch",
  "title": "Where must an instance Fence Speculative Rollback Before Committing a Reconciled Branch",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that run speculative sub-tasks in parallel (optimistic branching) and reconcile their results into a single committed state. Does not apply to strictly serial execution, nor to read-only fan-out where no branch mutates shared state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-fence-speculative-rollback-before-committing-a-reconciled-branch.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-fence-speculative-rollback-before-committing-a-reconciled-branch.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-fence-speculative-rollback-before-committing-a-reconciled-branch.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1632,
    "python_slice_tokens": 390,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a speculative branch was wrong.\" Speculative branches are *expected* to be wrong. The failure is **reconciling a branch whose rollback was itself incomplete** — i.e., a branch that was declared rolled-back but whose side effects (tool writes, memory mutations, emitted messages, reserved tokens) leaked past the rollback fence and were then...",
    "what_was_observed": "A planner agent decomposed a task into three speculative branches (B1, B2, B3) sharing a scratch memory region and a tool-call budget. B1 was selected as the commit path; B2 and B3 were marked for rollback. The rollback procedure: 1. Marked B2/B3 `state = ABORTED`. 2. Discarded their result objects. 3. Released their reserved tool-call budget. But B2 had already issued a `memory.write` to the shared episodic store *b...",
    "condition_of_validity": "Optimistic branching with rollback is only sound under a conjunction that is easy to state and easy to break: - **Quiescence before reconciliation.** Every aborted branch's in-flight operations must reach a terminal state (completed-and-compensated, or cancelled-and-confirmed) *before* any reconciliation read touches shared state. `ABORTED` as a scheduling l...",
    "decision_boundary": "The boundary is: **can you prove the aborted branch is quiesced before you merge?** - If the branch's side effects are confined to a branch-local scratch space that reconciliation never reads, rollback-by-discard is sound. Commit. - If the branch touches any shared resource (shared memory, external tool state, emitted messages, budget counters visible to oth...",
    "operational_effect": "The practical consequence: optimistic branching buys latency only up to the point where rollback becomes expensive. Once branches mutate shared state, the rollback fence dominates cost, and the latency win evaporates — but teams keep the optimistic path because the *failure is silent*. A dirty merge does not throw; it produces a plausible answer with a poiso..."
  },
  "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": "188fa839ef5509832f2b23050c0e7864e5af951152727b5609552a1a04f32128",
    "verified_classes": [
      "RollbackFenceError",
      "BranchState",
      "SpeculativeBranch"
    ],
    "verified_functions": [
      "abort_branch",
      "quiesce_branch",
      "reconcile",
      "run_speculative_group"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RollbackFenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
