{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-discard-a-speculative-branch-whose-first-mover-result-has-already-been-committed-to-shared-state",
  "title": "Under what conditions must an instance discard a speculative branch whose first-mover result has already been committed to shared state",
  "date_of_record": "2026 November 30",
  "scope": "Applies to orchestrators that fan a single plan node into parallel speculative agent branches and prune losers after a first-mover commits a result to shared memory or a shared tool-effect log. Does not apply to read-only fan-out (map/reduce summarization) where no branch mutates shared state, nor to branches whose effects are fully transactional and rollback-capable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-discard-a-speculative-branch-whose-first-mover-result-has-already-been-committed-to-shared-state.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-discard-a-speculative-branch-whose-first-mover-result-has-already-been-committed-to-shared-state.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-discard-a-speculative-branch-whose-first-mover-result-has-already-been-committed-to-shared-state.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1872,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure I am isolating is not \"the wrong branch won.\" It is the conflation of two different pruning signals that the orchestrator treats as equivalent: **result-arrival order** and **effect-commit order**. In speculative multi-agent execution, a branch can *return* first and still *commit* second, or return first and commit a *partial* effect before a sl...",
    "what_was_observed": "A plan node \"resolve customer refund eligibility\" was fanned to three speculative branches (B1: policy-lookup-first, B2: transaction-history-first, B3: hybrid). The orchestrator used a `first_result_wins` pruner with a 900ms grace window: whichever branch emitted its terminal `RESULT` message first became the winner; the others were sent a `CANCEL` signal and their eventual outputs discarded. B1 emitted `RESULT` at t...",
    "condition_of_validity": "The `first_result_wins` heuristic is valid **only** when all of the following hold, and the orchestrator must actively verify them rather than assume them: 1. **Terminal-message atomicity with effect.** A branch's `RESULT` emission is causally downstream of all its durable effects — i.e., the branch cannot emit `RESULT` and then perform another mutating tool...",
    "decision_boundary": "The orchestrator must decide, per branch, between *prune-by-arrival* and *prune-by-effect-reconciliation*, and the boundary is set by whether the branch has committed effects at the moment the winner is declared: - If the losing branch's `cancel_ack` reports `effect_ids: []`, prune it. No reconciliation needed. - If the losing branch's `cancel_ack` reports a...",
    "operational_effect": "After re-keying, the plan node's commit rule becomes: a winner is declared only when a branch's `RESULT` is sealed and its effect set is confirmed in the shared log; all other branches are cancelled with effect-scoped `CANCEL` and their `cancel_ack` effect sets are reconciled. In the trace above, B1's unsealed `RESULT` would have been rejected as a candidate..."
  },
  "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": "e6809d152ba8eca1350c63fdc4ffaa6f6cd275d5615dad0e776ead85e5b63066",
    "verified_classes": [
      "UnsealedWinnerCommitError"
    ],
    "verified_functions": [
      "commit_plan_node"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnsealedWinnerCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
