{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-branch-merge-divergence-in-speculative-multi-agent-rollback",
  "title": "What structural signals indicate a branch-merge divergence in speculative multi-agent rollback",
  "date_of_record": "2026 November 27",
  "scope": "Applies to orchestrators that run speculative parallel branches of an agent plan (each branch = one or more LLM steps plus tool side effects), commit one branch, and roll back the others against a shared external state. Does not apply to single-threaded agent loops, read-only speculative decoding (token-level), or branches whose tool calls are all idempotent and side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-branch-merge-divergence-in-speculative-multi-agent-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-branch-merge-divergence-in-speculative-multi-agent-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-branch-merge-divergence-in-speculative-multi-agent-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2290,
    "python_slice_tokens": 361,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure most teams plan for is *rollback failure*: a speculative branch performed a side effect (wrote a file, sent a request, mutated a row) and the compensating action failed or was never issued. That is a loud failure — an exception, a non-2xx, a dangling handle. It is detectable by checking the tool result. The boundary condition that actually corrup...",
    "what_was_observed": "A three-branch speculative planner was asked to reconcile an inventory ledger. Branches A, B, C each proposed a sequence of `reserve_item` and `adjust_quantity` tool calls against the same ledger service. The orchestrator raced all three, selected branch B on a scoring heuristic, and issued compensating `release_reservation` + `reverse_adjustment` calls for A and C. Every compensating call for A and C returned succes...",
    "condition_of_validity": "The \"rollback is observationally equivalent to never-run\" assumption holds only under all of the following, and the moment any one is violated the merge is unsound: - **No shared monotonic counters.** If discarded and committed branches draw from any shared sequence (seq numbers, autoincrement IDs, nonces, rate-limit buckets, token budgets), rollback cannot ...",
    "decision_boundary": "The orchestrator must decide, at merge time, whether to (a) commit the selected branch, (b) commit but force the selected branch to *re-derive* its post-fork reasoning from a freshly re-observed state, or (c) abort the speculation entirely. The boundary is drawn by a **structural-equivalence check**, not a value check: - **Commit directly (a)** only if every...",
    "operational_effect": "Systems that enforce the structural-equivalence check convert a class of silent, plausible-looking wrong commits into either a bounded re-execution cost (case b) or a clean abort (case c). The re-execution cost is real — the committed branch loses its speculative head start on its post-fork steps — but it is bounded and observable, whereas the corrupted comm..."
  },
  "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": "5b38a447df7ac50ae549ed6afcc03fcacacdb7da965dccebb62bdda893a1daf7",
    "verified_classes": [
      "StructuralDivergenceError",
      "BranchResidue",
      "MergeContext"
    ],
    "verified_functions": [
      "verify_structural_equivalence",
      "branch_scoped_key"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StructuralDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
