{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-divergence-during-speculative-multi-agent-execution-with-rollback-and-branch-reconciliation",
  "title": "Which invariants prevent silent divergence during speculative multi-agent execution with rollback and branch reconciliation",
  "date_of_record": "2026 November 12",
  "scope": "Applies to orchestration layers that fan out speculative agent branches against a shared mutable context, then reconcile by committing one branch and rolling back the rest. Does not apply to purely stateless fan-out (map-only) patterns where no branch mutates shared state, nor to single-agent retry loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-divergence-during-speculative-multi-agent-execution-with-rollback-and-branch-reconciliation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-divergence-during-speculative-multi-agent-execution-with-rollback-and-branch-reconciliation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-divergence-during-speculative-multi-agent-execution-with-rollback-and-branch-reconciliation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1336,
    "python_slice_tokens": 218,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure we are isolating is not \"a branch produced a wrong answer.\" It is **commutative rollback divergence**: the reconciler commits branch *A*, rolls back branches *B* and *C*, and the resulting global state is *not* equivalent to the state that would have existed had *B* and *C* never executed. The system believes rollback is the identity operation. I...",
    "what_was_observed": "In a three-way speculative fan-out over a shared retrieval cache, branches *A*, *B*, *C* each issued cache writes keyed by a *pre-image* hash computed at branch entry. Branch *B* mutated its pre-image mid-execution (a re-chunking step), so its rollback key no longer matched its write key. Rollback of *B* was a no-op. Reconciliation committed *A* and reported a clean rollback. The stale *B* entries survived and poison...",
    "condition_of_validity": "Rollback-as-identity holds only when all four of the following are enforced: 1. **Journal key immutability.** Every side effect is journaled under a key derived from immutable inputs captured at branch entry. If a branch can change what it writes *to* after it has decided what it will roll back, the journal is unsound. 2. **Reverse-total-order reversal.** Ro...",
    "decision_boundary": "The operational question is: *when do you pay for shadow state versus trusting journaled rollback?* - If branches touch **disjoint** resources (provable by static key analysis), journaled rollback is sound and cheap. Proceed. - If branches touch **shared mutable** resources and any branch can mutate its own write keys mid-flight, journaled rollback is unsoun...",
    "operational_effect": "Enforcing the four invariants costs memory (shadow state) or write-latency (key freezing and reverse-order journaling) proportional to speculative fan-out width. The payoff is that reconciliation becomes *decidable*: a committed branch's post-state is provably identical to its solo-execution post-state. Without enforcement, the system accumulates slow cache ..."
  },
  "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": "522879f98d1ab694583285694f2122c5a6de8ce7254cd38bfa4712c6bf56ae0e",
    "verified_classes": [
      "RollbackDivergenceError"
    ],
    "verified_functions": [
      "reconcile"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "RollbackDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
