{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-orphaned-branch-commits-from-resurrecting-after-speculative-multi-agent-rollback",
  "title": "Which invariants prevent orphaned branch commits from resurrecting after speculative multi-agent rollback",
  "date_of_record": "2026 November 23",
  "scope": "Applies to orchestration layers that run N parallel speculative agent branches against a shared mutable world-state (filesystem, database, tool-side effects) and reconcile by selecting one winning branch and rolling back the others. Does not apply to purely functional/stateless fan-out where branches have no side effects on shared substrate.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-orphaned-branch-commits-from-resurrecting-after-speculative-multi-agent-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-orphaned-branch-commits-from-resurrecting-after-speculative-multi-agent-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-orphaned-branch-commits-from-resurrecting-after-speculative-multi-agent-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1833,
    "python_slice_tokens": 400,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **logical rollback** (the orchestrator marks a branch as discarded and stops scheduling it) and **physical rollback** (every side effect the branch committed is provably undone before the winner's effects are made durable). Most speculative-execution frameworks implement logical rollback correctly and physical rol...",
    "what_was_observed": "A three-branch speculative planner (branches A, B, C) each executed a multi-step plan that included a `write_file` tool call against a shared workspace and a `git commit`-equivalent checkpoint. Branch A finished first and was selected as winner. The orchestrator issued abort to B and C, received abort acknowledgements from both, and serialized A's commit. Post-commit, the workspace diff contained a hunk authored by C...",
    "condition_of_validity": "The quiescence-before-commit invariant is valid — and the failure is prevented — only under all of the following: - **Every side-effecting tool call is tracked by the branch's own lifecycle.** If a branch can dispatch a tool call that the branch's abort path does not await, quiescence is unprovable and the invariant is vacuous. The orchestrator must own or o...",
    "decision_boundary": "The boundary between \"safe to commit winner\" and \"must keep draining\" is defined by a single predicate over the loser set: - **Commit** only when `∀ loser L: L.state == QUIESCENT`, where `QUIESCENT` means (no in-flight tool calls) ∧ (no unflushed buffered writes) ∧ (drain completed before its deadline). - **Block and escalate** when any loser reached `DRAIN_...",
    "operational_effect": "With the two-phase drain and fence-token invariant enforced, speculative multi-agent execution becomes *transactionally* safe at the cost of a bounded latency penalty: the winner's commit is delayed by the slowest loser's drain, typically one tool-call round-trip. The system trades a small, predictable tail-latency increase for elimination of silent post-com..."
  },
  "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": "0694fbf6301a5a67fc28827406cce8db0b94c1a27bbdff138d44a6f6b33a9f89",
    "verified_classes": [
      "ResurrectionFault",
      "BranchState",
      "Branch"
    ],
    "verified_functions": [
      "commit_winner",
      "signal_abort",
      "drain"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResurrectionFault"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
