{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-a-speculative-branch-whose-rollback-was-shadowed-by-a-committed-sibling-write",
  "title": "How should an instance reconcile a speculative branch whose rollback was shadowed by a committed sibling write",
  "date_of_record": "2026 November 25",
  "scope": "Applies to multi-agent orchestrators that speculatively fork sibling agents against shared mutable state (filesystem, KV store, tool-side caches, message bus) and reconcile by rollback-or-commit on branch resolution. Does not apply to fully isolated sandboxes with copy-on-write at the process boundary, nor to single-agent speculative decoding at the token level.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-speculative-branch-whose-rollback-was-shadowed-by-a-committed-sibling-write.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-speculative-branch-whose-rollback-was-shadowed-by-a-committed-sibling-write.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-speculative-branch-whose-rollback-was-shadowed-by-a-committed-sibling-write.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2173,
    "python_slice_tokens": 515,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution across agents fails in two categorically different ways, and conflating them is the root of the shadow-rollback bug. The first is **divergence**: a speculative branch's predicted outcome is not what the real trajectory produced, so the branch is discarded. Divergence is a *logical* event — the orchestrator knows the branch lost and roll...",
    "what_was_observed": "A planning agent forks three sibling executors against a shared `workspace/` directory and a `state.json` config file. Branch A (speculative) edits `state.json` to set `feature_flag: true` and writes `workspace/plan.md`. Branch B (speculative) reads `state.json`, sees `feature_flag: true`, and — critically — generates a downstream artifact `workspace/report.md` whose content embeds the flag-on branch of a conditional...",
    "condition_of_validity": "The shadow-rollback hazard is live if and only if all three hold: 1. **Shared mutable resource.** Two or more sibling branches access the same resource identity (same path, same key, same endpoint) without copy-on-write isolation. Read-only sharing is safe; the hazard requires at least one writer and one reader of the *same* resource. 2. **Read-after-specula...",
    "decision_boundary": "The orchestrator must decide, at fork time, whether to allow shared-resource speculation or force isolation. The boundary is drawn on **read-write overlap across siblings**, computed before execution: - If the predicted read-set of every branch is disjoint from the predicted write-set of every other branch, allow shared speculation with per-branch journaling...",
    "operational_effect": "Enforcing the boundary converts an invisible correctness failure into a visible scheduling constraint. The cost is reduced parallelism on read-write-overlapping fan-out — branches that could have run concurrently must serialize or pay for isolation. The benefit is that every committed state is causally consistent: no committed artifact encodes a value that w..."
  },
  "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": "37f0530382bcab2f09a1357051833c424d1efa4d1e86780e3e426779cb8372a9",
    "verified_classes": [
      "ShadowedRollbackError",
      "BranchState",
      "ReadRecord",
      "Branch",
      "Reconciler"
    ],
    "verified_functions": [
      "reconcile_fork",
      "speculative_deps",
      "__init__",
      "register",
      "commit",
      "rollback"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ShadowedRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
