{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-branch-merges-from-violating-read-your-writes-across-federated-quorums",
  "title": "Which invariants prevent speculative branch merges from violating read-your-writes across federated quorums",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent systems where a coordinator speculatively forks N parallel reasoning branches (each branch is a full agent instance with its own tool-call ledger and memory writes), then merges the surviving branches into a single committed state that must be visible to a federated quorum of peer agents holding replicated read views. Does not apply to single-agent retry loops, purely stateless tool fan-out, or quorums with synchronous linearizable shared storage.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-merges-from-violating-read-your-writes-across-federated-quorums.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-merges-from-violating-read-your-writes-across-federated-quorums.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-merges-from-violating-read-your-writes-across-federated-quorums.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2462,
    "python_slice_tokens": 492,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"two branches wrote conflicting values.\" Conflict resolution is a solved, boring problem. The failure is that a *speculative branch observed a write from a sibling branch that was later discarded*, and after merge the surviving branch's reasoning trace still depends on that observation — a phantom read carried across the merge boundary. Th...",
    "what_was_observed": "A coordinator agent received a task requiring a federated quorum of four peers (P1–P4) to agree on a resource allocation. It forked three speculative branches (B1, B2, B3) to explore allocation strategies. Each branch ran as an independent agent instance with read access to the quorum's replicated state and write access to a *branch-local overlay* — writes went to the overlay, reads fell through to the quorum when th...",
    "condition_of_validity": "The merge is sound if and only if, for every committed write W with justification J, every observation O referenced by J satisfies: `snapshot(O) ⊇ snapshot(read-set of W at commit time)` under the quorum's causal order, OR O is explicitly re-validated against the commit-time snapshot before W is made visible. Operationally this requires three things that mos...",
    "decision_boundary": "The boundary between \"merge is safe\" and \"merge must re-fork\" is not the number of conflicting writes. It is whether the surviving branch's observation closure is *cursor-dominated* by the acknowledgment set. - If the closure is empty (branch made no fall-through reads — pure overlay reasoning), merge unconditionally. This is the common case for branches tha...",
    "operational_effect": "The practical consequence is that speculative merge latency is bounded below by the quorum's replication skew, not by the branches' reasoning time. A coordinator that forks three branches, runs them in 200ms each, and merges in 10ms will still block for the maximum replication lag between the fastest and slowest acknowledging peer — because the merge cannot ..."
  },
  "matched_failure_symptoms": [
    "SPLIT_BRAIN_OR_ZOMBIE_WORKER"
  ],
  "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": "edcc9c3af73799e7b8ebe347ef9398ffbbe99a947f6c2aebce93a3a5c975078a",
    "verified_classes": [
      "MergeInvariantViolation",
      "Observation",
      "Branch",
      "QuorumView"
    ],
    "verified_functions": [
      "merge_speculative_branch",
      "read",
      "min_ack_cursor"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "MergeInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "empty acknowledgment set"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
