{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-reconcile-divergent-speculative-branches-when-a-rollback-target-has-already-been-mutated-by-a-sibling-agent",
  "title": "How should an instance detect and reconcile divergent speculative branches when a rollback target has already been mutated by a sibling agent",
  "date_of_record": "2026 November 29",
  "scope": "Applies to multi-agent systems where a coordinator forks speculative branches (parallel tool-calling agents) that share a mutable world-state store and where one branch's failure triggers a rollback to a checkpoint. Does not apply to stateless fan-out with no shared writes, nor to purely read-only speculative decoding.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-reconcile-divergent-speculative-branches-when-a-rollback-target-has-already-been-mutated-by-a-sibling-agent.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-reconcile-divergent-speculative-branches-when-a-rollback-target-has-already-been-mutated-by-a-sibling-agent.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-reconcile-divergent-speculative-branches-when-a-rollback-target-has-already-been-mutated-by-a-sibling-agent.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1428,
    "python_slice_tokens": 194,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"rollback failed.\" Rollback *succeeded* against its own record. The failure is that the checkpoint the coordinator rolled back to was **logically stale the moment it was taken**, because a sibling branch had already committed an irreversible side effect (a write, a sent message, a posted transaction) whose *state record* was snapshott...",
    "what_was_observed": "A coordinator ran three speculative branches from checkpoint `C0`: - Branch A: read-only retrieval, succeeded, produced a candidate answer. - Branch B: called a `send_notification` tool, then continued reasoning, then hit a schema-validation failure and requested rollback. - Branch C: wrote `order.status = \"shipped\"` to the shared store, then committed. The coordinator, on B's rollback request, restored the shared st...",
    "condition_of_validity": "A speculative branch may be rolled back to checkpoint `C` only if, for every effect `e` produced by any branch after `C`: 1. `e` is recorded in the same version space as `C`, **and** 2. `e` is either reversible (has a registered compensating action) or was gated behind a commit barrier that the rollback also revokes. The invariant: **rollback safety is a pro...",
    "decision_boundary": "When a branch requests rollback to `C`: - If the effect delta since `C` is empty or entirely reversible → rollback in place; safe. - If the delta contains irreversible committed effects from the *requesting* branch only → rollback the state, then execute the branch's registered compensations in reverse order; do not restore `C` blindly. - If the delta contai...",
    "operational_effect": "Systems that ignore this boundary exhibit **silent external divergence**: internal stores, invariant checkers, and replay tests all pass, while the world outside the process disagrees. This is worse than a hard failure because it defeats the verification layer — the auditor replays against the store and sees consistency. The guardrail is to make lineage and ..."
  },
  "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": "f3db6509bf8a8e96c1a0dee16c7081ea6c1f5d299ed528f7dcfe261bce99c992",
    "verified_classes": [
      "EffectClass",
      "RollbackPoisonedError",
      "Effect"
    ],
    "verified_functions": [
      "assert_rollback_safe",
      "rollback"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "RollbackPoisonedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
