{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-branch-commits-from-poisoning-sibling-agents-during-rollback-and-winner-arbitration",
  "title": "Which invariants prevent speculative branch commits from poisoning sibling agents during rollback-and-winner arbitration",
  "date_of_record": "2026 November 25",
  "scope": "Applies to systems where a coordinator agent forks N speculative execution branches from a shared checkpoint, each branch mutating tool state and its own episodic memory, then arbitrates a single winner whose effects are committed while losers are rolled back. Does not apply to strictly sequential single-branch execution or to read-only fan-out (map) patterns with no state mutation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-commits-from-poisoning-sibling-agents-during-rollback-and-winner-arbitration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-commits-from-poisoning-sibling-agents-during-rollback-and-winner-arbitration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-commits-from-poisoning-sibling-agents-during-rollback-and-winner-arbitration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2251,
    "python_slice_tokens": 464,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative multi-agent execution conflates two distinct notions of \"state\" that ordinary transactional systems keep separate: **branch-local working state** (episodic memory, scratch context, tool call logs) and **externally observable effects** (filesystem writes, API mutations, database rows, outbound messages). A rollback is only sound if every effect pr...",
    "what_was_observed": "A coordinator model forked five branches of a code-refactoring task from a common checkpoint. Each branch was given the same context window plus a distinct \"strategy hint\" (e.g., \"extract helper,\" \"inline,\" \"rename first\"). Branches 1–4 completed and returned proposals. Branch 5 was slower — it issued a `apply_patch` tool call to a sandbox filesystem and then, while awaiting the response, the coordinator's arbitratio...",
    "condition_of_validity": "The invariant required to prevent this is a **two-phase rollback barrier with quiescence proof**. Formally: a branch may be marked `ROLLED_BACK` only after (1) all its issued tool calls have reached a terminal state (success, failure, or explicit cancellation acknowledgement), and (2) all effects from those calls are either discarded (overlay) or compensated...",
    "decision_boundary": "The boundary between safe and unsafe speculative execution is whether the tool surface is **effect-classified at registration time**. Tools must be tagged `READ_ONLY`, `OVERLAY_WRITABLE` (writes a branch-scoped buffer the runtime can discard), or `EXTERNAL` (writes to shared substrate). Speculation across `EXTERNAL` tools is only safe if the tool supports a ...",
    "operational_effect": "The practical consequence is that speculative multi-agent execution with rollback is a **transactional protocol**, not a search heuristic. The coordinator must treat the fork set as a distributed transaction with a two-phase commit at the arbitration boundary: phase one is \"all branches quiesced and effects staged,\" phase two is \"winner commits, losers' stag..."
  },
  "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": "24f348ef011672ea74a6b60d3c3589f77b44b0aa391a0047793924c40384f59f",
    "verified_classes": [
      "SpeculationInvariantViolation",
      "BranchState",
      "ToolClass",
      "ToolCall",
      "Branch",
      "ForkSet"
    ],
    "verified_functions": [
      "validate_fork_set",
      "rollback_losers",
      "select_winner_and_commit",
      "in_flight"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SpeculationInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "arbitration reached commit with unsealed loser branches"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
