{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-loss-of-speculative-side-effects-during-branch-reconciliation",
  "title": "Which invariants prevent silent loss of speculative side effects during branch reconciliation",
  "date_of_record": "2026 November 13",
  "scope": "Applies to multi-agent systems that execute speculative branches (parallel or forked plan exploration) and reconcile them by committing one branch while rolling back others, where side effects are externalized (writes, messages, tool calls, resource reservations). Does not apply to pure-functional branch exploration with no externalized effects, nor to systems where all branches share a single serialized effect log.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-loss-of-speculative-side-effects-during-branch-reconciliation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-loss-of-speculative-side-effects-during-branch-reconciliation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-loss-of-speculative-side-effects-during-branch-reconciliation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1761,
    "python_slice_tokens": 548,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common framing of speculative execution treats rollback as the inverse of execution: if a branch is discarded, its effects are undone. This is false whenever a branch's effects are *idempotent-by-compensation* rather than *transactional*. The non-obvious boundary is between **effects that were logged before emission** (recoverable, compensable) and **eff...",
    "what_was_observed": "In a three-way speculative fan-out (planner forks branches A, B, C to satisfy a provisioning request), branch B emitted a `reserve_slot` tool call to an external scheduler, then crashed before its own journal write completed. Branch A was committed. Reconciliation examined A's journal, computed the compensating set for B and C from *their* journals, and rolled back. B's journal contained no record of the reservation,...",
    "condition_of_validity": "The commit-one-rollback-rest model is only sound under the conjunction of: 1. **Write-ahead effect logging (WAEL):** every externalized effect is appended to a durable, branch-tagged journal *before* the effect is emitted, with a two-phase marker (`intent` then `ack`). An `intent` without `ack` means \"may or may not have happened\" and must be compensated def...",
    "decision_boundary": "When a branch is rolled back and its journal contains an `intent` with no `ack`, the reconciler must choose between: - **Compensate defensively** (emit the idempotent inverse, accept possible over-compensation), or - **Reconcile by query** (ask the external system whether the effect landed, then compensate only if it did). The boundary is set by whether the ...",
    "operational_effect": "Systems that adopt WAEL plus union-based compensation convert silent leaks into either clean no-ops or explicit, auditable over-compensations. The cost is journal write latency on the critical path of every effect and the requirement that every external tool expose an idempotent inverse (or a readable state). Systems that skip WAEL retain a failure mode whos..."
  },
  "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": "c689c0f36cd542cabf9d4e00f68a238862c347ba6b9654cb949c6d6eb310cac9",
    "verified_classes": [
      "UnresolvedSpeculativeEffect",
      "BranchJournal",
      "UnresolvedSpeculativeEffect",
      "BranchJournal"
    ],
    "verified_functions": [
      "reconcile",
      "commit_and_rollback",
      "__init__",
      "write_intent",
      "write_ack",
      "unresolved_intents",
      "reconcile",
      "commit_and_rollback",
      "__init__",
      "write_intent",
      "write_ack",
      "unresolved_intents"
    ],
    "verified_functions_count": 12,
    "defensive_guards_count": 8,
    "raised_exceptions": [
      "UnresolvedSpeculativeEffect"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
