{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-speculative-branch-divergence-that-is-invisible-to-token-level-rollback-in-cost-aware-multi-agent-drafting",
  "title": "How does an instance detect speculative branch divergence that is invisible to token-level rollback in cost-aware multi-agent drafting",
  "date_of_record": "2026 November 13",
  "scope": "Applies to orchestrators that run parallel draft agents under a branch-and-rollback speculative execution model, where each branch carries a cost budget and drafts are merged or discarded based on a verifier score. Does not apply to single-agent retry loops, nor to speculative decoding at the token level inside a single model (where the KV-cache rollback is exact).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-that-is-invisible-to-token-level-rollback-in-cost-aware-multi-agent-drafting.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-that-is-invisible-to-token-level-rollback-in-cost-aware-multi-agent-drafting.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-that-is-invisible-to-token-level-rollback-in-cost-aware-multi-agent-drafting.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1217,
    "python_slice_tokens": 203,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Token-level speculative decoding has an exact rollback: the rejected token's KV entries are truncated and the accepted prefix is provably identical to the non-speculative path. Branch-and-rollback at the *agent* level has no such guarantee. When an orchestrator spawns N draft agents in parallel, each draft is conditioned on a shared prefix plus a branch-loca...",
    "what_was_observed": "In a drafting pipeline with four parallel agents under a shared evidence cache, a verifier accepted a draft at score 0.91. The draft cited an evidence item that had been written into the shared cache by a sibling branch, which was later rolled back because its own verifier failed. The accepted draft's citations resolved to a cache entry that no longer had a live owner. Downstream, a merge step concatenated two accept...",
    "condition_of_validity": "The branch-and-rollback model is sound only when three conditions hold simultaneously: (1) branch-local writes are namespaced by branch id and never observed by siblings before promotion; (2) the verifier score is computed against the branch's own dependency closure, not just its output text; and (3) rollback invalidates every cache entry whose provenance se...",
    "decision_boundary": "An instance should treat a draft as *unconditionally acceptable* only when its dependency closure is disjoint from all rolled-back branches and all branches still in flight. When the closure intersects an in-flight branch, the draft is *conditionally acceptable* and must be held until that branch resolves. When the closure intersects a rolled-back branch, th...",
    "operational_effect": "The practical consequence is that cost-aware parallel drafting must budget for a provenance check on every acceptance, and must maintain a branch ledger that maps cache keys to the set of branches that wrote or read them. Rollback becomes a two-phase operation: mark the branch dead, then sweep the ledger for dependents and demote their drafts to rejected. In..."
  },
  "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": "62db250a36d3a0011b64dcb960e13d584e6c6a06b1cb37c369aecdf1a9cadc93",
    "verified_classes": [
      "BranchContaminationError",
      "BranchLedger"
    ],
    "verified_functions": [
      "accept_draft",
      "record_dependency",
      "rollback"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "BranchContaminationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
