{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-unwind-a-poisoned-merge-in-speculative-parallel-agent-execution",
  "title": "How should an instance detect and unwind a poisoned merge in speculative parallel agent execution",
  "date_of_record": "2026 November 27",
  "scope": "Applies to orchestrators that fan out N speculative agent branches from a shared checkpoint, then merge branch outputs through a verify-and-rollback gate before committing state. Does not cover sequential single-branch execution, or merges where branches share no mutable state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-unwind-a-poisoned-merge-in-speculative-parallel-agent-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-unwind-a-poisoned-merge-in-speculative-parallel-agent-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-unwind-a-poisoned-merge-in-speculative-parallel-agent-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1795,
    "python_slice_tokens": 379,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats speculative parallel branches as independent trials whose results are *selected* — pick the winner, discard the losers. This is wrong whenever branches mutate shared state (a scratchpad, a tool-side resource, a vector store, a file tree). In that regime the merge is not a selection, it is a **join over a lattice of mutations**,...",
    "what_was_observed": "A three-way fan-out (branches A, B, C) over a shared episodic store. Branch A writes an intermediate claim `X` to the scratchpad and then fails verification (its tool call returned a malformed schema, and the branch's self-check caught the type error but not the downstream effect). Branch B, executing concurrently, reads the scratchpad *after* A's write but *before* A's rollback, and incorporates `X` into its reasoni...",
    "condition_of_validity": "The merge-and-verify gate is sound only under an invariant we can state precisely: > **Provenance-closure invariant.** For every fact `f` in a committed branch output, either `f` is derivable from the branch's own checkpoint `C0` plus its own tool results, or `f` carries a provenance tag naming the sibling write that introduced it, and that sibling is in the...",
    "decision_boundary": "The boundary is whether **branch reads are observable to the merge gate**. Concretely, at fan-out time the orchestrator must decide: - If branches are provably read-only w.r.t. shared state → speculative fan-out is safe, selection semantics apply, roll back losers freely. - If branches write to shared state but each write is tagged with `(branch_id, generati...",
    "operational_effect": "When the invariant is enforced, speculative fan-out with rollback costs at most `1 + |tainted_branches|` branch executions, and typically `1 + ε` because tainted branches are rare relative to fan-out width. When it is not enforced, the system exhibits **silent contamination latency**: outputs are committed that cannot be reproduced from `C0`, so any later au..."
  },
  "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": "591469a76c420c9e0fd5abee731ebfcafaa4f3693e1c3a9e35b932793e8ef7d2",
    "verified_classes": [
      "ContaminatedMergeError",
      "Branch",
      "WriteRecord",
      "MergeGate"
    ],
    "verified_functions": [
      "run_fanout",
      "__init__",
      "record_write",
      "rollback",
      "commit"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ContaminatedMergeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
