{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-speculatively-commits-a-branch-whose-rollback-witness-was-evicted-before-reconciliation",
  "title": "What happens when an instance speculatively commits a branch whose rollback witness was evicted before reconciliation",
  "date_of_record": "2026 November 27",
  "scope": "Applies to multi-agent systems that run speculative execution branches in parallel (e.g., a planner spawning N candidate sub-agents on divergent tool-call paths) and rely on a rollback journal or witness log to reconcile or discard losing branches. Does not apply to single-branch sequential execution or to systems where branch state is fully persistent and never evicted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-commits-a-branch-whose-rollback-witness-was-evicted-before-reconciliation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-commits-a-branch-whose-rollback-witness-was-evicted-before-reconciliation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-commits-a-branch-whose-rollback-witness-was-evicted-before-reconciliation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1661,
    "python_slice_tokens": 440,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a branch failed and we rolled back.\" It is: **a losing branch's rollback witness was garbage-collected or TTL-evicted while the branch was still live**, so at reconciliation time the coordinator can neither roll the branch forward (its effects were already partially externalized) nor roll it back (its pre-image is gone). The distinction t...",
    "what_was_observed": "A planner agent decomposed a task into three speculative branches (B1, B2, B3) racing on the same mutable resource — a scratch blob store keyed by task id. Each branch wrote a rollback witness: `{pre_image_hash, tool_handle, branch_id, ttl}` into a shared witness log with a 90-second TTL, sized to the expected branch duration. B1 and B2 terminated in ~30s. B3 hung on a slow external tool call for 140s. At t=90s the w...",
    "condition_of_validity": "The invariant that speculative rollback depends on is: > A branch's rollback witness must remain material for the entire interval `[branch_spawn, branch_terminal_state_durably_recorded]`, where the terminal state is recorded *by the coordinator*, not by the branch. This fails whenever `witness_ttl < branch_wallclock`, and branch wallclock is unbounded becaus...",
    "decision_boundary": "The boundary is between **evictable** and **reconcilable**: - If a witness is evicted and the branch had **not** externalized any side effect → the branch is safely abandonable; the coordinator can mark it `lost` and proceed. No corruption. - If a witness is evicted and the branch **had** externalized a side effect → the coordinator MUST NOT treat the branch...",
    "operational_effect": "Concretely, three guardrails bound this: 1. **Witness pinning by reference count.** The coordinator increments a witness's refcount at spawn and decrements only at durable terminal disposition. The reaper skips any witness with refcount > 0; TTL only applies to refcount-0 orphans. 2. **Externalization flag gates eviction.** A witness whose branch has externa..."
  },
  "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": "17a2b9c544de8a78ed5325ffb81e283f1068d121b6b4742aced9217a67d3ca5f",
    "verified_classes": [
      "WitnessMissingError",
      "UnreconciledCommitError",
      "BranchState",
      "Witness",
      "Branch",
      "WitnessStore",
      "Coordinator"
    ],
    "verified_functions": [
      "__init__",
      "register",
      "reap",
      "materialize",
      "__init__",
      "spawn",
      "externalize",
      "rollback",
      "commit_winner"
    ],
    "verified_functions_count": 9,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnreconciledCommitError",
      "WitnessMissingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
