{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-branch-collapse-when-reconciled-rollback-loses-causal-ordering-across-peer-agents",
  "title": "Which invariants prevent speculative branch collapse when reconciled rollback loses causal ordering across peer agents",
  "date_of_record": "2026 November 26",
  "scope": "Applies to multi-agent systems where a coordinator forks speculative execution branches across peer agents, commits one branch, and rolls back the others by replaying a compensating action log. Does not apply to single-agent retry loops or to systems using transactional shared memory with hardware-level serialization.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-collapse-when-reconciled-rollback-loses-causal-ordering-across-peer-agents.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-collapse-when-reconciled-rollback-loses-causal-ordering-across-peer-agents.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-collapse-when-reconciled-rollback-loses-causal-ordering-across-peer-agents.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1714,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode here is not \"rollback failed.\" Every agent in the swarm reported successful compensation. The failure is subtler: **speculative branches that were rolled back still leaked causal side effects into the committed branch's state**, because the rollback ordering was reconstructed from per-agent local logs rather than from a global happens-before...",
    "what_was_observed": "A coordinator dispatched three peer agents (A, B, C) to independently attempt a schema-migration task. Each branch held a speculative lease on a shared \"current schema\" record. Branch B, at step 4, read `schema_version=7`, computed a migration delta assuming v7, and wrote `schema_version=8` speculatively. Branch C, at step 3 (concurrent, ~40ms later), read `schema_version=8` — B's uncommitted write — and built its pl...",
    "condition_of_validity": "The guardrail is a **speculative read-set invalidation invariant**: > A branch may commit only if, for every read it performed during speculation, the value read was produced by a write that is either (a) in the branch's own write-set, or (b) in the committed write-set of a branch that was already committed *before* the read, or (c) an immutable base value. ...",
    "decision_boundary": "The coordinator faces a fork at reconciliation time: - **If the global read-write graph is complete and every read is provenance-tagged:** commit the winner, roll back losers, and *re-validate* the winner against the post-rollback state. If a re-validation read now returns a different value than during speculation, the winner is poisoned → restart it with fr...",
    "operational_effect": "The practical consequence is a shift in what \"rollback success\" means. It no longer certifies that the world is clean; it certifies only that each branch's own writes were compensated. The coordinator must additionally certify **read-set purity** of the committed branch, which is a property of the *observations* the winner made, not of the writes it performe..."
  },
  "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": "e990fee0d25038adea664979554c603adecbb178cd83d51b3be2296aa694236a",
    "verified_classes": [
      "SpeculativeCommitPoisoned",
      "WriteTag",
      "Branch"
    ],
    "verified_functions": [
      "reconcile",
      "run_reconciliation"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeCommitPoisoned"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
