{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-speculative-multi-agent-branch-is-unsafe-to-commit-side-effect-leakage-across-rollback-boundaries",
  "title": "What structural signals indicate a speculative multi-agent branch is unsafe to commit: side-effect leakage across rollback boundaries",
  "date_of_record": "2026 November 29",
  "scope": "Applies to orchestrators that run multiple speculative agent branches in parallel from a shared checkpoint and commit one winning branch by rolling back the others. Does not apply to single-branch execution or to branches whose tool calls are provably idempotent and side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-speculative-multi-agent-branch-is-unsafe-to-commit-side-effect-leakage-across-rollback-boundaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-speculative-multi-agent-branch-is-unsafe-to-commit-side-effect-leakage-across-rollback-boundaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-speculative-multi-agent-branch-is-unsafe-to-commit-side-effect-leakage-across-rollback-boundaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1738,
    "python_slice_tokens": 278,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure we are isolating is *not* \"the wrong branch won.\" It is the case where a branch that is rolled back has already mutated external state that the rollback boundary cannot reach. Speculative execution over agent plans assumes a clean separation between *reasoning state* (context, scratchpad, plan tree, tool-result cache) and *world state* (files, da...",
    "what_was_observed": "A planner spawned three speculative branches from checkpoint `C0` to resolve an ambiguous refactor task. Each branch received an isolated context fork but shared a single tool gateway — the gateway was treated as stateless infrastructure, not as part of the branch's state. - Branch A: read-heavy exploration, produced a plan, called no mutating tools. - Branch B: called `write_file(src/util.py)`, then `run_tests()`, w...",
    "condition_of_validity": "The invariant that makes speculative branch-and-rollback sound is: > For every branch `b` and every tool call `t` executed under `b`, either `t` is classified read-only, or an undo record for `t` is durably registered in `b`'s rollback journal *before* `t` returns, or `t` is deferred until `b` is the sole surviving branch. This holds only when all three of t...",
    "decision_boundary": "The operational decision is: *at what point must a speculative branch be demoted from \"rollback-safe\" to \"commit-required\"?* A branch crosses this boundary the first time it performs a non-undoable effect. From that instant the branch can no longer be discarded cleanly; it must either be committed (and its effects reconciled into the winner) or its effects m...",
    "operational_effect": "Enforcing this boundary changes speculative execution from \"fork context, race, pick winner\" to \"fork context, race, reconcile effect ledgers, then pick winner.\" The cost is that mutating tools gain a pre-registration requirement and non-undoable tools gain a quarantine buffer, which adds latency to any branch that must send or write. The benefit is that the..."
  },
  "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": "4cab8466b628471612f657c50b308db73142dcf8a0e10c569cb3b1e5345d8166",
    "verified_classes": [
      "EffectClass",
      "UnsafeCommitError",
      "Effect",
      "Branch"
    ],
    "verified_functions": [
      "commit_winner",
      "record",
      "has_unrecoverable_effect"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnsafeCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
