{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-speculative-branch-divergence-when-rollback-of-a-peer-s-committed-effects-is-no-longer-physically-possible",
  "title": "How does an instance detect speculative branch divergence when rollback of a peer's committed effects is no longer physically possible?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to orchestrators that run speculative parallel branches (hedged execution, optimistic fan-out, tree-of-agents search) where two or more branches share an effectful substrate (tool side effects, external state, or a single mutable memory store) and at most one branch may be committed. Does not apply to pure-read fan-out or to branches that write only to isolated, mergeable logs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-when-rollback-of-a-peer-s-committed-effects-is-no-longer-physically-possible.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-when-rollback-of-a-peer-s-committed-effects-is-no-longer-physically-possible.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-when-rollback-of-a-peer-s-committed-effects-is-no-longer-physically-possible.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2145,
    "python_slice_tokens": 403,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *logical rollback* and *physical rollback*. Logical rollback means the orchestrator discards a branch's transcript, marks its tokens as uncommitted, and reconciles the surviving branch's state view. Physical rollback means the branch's externalized effects—emails sent, rows written, files mutated, remote MCP tool calls...",
    "what_was_observed": "A planner agent decomposed a task into three candidate strategies and dispatched them as speculative branches A, B, and C, all sharing a `workspace` memory namespace and a set of MCP tools. Each branch was assigned a `speculation_id` and a private transcript, but the tool gateway was configured with a single shared credential and no per-branch effect tagging—a common shortcut. Branch B, running fastest, invoked `crm....",
    "condition_of_validity": "The phantom-write class is bounded by a precise condition. It occurs if and only if all of the following hold: - **Effectful speculation:** at least one tool in a speculative branch is non-idempotent *or* observable by a peer branch. - **Shared substrate:** the effect target is readable by any branch other than the emitter (shared memory namespace, shared ex...",
    "decision_boundary": "The architectural decision is where to place the speculation boundary relative to the effect boundary. There are three defensible placements, and the correct one is determined by tool idempotency and peer visibility, not by latency budget: - **Speculate over reasoning only.** Branches may plan, draft, and read; all writes are deferred to a single post-select...",
    "operational_effect": "Downstream, the phantom-write class changes three operational behaviors: 1. **Rollback becomes a two-phase, auditable operation.** `rollback(speculation_id)` first queries the effect ledger, emits a `CompensationRequired` event listing non-idempotent effects, and only then discards the transcript. The orchestrator's commit path refuses to proceed if any comp..."
  },
  "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": "e7f857e8227728a597b9a3883a2fc84d58e9d44f99841fe039e118aef8cbda24",
    "verified_classes": [
      "PhantomWriteDetected",
      "IrreversibleRollback",
      "Effect",
      "EffectLedger"
    ],
    "verified_functions": [
      "rollback",
      "verify_readback",
      "commit",
      "record",
      "non_idempotent_for",
      "writes_for_target"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "IrreversibleRollback",
      "PhantomWriteDetected"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
