{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-invalidate-a-speculative-branch-before-its-rollback-journal-is-sealed-the-unsealed-commit-hazard-in-speculative",
  "title": "Under what conditions must an instance invalidate a speculative branch before its rollback journal is sealed: the unsealed-commit hazard in speculative multi-agent rollback",
  "date_of_record": "2026 November 29",
  "scope": "Applies to multi-agent systems where a *speculator* agent forks a speculative execution branch (one or more worker agents plus their tool calls) and must roll it back when a *verifier* or auditor agent reports divergence, and where the rollback is mediated by a journal of side-effecting operations. Does not apply to purely read-only speculative branches, nor to single-agent retry loops without a journal.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-invalidate-a-speculative-branch-before-its-rollback-journal-is-sealed-the-unsealed-commit-hazard-in-speculative.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-invalidate-a-speculative-branch-before-its-rollback-journal-is-sealed-the-unsealed-commit-hazard-in-speculative.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-invalidate-a-speculative-branch-before-its-rollback-journal-is-sealed-the-unsealed-commit-hazard-in-speculative.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2511,
    "python_slice_tokens": 508,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"rollback failed.\" It is **rollback executed against a journal that was still being appended to.** A speculative branch is only safely reversible if its effect journal is *sealed* — no further side-effecting operation can be committed under that branch's idempotency lineage — *before* the divergence verdict is acted upon. The non-obvious b...",
    "what_was_observed": "A planner agent decomposed a migration task and dispatched three worker agents (schema-mutator, data-backfiller, index-builder) under a speculative branch `spec-7`. A verifier agent independently re-derived the target schema and flagged divergence at step 4: the schema-mutator had inferred a `NOT NULL` constraint from a nullable source column, an inference the verifier judged unsound. The speculator issued `rollback(...",
    "condition_of_validity": "The rollback sweep is *sound* — meaning the post-sweep state equals the pre-speculation state restricted to the branch's effect set — only when all of the following hold at the instant the sweep begins: - **Journal closure:** no operation under the branch id is in `PENDING` state; every submitted operation has either a terminal completion record or a confirm...",
    "decision_boundary": "The speculator must choose between **drain** and **abandon** at verdict time, and the choice is forced by whether the in-flight set can be drained within the rollback deadline: - **Drain** when every `PENDING` operation has a bounded completion time and a known inverse, and `max(remaining_completion) + sweep_cost < rollback_deadline`. Block the sweep until j...",
    "operational_effect": "Systems that seal-before-sweep and enforce closure observe: rollback latency becomes bounded by the slowest in-flight operation rather than by verdict latency (a real cost — rollback is no longer instant); orphaned effects become impossible rather than rare; and the reconciler's queue becomes the only path by which a late effect can be inverted, which makes ..."
  },
  "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": "7e315c9f7ba90ce25ec1c5c65852dbc4d33956f1955f4a9845faf36701f270b3",
    "verified_classes": [
      "RollbackInvariantError",
      "OpState",
      "JournalEntry",
      "BranchJournal"
    ],
    "verified_functions": [
      "rollback_sweep",
      "speculative_rollback",
      "submit",
      "complete",
      "is_closed",
      "seal_and_revoke"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "RollbackInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
