{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-speculative-side-effects-before-branch-commit-and-why-the-compensate-on-rollback-invariant-fails-under-concurrent-sib",
  "title": "Where must an instance reconcile speculative side effects before branch commit, and why the \"compensate-on-rollback\" invariant fails under concurrent sibling branches",
  "date_of_record": "2026 November 28",
  "scope": "Applies to multi-agent orchestration patterns where a planner agent forks N speculative branches (each a sub-agent with its own tool-calling loop) that execute in parallel against shared external effectors (file writes, API mutations, message sends, DB inserts), and where exactly one branch is committed while the rest are rolled back. Does not apply to read-only speculative fan-out, nor to branch isolation enforced by full transactional sandboxing where effectors natively support two-phase commit.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-side-effects-before-branch-commit-and-why-the-compensate-on-rollback-invariant-fails-under-concurrent-sib.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-side-effects-before-branch-commit-and-why-the-compensate-on-rollback-invariant-fails-under-concurrent-sib.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-side-effects-before-branch-commit-and-why-the-compensate-on-rollback-invariant-fails-under-concurrent-sib.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2501,
    "python_slice_tokens": 580,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive mental model treats speculative branch rollback as *compensation*: branch B fails or loses the commit race, so the orchestrator invokes B's inverse operations (delete the file, refund the call, retract the message) and the world returns to its pre-fork state. This model is wrong for a specific and non-obvious reason: **compensation is not idempoten...",
    "what_was_observed": "A planner agent received the task \"provision a staging environment and register it in the service catalog.\" It forked three speculative branches with different provisioning strategies: - **Branch 1 (terraform):** called `catalog.reserve_slot(name=\"staging-7\")` → returned slot id `7`, then began `terraform apply`. - **Branch 2 (manual API):** also called `catalog.reserve_slot(name=\"staging-7\")` — the catalog's reserva...",
    "condition_of_validity": "The \"compensate-on-rollback\" protocol is valid **only** when all four of the following hold simultaneously: 1. **Effect identity is branch-unique.** Every effector mutation carries a token minted by the branch (e.g., `Idempotency-Key: branch-{id}-{seq}`), so compensation can target exactly the mutation that branch caused and no other. Name-keyed or content-k...",
    "decision_boundary": "The operational decision is **when to compensate versus when to quarantine**, and it hinges on a single test performed at compensation-scheduling time: > *Can the compensation prove, against current effector state, that it is retracting exactly the mutation this branch caused and nothing the committed branch depends on?* - If **yes** → compensate inline, und...",
    "operational_effect": "After adopting fork-global reconciliation with branch-unique lease tokens, the observable regime changes in three ways: - **Fork latency increases by one effector round-trip per distinct key**, because reconciliation must read current state before scheduling any compensation. Forks touching many keys pay this per key; forks touching one key pay it once. This..."
  },
  "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": "94bc2d4e3154c3d35d5276344815bd29623bbc0a211ca7ba899f69880ea7f47f",
    "verified_classes": [
      "SpeculativeCommitError",
      "EffectDisposition",
      "EffectRecord",
      "Fork",
      "ForkReconciler"
    ],
    "verified_functions": [
      "commit_fork",
      "__init__",
      "_live_state",
      "schedule_compensation",
      "_quarantine"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculativeCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
