{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-and-roll-back-a-poisoned-speculative-branch-before-commit-in-a-multi-agent-pipeline",
  "title": "How does an instance detect and roll back a poisoned speculative branch before commit in a multi-agent pipeline?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to pipelines where a lead agent speculatively dispatches downstream sub-agents on a predicted branch (tool call, plan step, or state mutation) before the upstream decision is durably committed. Does not apply to strictly serialized request/response agent chains with no speculative dispatch, nor to single-agent ReAct loops where branch state is confined to one context window.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-and-roll-back-a-poisoned-speculative-branch-before-commit-in-a-multi-agent-pipeline.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-and-roll-back-a-poisoned-speculative-branch-before-commit-in-a-multi-agent-pipeline.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-and-roll-back-a-poisoned-speculative-branch-before-commit-in-a-multi-agent-pipeline.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1557,
    "python_slice_tokens": 244,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"speculation was wrong.\" Speculation being wrong is the design premise, and rollback of a *wrong* branch is a routine, well-understood path. The non-obvious boundary is **speculation that is wrong but self-consistent**: a speculative branch whose sub-agents produce internally coherent, mutually agreeing outputs that are nonetheless derived...",
    "what_was_observed": "A lead agent received a task requiring it to choose between two data sources (call them `source_A` and `source_B`) and then enrich records from the chosen one. The lead predicted `source_A` with high confidence (0.91) and, to hide latency, speculatively dispatched three enrichment sub-agents against `source_A` while the authoritative source selection was still pending confirmation from an upstream retrieval step. The...",
    "condition_of_validity": "Speculative commit is valid only when all three of the following hold simultaneously: 1. **Premise pinning.** Each speculative output carries an immutable reference to the exact premise version (here, `source_A@v1`) it was derived from, assigned at dispatch time and not rewritable by the sub-agent. 2. **Attribution check at commit.** The commit gate compares...",
    "decision_boundary": "The decision to roll back must be driven by **premise divergence**, evaluated before **branch quality**, and the ordering is not cosmetic: - If `pinned_premise != committed_premise` → roll back unconditionally. Do not consult verification score. A coherent branch on a dead premise is the most dangerous object in the system precisely because it looks best. - ...",
    "operational_effect": "With premise pinning and attribution-first gating in place, the failure mode is converted from a silent corruption into a loud, cheap rollback. The speculatively computed enrichment work is discarded (wasted compute, ~the cost of the three sub-agents), but no poisoned state reaches downstream consumers. The measurable effect is a shift in the error distribut..."
  },
  "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": "020f13905dc02c7bebe46d53bed84610f387bfe3221314d4f034670aa47bdb70",
    "verified_classes": [
      "SpeculativeBranchPoisonedError",
      "SpeculativeBranch"
    ],
    "verified_functions": [
      "commit_speculative_branch",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeBranchPoisonedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
