{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-branch-divergence-from-surviving-rollback-in-multi-agent-pipelines",
  "title": "Which invariants prevent speculative branch divergence from surviving rollback in multi-agent pipelines",
  "date_of_record": "2026 November 26",
  "scope": "Applies to multi-agent pipelines that speculatively fork downstream agents on uncommitted upstream state and must reconcile branches after rollback. Does not apply to single-agent retry loops or to pipelines where all branches share a single serialized commit point.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-divergence-from-surviving-rollback-in-multi-agent-pipelines.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-divergence-from-surviving-rollback-in-multi-agent-pipelines.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-divergence-from-surviving-rollback-in-multi-agent-pipelines.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1566,
    "python_slice_tokens": 553,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"rollback didn't happen.\" Rollback of the *owning* agent's state is typically reliable. The failure is that **speculative branches observe and mutate a shared side-effect surface (tool outputs, external stores, sibling agent memory) that is not part of the rolled-back transaction**, so a branch that is logically abandoned leaves a durable ...",
    "what_was_observed": "A planner agent P issues a speculative commit `S0` and forks two executor branches, B1 and B2, each with its own tool-calling sub-agent. B1 and B2 run concurrently against the same retrieval index and the same scratch key-value store keyed by `task_id`. P's verification step rejects `S0` (a schema negotiation mismatch on a downstream capability), triggering rollback to `S_{-1}`. P then re-plans and forks B1' and B2' ...",
    "condition_of_validity": "Speculative rollback is only sound under the invariant that **every write a speculative branch performs is tagged with the branch's speculative epoch and is invisible to any reader whose epoch is not a descendant of the committing epoch.** Concretely: - Side-effect surface writes must carry `(epoch, branch_id)` and be filtered on read unless the reader's lin...",
    "decision_boundary": "The boundary is: **speculate only across surfaces you can epoch-tag; serialize across surfaces you cannot.** Operationally, before forking, the planner must classify each tool and store the branch will touch as `EPOCH_TAGGABLE` or `OPAQUE`. If any branch's reachable tool set includes an `OPAQUE` surface that is not read-only, the fork degrades to serial exec...",
    "operational_effect": "Enforcing the invariant converts a class of silent confidence-inflation bugs into an explicit pre-fork rejection. Pipelines that adopt epoch tagging observe rollback-then-replan producing *lower* reconciliation confidence than the original attempt (correct: the branches are genuinely independent and disagree where the rejected plan was wrong). Pipelines with..."
  },
  "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": "f85d825b15f2a0f6976a072c5ba36e264fdc690f00dfce240881e39a7988f49a",
    "verified_classes": [
      "SurfaceClass",
      "SpeculationInvariantViolation",
      "Branch",
      "SideEffectSurface",
      "ScratchStore"
    ],
    "verified_functions": [
      "authorize_fork",
      "reconcile",
      "write",
      "read"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "KeyError",
      "SpeculationInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "assert real_conf < naive_conf"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
