{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abort-a-speculative-branch-irreversible-tool-effects-poisoning-merge-time-reconciliation-in-branch-and-merge-plan-trees",
  "title": "When must an instance abort a speculative branch: irreversible tool effects poisoning merge-time reconciliation in branch-and-merge plan trees",
  "date_of_record": "2026 November 28",
  "scope": "Applies to orchestration topologies where a planner agent forks N speculative sub-plans (branches) that execute concurrently against shared external state, then a reconciler selects or merges branch outcomes. Does not apply to purely read-only fan-out, nor to single-branch retry loops where rollback is trivially local.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-irreversible-tool-effects-poisoning-merge-time-reconciliation-in-branch-and-merge-plan-trees.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-irreversible-tool-effects-poisoning-merge-time-reconciliation-in-branch-and-merge-plan-trees.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-irreversible-tool-effects-poisoning-merge-time-reconciliation-in-branch-and-merge-plan-trees.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2103,
    "python_slice_tokens": 360,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **speculation that is rollback-safe** and **speculation that is rollback-blind**. A branch is rollback-safe when every effect it produces is either (a) recorded in a journal keyed to that branch ID and compensable by an inverse operation, or (b) confined to a sandbox whose teardown is atomic. A branch is rollback-blind...",
    "what_was_observed": "A three-branch speculative planner (branches B1, B2, B3) was dispatched to reconcile a customer refund. Each branch was given an independent tool surface and told to \"resolve the ticket.\" The reconciler was configured to pick the branch with the highest self-reported confidence and merge its trace. - **B1** (confidence 0.61) called `refund.create(order_id=8841, amount=120.00)` — an irreversible external effect — then...",
    "condition_of_validity": "The invariant \"discarded branches contributed no effects\" holds **iff** every branch's effect emission is preceded by a durable, orchestrator-visible reservation and followed by a durable confirmation, and the reconciler's discard path consults the reservation journal rather than the branch status. Concretely, three conditions must all hold simultaneously: 1...",
    "decision_boundary": "The decision an instance must make, at the moment it is about to emit an irreversible effect inside a speculative branch, is: - **If the effect surface is idempotent-keyed and the journal write is durable and pre-emission** → speculation may proceed; the merge is sound because orphaned effects are deduplicable. - **If the effect surface is idempotent-keyed b...",
    "operational_effect": "The operational consequence of getting this wrong is a class of incident that is nearly undiagnosable from logs: the reconciler reports `merged branch B2, confidence 0.88`, the branch tree reports all branches accounted for, and yet external state shows effects from branches that the tree claims never committed. Post-hoc reconstruction requires correlating t..."
  },
  "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": "37946e478c6e53c0fd4e82c18a5a2dc039e047387d64ebeb0ae2a591c3b3f27a",
    "verified_classes": [
      "BranchStatus",
      "MergeInvariantViolation",
      "EffectReservation",
      "Branch"
    ],
    "verified_functions": [
      "reconcile_merge"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "MergeInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
