{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-of-a-speculative-branch-be-treated-as-poisoned-rather-than-rewound-when-rollback-is-interleaved-with-optimistic-task-parallelis",
  "title": "Where must an instance of a speculative branch be treated as poisoned rather than rewound when rollback is interleaved with optimistic task parallelism",
  "date_of_record": "2026 November 14",
  "scope": "Applies to multi-agent executors that fork speculative branches, run them concurrently under optimistic scheduling, and roll back losing branches by restoring a prior checkpoint. Does not apply to single-branch retry loops, to rollback of branches that never shared mutable state with sibling branches, or to systems that serialize all branch execution behind a global barrier.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-of-a-speculative-branch-be-treated-as-poisoned-rather-than-rewound-when-rollback-is-interleaved-with-optimistic-task-parallelis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-a-speculative-branch-be-treated-as-poisoned-rather-than-rewound-when-rollback-is-interleaved-with-optimistic-task-parallelis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-a-speculative-branch-be-treated-as-poisoned-rather-than-rewound-when-rollback-is-interleaved-with-optimistic-task-parallelis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1479,
    "python_slice_tokens": 145,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **rewindable state** and **contaminated state**. A speculative branch is rewindable when its writes are confined to its own copy-on-write overlay and its external effects are buffered or idempotent. A branch is *poisoned* when, during its speculative lifetime, it performed an effect that (a) escaped the overlay into sh...",
    "what_was_observed": "A planner forked three speculative branches (A, B, C) over a shared task graph with optimistic parallelism: all three ran concurrently, each with a private overlay, sharing a leased resource pool and a shared vector index. Branch A acquired a lease on the index writer, appended 1,400 embedding records, and incremented a global sequence counter used downstream for dedup keys. Branch B, running concurrently, read the i...",
    "condition_of_validity": "Rewind is valid if and only if, for every effect E emitted by a speculative branch before rollback, either (1) E never left the branch overlay, or (2) every sibling that could observe E is itself rolled back or re-executed from a checkpoint preceding its observation of E, or (3) E is provably invertible and the inversion is applied atomically with the rollba...",
    "decision_boundary": "The boundary is crossed the moment a speculative branch performs an **irreversible external effect that a concurrent sibling can read**. Concretely, treat a branch as *poisoned* (not rewound) when any of the following hold before rollback completes: - It wrote to a shared substrate outside its overlay (index, bus, KV store, counter, lease ledger). - It consu...",
    "operational_effect": "The operational consequence is that rollback cost is no longer proportional to the losing branch's work; it is proportional to the *fan-out of observers* of the losing branch's escaped effects. Under optimistic parallelism this fan-out is unbounded in the worst case, which is why the executor must either (a) fence speculative branches from shared irreversibl..."
  },
  "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": "9e42346ac8458a3e5f244ba4852980044496fb3ae7e62e41e9e6b089995fef55",
    "verified_classes": [
      "PoisonedBranchError"
    ],
    "verified_functions": [
      "rollback_branch"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "PoisonedBranchError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
