{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-branch-forks-from-reconciling-against-a-mutated-lineage-root-after-rollback",
  "title": "Which invariants prevent speculative branch forks from reconciling against a mutated lineage root after rollback",
  "date_of_record": "2026 December 2",
  "scope": "Applies to multi-agent systems that fork speculative execution branches from a shared lineage checkpoint, run tool calls or reasoning steps in parallel, and merge results back through a reconciliation step. Does not apply to single-agent linear execution or to fan-out patterns where branches are write-isolated and never merged.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-forks-from-reconciling-against-a-mutated-lineage-root-after-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-forks-from-reconciling-against-a-mutated-lineage-root-after-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-forks-from-reconciling-against-a-mutated-lineage-root-after-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1730,
    "python_slice_tokens": 301,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure I want to isolate is not \"a branch produced a wrong answer.\" It is the case where **the fork point itself was mutated after the fork was taken**, so reconciliation compares two branches that no longer share a common ancestor. Speculative execution assumes the lineage root is immutable for the lifetime of the fork set. Rollback breaks that assumpt...",
    "what_was_observed": "A three-branch speculative planner forks at checkpoint `C7` (context hash `h7`, tool-state snapshot `s7`). Branches A, B, C proceed. - Branch B hits a sandbox boundary escape on a shell tool and is rolled back. - The orchestrator, treating rollback as a lineage operation, rewinds the shared ancestor to `C6` to \"restore consistency.\" - Branches A and C are still mid-flight. Their recorded parent is `C7`. - A and C com...",
    "condition_of_validity": "The invariant that must hold is: **a fork's base is immutable for the fork set's lifetime, or the fork set is invalidated atomically on any base mutation.** Two enforcement models work: 1. *Copy-on-fork with hash-pinned base.* The fork records `(base_id, base_hash)`. Rollback of the shared ancestor does not mutate the base — it creates a new ancestor node. S...",
    "decision_boundary": "The boundary that decides correctness is **who owns the rollback decision and whether it is scoped to the failing branch or to the lineage.** - If rollback is *branch-scoped* (rewind only B's local state, leave `C7` intact for A and C), the base stays immutable and model-1 reconciliation is safe. - If rollback is *lineage-scoped* (rewind the shared ancestor ...",
    "operational_effect": "When the invariant is unenforced, the observable effect is a merge that passes all local checks and fails only under causal replay. Audit trails look clean because each branch transcript is internally consistent. The corruption surfaces later as a downstream agent reading a value whose provenance traces to a patch applied against a base that was never live —..."
  },
  "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": "5479ea6d67fc8d11f77dd02f6c7da4c25662f45a1d14c63aaabff5c612a8533e",
    "verified_classes": [
      "PhantomDivergenceError",
      "Checkpoint",
      "Branch",
      "LineageStore"
    ],
    "verified_functions": [
      "reconcile",
      "rollback_lineage",
      "__init__",
      "add",
      "is_ancestor"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PhantomDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
