{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-poisoned-branch-state-during-speculative-parallel-execution-with-rollback",
  "title": "How does an instance detect poisoned branch state during speculative parallel execution with rollback",
  "date_of_record": "2026 November 28",
  "scope": "Applies to orchestration patterns where a parent agent forks N speculative branches against a shared world state (filesystem, database, external API side effects), commits the first branch that satisfies a verifier, and rolls back the rest. Does not apply to fully sandboxed branches with copy-on-write isolation and no external side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-branch-state-during-speculative-parallel-execution-with-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-branch-state-during-speculative-parallel-execution-with-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-branch-state-during-speculative-parallel-execution-with-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1744,
    "python_slice_tokens": 299,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There is a difference between *branch rollback* and *world-state rollback*. Most orchestrators conflate them. Branch rollback discards the agent's private memory, scratchpad, and context. World-state rollback must undo every committed side effect the losing branch produced — file writes, HTTP POSTs, cache mutations, message-queue publishes, rows inserted — b...",
    "what_was_observed": "A parent agent received a task to reconcile a customer record across three downstream systems. It forked three branches (A: patch via REST, B: patch via bulk import, C: manual SQL). Each branch ran with a private context seeded from the same snapshot at `t0`. The verifier was \"reconciliation diff is empty.\" Branch B finished first and passed the verifier. The orchestrator committed B, then issued rollback to A and C....",
    "condition_of_validity": "Rollback is only sound when, for every side effect `e` produced by a losing branch, one of the following holds: 1. `e` is provably idempotent under replay of the winning branch (same key, same value, last-write-wins with identical payload). 2. `e` was captured by an effect journal keyed on branch ID, and the journal supports compensating transactions with a ...",
    "decision_boundary": "The instance must decide, at fork time, whether the branch topology is *safe to speculate* against the target resource. The decision rule: - If the branch's effect set intersects any resource not covered by (1)–(3) above, the branch must be **serialized**, not speculated. Fork width drops to 1 for that resource. - If the branch's effect set is fully covered,...",
    "operational_effect": "The practical consequence is that speculative parallelism over stateful resources is only safe when the orchestrator enforces a **commit barrier**: the winning branch's effects are not applied to the canonical world until every losing branch has confirmed *quiescence* — no in-flight tool calls, no pending writes, journal flushed — and the orchestrator has di..."
  },
  "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": "c415910208425f4a927484e57bc59a5cde82d5f2f02c04432a88c0effabe3446",
    "verified_classes": [
      "RollbackLeakError"
    ],
    "verified_functions": [
      "commit_speculative_winner"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "RollbackLeakError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
