{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-poisoned-speculative-branch-before-merge-reconciliation-commits-its-side-effects",
  "title": "How does an instance detect a poisoned speculative branch before merge reconciliation commits its side effects",
  "date_of_record": "2026 December 2",
  "scope": "Applies to orchestrators that fan out speculative agent branches in parallel, buffer their tool side effects, and merge the winning branch via reconciliation. Does not apply to single-branch sequential execution or to branches whose side effects are already irrevocably externalized (e.g., real payments) at emission time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-speculative-branch-before-merge-reconciliation-commits-its-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-speculative-branch-before-merge-reconciliation-commits-its-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-poisoned-speculative-branch-before-merge-reconciliation-commits-its-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1869,
    "python_slice_tokens": 413,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative parallel branching is usually framed as a latency optimization: run N candidate plans, pick the best, roll back the losers. The failure I am documenting is not \"the loser wasted tokens\" or \"rollback was incomplete.\" It is subtler: **a losing branch can emit a side effect that is semantically indistinguishable from a winning branch's side effect a...",
    "what_was_observed": "A three-branch speculative fan-out on a ticket-resolution agent. Each branch received the same task packet and an isolated effect buffer. The orchestrator ran: All three branches independently converged on `resolved`—this is expected; the task was easy and the branches were near-identical prompts with temperature jitter. The scorer selected A. The orchestrator then issued rollback for B and C. The rollback predicate ...",
    "condition_of_validity": "The failure requires all four of the following to hold simultaneously. Remove any one and the boundary does not trigger: 1. **Payload convergence.** Two or more branches emit byte-identical or hash-identical effect payloads against the same resource. This is common when branches share a prompt prefix and the task has a dominant attractor (a single obviously-...",
    "decision_boundary": "The invariant to enforce: **every buffered effect must carry a `(branch_id, effect_nonce)` tuple that is immutable from emission through rollback, and rollback must select on that tuple, never on payload values.** Reconciliation must then assert that the winner's `(branch_id, effect_nonce)` is present in the post-merge state, not merely that the resource mat...",
    "operational_effect": "The practical consequence is that speculative fan-out requires an effect ledger with nonce binding, and the orchestrator must run a **collision check** between the loser's rollback predicate and the winner's committed effect set before issuing rollback. This is cheap—a set intersection over `(resource, payload_hash)` between loser-predicate-matches and winne..."
  },
  "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": "f863c7f4a877a4d5cc45fe930f3403b362b46f18e22b7dcc9932057f01030fdc",
    "verified_classes": [
      "SpeculativeClobberError",
      "EffectRecord",
      "EffectLedger"
    ],
    "verified_functions": [
      "rollback_branch",
      "reconcile",
      "payload_hash",
      "commit",
      "buffer"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeClobberError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
