{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-speculatively-forks-parallel-agent-plans-and-the-merge-commits-a-branch-whose-tool-side-effects-were-only-partially-roll",
  "title": "What happens when an instance speculatively forks parallel agent plans and the merge commits a branch whose tool side effects were only partially rolled back",
  "date_of_record": "2026 November 30",
  "scope": "Applies to orchestrators that run speculative branch-and-merge over parallel agent plans, where at least one branch executes side-effecting tools and the merge step commits a winning branch while discarding losers. Does not apply to read-only fan-out, pure-reasoning ensembles, or single-branch retries where no plan is merged.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-forks-parallel-agent-plans-and-the-merge-commits-a-branch-whose-tool-side-effects-were-only-partially-roll.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-forks-parallel-agent-plans-and-the-merge-commits-a-branch-whose-tool-side-effects-were-only-partially-roll.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-forks-parallel-agent-plans-and-the-merge-commits-a-branch-whose-tool-side-effects-were-only-partially-roll.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2135,
    "python_slice_tokens": 332,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **logical rollback** and **physical rollback**. A speculative orchestrator forks N branches, each an independent agent plan with its own context slice and its own tool bindings. When a branch loses the merge, the orchestrator discards its *state* — the message log, the scratchpad, the provisional artifacts in the branc...",
    "what_was_observed": "A three-way speculative round over a provisioning task. Branches A, B, C each drafted a plan to reconcile a set of resources. All three shared a tool binding to an external control plane (call it `apply_change`) and a scratch namespace (`branch://{id}/`). - Branch A called `apply_change(resource=r1, desired=state_x)` and succeeded. Its compensation entry was registered as `revert_change(r1, prior=state_0)`. - Branch ...",
    "condition_of_validity": "The spec-exec invariant — *discarding a branch leaves the world equivalent to the branch never having run* — is valid only under all of the following, and the orchestrator must be able to *prove* each per branch before it is allowed to fork a side-effecting plan: 1. **Effect keying.** Every mutating tool call is tagged with `(branch_id, effect_id)` at dispat...",
    "decision_boundary": "The operative question is not \"can this plan run in parallel?\" but \"**can this plan's effects be un-run, and does the un-run know what it is un-running?**\" - If every mutating effect in a branch is `reversible` *and* keyed to `(branch_id, effect_id)` *and* compensation is compare-and-revert — fork freely. - If a branch contains an `irreversible` effect — do ...",
    "operational_effect": "The downstream consequence is a class of failure that is *self-concealing*. The merge log is internally consistent. The compensation ledger shows all losers cleanly reverted. The winning branch's record shows its plan executed. No invariant inside the orchestrator fires, because every invariant the orchestrator checks is scoped to branch namespaces and plan ..."
  },
  "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": "1f964575bc5f0f295d6a4d5723d51c0ec5da02d98316d6389c1056e83066b410",
    "verified_classes": [
      "SpeculationBoundaryError",
      "Reversibility",
      "Effect",
      "Branch"
    ],
    "verified_functions": [
      "assert_round_is_speculatable",
      "compensate_loser"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculationBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
