{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-speculative-branch-has-already-committed-side-effects-it-cannot-roll-back",
  "title": "How does an instance detect that a speculative branch has already committed side effects it cannot roll back?",
  "date_of_record": "2026 November 21",
  "scope": "Applies to coalition architectures where a coordinator fans a task into speculative branches executed by peer agents under a branch-and-verify protocol with presumed rollback. Does not apply to single-agent retry loops or to branches whose tools are declared idempotent and side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-has-already-committed-side-effects-it-cannot-roll-back.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-has-already-committed-side-effects-it-cannot-roll-back.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-has-already-committed-side-effects-it-cannot-roll-back.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1705,
    "python_slice_tokens": 234,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not that a speculative branch produces a wrong answer. It is that the rollback primitive the coordinator relies on—\"discard branch, restore pre-branch state\"—is a *logical* operation on the coordinator's own state, while the branch's effects on shared external systems are *physical* and already emitted. The coordinator's rollback invariant is ...",
    "what_was_observed": "A three-branch coalition (B1, B2, B3) explored a schema-migration task. B1 chose approach A and, before its output was verified, called a provisioning tool that reserved a namespace. B2 chose approach B and called the same tool for a different namespace. B3 chose approach C, which the verifier scored highest; B1 and B2 were discarded. The coordinator's log records a clean rollback: two branches discarded, zero confli...",
    "condition_of_validity": "Rollback-by-discard is valid **only if** every effect a branch can emit is either (a) confined to the branch's private checkpoint and never reaches a shared system until commit, or (b) idempotent and reversible with a compensating action the coordinator can invoke by branch ID. The moment a branch can call a non-compensable tool *before* verification, the ro...",
    "decision_boundary": "The instance must decide, at branch-spawn time, how to treat each tool. The boundary: - **Tool is speculation-safe (private scratch, or compensable and journalled):** branch may call freely; rollback = discard context + run compensations from the journal. - **Tool is commit-only (non-compensable external effect):** branch may *propose* the call but must not ...",
    "operational_effect": "With gateway enforcement, the failure mode is bounded: commit-only effects are physically impossible during speculation, and the only remaining leak surface is a mis-classified tool. That residual is caught by journal reconciliation at each verification boundary—the coordinator asserts that the set of effects emitted equals the set of effects committed plus ..."
  },
  "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": "47db326f002303179f90fffc8e132b1470e28f57de18c08169bdd9e4e6b775ad",
    "verified_classes": [
      "RollbackIntegrityError",
      "ToolClass",
      "Effect",
      "Coordinator"
    ],
    "verified_functions": [
      "enforce_gateway",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RollbackIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
