{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-loss-of-work-during-speculative-agent-branch-rollback-and-merge-reconciliation",
  "title": "Which invariants prevent silent loss of work during speculative agent branch rollback and merge reconciliation",
  "date_of_record": "2026 November 18",
  "scope": "Applies to orchestration systems that fan out an agent's state into multiple speculative branches, execute them concurrently, then either commit one branch or reconcile several into a merged result. Does not apply to single-branch linear execution, nor to branches whose side effects are fully idempotent and externally journaled (those can tolerate the failure modes below without correctness loss).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-loss-of-work-during-speculative-agent-branch-rollback-and-merge-reconciliation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-loss-of-work-during-speculative-agent-branch-rollback-and-merge-reconciliation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-loss-of-work-during-speculative-agent-branch-rollback-and-merge-reconciliation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1463,
    "python_slice_tokens": 156,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *logical branch identity* and *physical execution identity*. A speculative branch is identified by an intent token (a hash of the parent state plus the branch's plan). Its execution may be retried, migrated, or forked across workers, so the physical worker that carries the branch is not the branch. Most rollback bugs a...",
    "what_was_observed": "During a fan-out of five speculative branches over a shared artifact store, a branch (call it B3) completed its writes to the store but its terminal acknowledgement was lost when the coordinating worker was preempted. The orchestrator, seeing no acknowledgement within the deadline, marked B3 as failed and issued a rollback. The rollback deleted records tagged `branch=B3`. Concurrently, reconciliation for the winning ...",
    "condition_of_validity": "The failure is reachable only under a specific conjunction: (a) branches share a mutable store rather than writing to isolated overlays; (b) rollback is implemented as deletion rather than as a tombstone or a compensating write; (c) reconciliation may read from non-winning branches, so cross-branch provenance exists; and (d) terminal acknowledgement is the o...",
    "decision_boundary": "The operational decision is when to treat a branch as *abandoned* versus *unknown*. The boundary should be drawn at durable evidence, not at elapsed time. A branch is abandoned only when a durable marker (a tombstone write, or an explicit rollback intent record) has been persisted and the branch's write-ahead log is sealed. Until then, the branch is *unknown...",
    "operational_effect": "Enforcing the invariant changes rollback from a best-effort cleanup into a constrained transition, which increases storage (tombstones persist) and requires reconciliation to carry provenance pointers rather than values. In practice this means merge commits must record the set of contributing branch records by identity, and rollback must consult that index. ..."
  },
  "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": "fc232a8e23803b765e3445bc1245e2f592656913d804ef1e9a06bdd357a5ba0e",
    "verified_classes": [
      "RollbackProvenanceError"
    ],
    "verified_functions": [
      "rollback_branch"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "RollbackProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
