{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-fence-speculative-branches-before-committing-a-merged-plan-write-skew-across-parallel-rollback-reconciliation",
  "title": "Where must an instance fence speculative branches before committing a merged plan: write-skew across parallel rollback reconciliation",
  "date_of_record": "2026 November 22",
  "scope": "Applies to orchestrators that fan a single agent plan into parallel speculative branches (each branch holds its own scratch context and tool side-effects) and later reconciles them into one committed plan. Does not apply to single-threaded ReAct loops, or to branches that share a single mutable context object with no isolation boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-fence-speculative-branches-before-committing-a-merged-plan-write-skew-across-parallel-rollback-reconciliation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-fence-speculative-branches-before-committing-a-merged-plan-write-skew-across-parallel-rollback-reconciliation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-fence-speculative-branches-before-committing-a-merged-plan-write-skew-across-parallel-rollback-reconciliation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1431,
    "python_slice_tokens": 303,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"two branches disagree.\" Consensus and arbitration handle disagreement. The failure is **write-skew at commit time**: two speculative branches each read the same pre-state, each independently verified as correct against that pre-state, and each produce a write that is individually valid but jointly inconsistent. Because each branch's local...",
    "what_was_observed": "A planning agent decomposed a task (\"provision 3 workers, reserve capacity for them\") into two speculative branches executed concurrently: - Branch P (provision): read `capacity=10, workers=7`, verified `7+3 <= 10`, emitted `workers := 10`. - Branch Q (reserve): read `capacity=10, workers=7`, verified `7 <= 10`, emitted `reserved := 3` against a *separate* accounting key, and additionally emitted a compensating `capa...",
    "condition_of_validity": "The per-branch verification guardrail is sound **only if** the plan's write-set is *disjoint across branches* or the invariant is *single-key*. Formally: branch-local verification of invariant `I` against pre-state `S₀` implies `I(S₀ ⊕ w_A)` and `I(S₀ ⊕ w_B)`, but does **not** imply `I(S₀ ⊕ w_A ⊕ w_B)`. The implication holds iff `I` is preserved under union ...",
    "decision_boundary": "The boundary is the **fence point**: the moment the reconciler stops treating branches as independent and starts treating their union as a candidate committed state. Before the fence, branch-local verification is a valid guardrail. After the fence, only a **union-state invariant check** is valid, and it must run against the merged write-set, not against each...",
    "operational_effect": "Without the union fence, speculative execution produces **intermittent, order-dependent invariant violations** that are invisible to per-branch telemetry and only surface downstream when the committed plan is executed against real state. The blast radius scales with branch count: with `n` branches and `k` interacting invariants, the probability that at least..."
  },
  "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": "6b1974b7c1e92c402eba063565f66973c807802c951ad4293dc799b99a8ca588",
    "verified_classes": [
      "SpeculativeCommitError",
      "Branch",
      "PlanInvariant"
    ],
    "verified_functions": [
      "merge_last_writer_wins",
      "commit_speculative_plan"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
