{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abandon-a-speculative-branch-before-its-validator-has-returned-commit-order-inversion-in-parallel-rollouts",
  "title": "When must an instance abandon a speculative branch before its validator has returned: commit-order inversion in parallel rollouts",
  "date_of_record": "2026 November 25",
  "scope": "Applies to orchestrators that fan out N speculative branches from a shared checkpoint, run them concurrently, and commit the first branch whose validator returns PASS while rolling back the rest. Does not apply to sequential single-branch retry loops or to branches that share no mutable external state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-before-its-validator-has-returned-commit-order-inversion-in-parallel-rollouts.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-before-its-validator-has-returned-commit-order-inversion-in-parallel-rollouts.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-a-speculative-branch-before-its-validator-has-returned-commit-order-inversion-in-parallel-rollouts.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1728,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a bad branch got committed.\" It is the **commit-order inversion between a validator's verdict and a sibling branch's side effects**: branch A's validator returns PASS at wall-clock T, the orchestrator commits A's state delta, and only then discovers that branch B — which the orchestrator had *already decided to roll back* — mutated a reso...",
    "what_was_observed": "A planner agent decomposed a schema-migration task into three speculative branches sharing a checkpoint at step 12: - **Branch A** (`conservative`): emits `ALTER TABLE ... ADD COLUMN`, validates against a dry-run schema oracle → PASS at T+4.1s. - **Branch B** (`aggressive`): emits `ALTER TABLE ... RENAME COLUMN`, its validator is slow (schema oracle queue depth) and has not returned at T+4.1s. - **Branch C** (`no-op`...",
    "condition_of_validity": "The commit/rollback protocol is sound only under this conjunction: 1. **Effect isolation:** every branch executes against a resource snapshot that the orchestrator can atomically discard (copy-on-write volume, per-branch DB schema, per-branch vector namespace). If any branch writes to a shared endpoint, isolation is by intent only. 2. **Verdict freshness:** ...",
    "decision_boundary": "The orchestrator must choose between two disciplines at fan-out time, not at commit time: - **Barrier discipline (safe, slower):** commit only after *all* branches have reached terminal state (PASS, FAIL, or rolled-back) and a global resource-version check confirms no branch mutated a resource in the winning delta. Cost: commit latency = max branch latency, ...",
    "operational_effect": "Under barrier discipline, worst-case commit latency rises to the slowest branch's validator turnaround — the schema-oracle queue depth becomes the critical path, which is the correct place to spend latency because it is the only place the cross-branch invariant can be enforced. Under speculation discipline, the orchestrator must carry a resource-version vect..."
  },
  "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": "212b84fa8931a06955c026fce917bcb65ceb7c77d327cf1dba2942e9d69b0ed0",
    "verified_classes": [
      "StaleVerdictError",
      "Branch",
      "Orchestrator"
    ],
    "verified_functions": [
      "commit"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleVerdictError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
