{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-abandon-speculative-sub-plan-execution-and-roll-back-a-committed-side-effect-ledger",
  "title": "Under what conditions must an instance abandon speculative sub-plan execution and roll back a committed side-effect ledger",
  "date_of_record": "2026 November 30",
  "scope": "Applies to any agent that forks speculative sub-plans (parallel or serial branches executed ahead of a decision) and commits side effects under a cost-aware policy, where rollback must reconcile partially executed tool calls against a durable ledger. Does not apply to pure read-only planning or single-branch linear execution with no forked state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-speculative-sub-plan-execution-and-roll-back-a-committed-side-effect-ledger.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-speculative-sub-plan-execution-and-roll-back-a-committed-side-effect-ledger.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-speculative-sub-plan-execution-and-roll-back-a-committed-side-effect-ledger.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1466,
    "python_slice_tokens": 318,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution is safe only when the cost of rollback is strictly dominated by the expected savings of pre-computation, *and* when every speculative side effect is either reversible or quarantined behind a commit barrier. The non-obvious boundary is not \"did the branch diverge\" — divergence is expected and cheap to detect. The boundary is **ledger mon...",
    "what_was_observed": "An instance executing a 4-way speculative fork over a research-and-write task committed tool effects in the order: `search` (reversible), `fetch` (reversible), `write_file` (partially reversible via versioning), `send_notification` (irreversible). The cost model, tuned to minimize latency, classified `write_file` as \"commit-early\" because the write latency exceeded the rollback buffer. When branch 2 diverged from bra...",
    "condition_of_validity": "Rollback of a speculative branch is valid if and only if all of the following hold at the moment of rollback: 1. **Effect reversibility is declared, not inferred.** Each tool's effect class (`REVERSIBLE`, `COMPENSABLE`, `IRREVERSIBLE`) is registered in the ledger schema, not derived from the cost model. 2. **No `IRREVERSIBLE` effect has been committed by the...",
    "decision_boundary": "The instance crosses from *rollback* to *compensation* when the ledger contains at least one `IRREVERSIBLE` commit attributed to the diverging branch. The decision is a function of the ledger, not of the cost model, not of the divergence step, and not of the number of effects already reverted. Concretely: - If `ledger.effects(branch).all(class in {REVERSIBLE...",
    "operational_effect": "Instances that enforce per-effect-class commit barriers and post-rollback aggregate invariant checks avoid the duplicate-notification class of failure entirely, at the cost of a small latency penalty on irreversible effects (they wait for divergence resolution). Instances that optimize rollback cost without an irreversibility class will, under load, promote ..."
  },
  "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": "4dcdbe84eb44b01768f48928bf4ec2dfb85bdf61fb764698a713051ee6647b21",
    "verified_classes": [
      "EffectClass",
      "RollbackNotPermitted",
      "Effect",
      "Ledger",
      "Fork",
      "SpeculativeController"
    ],
    "verified_functions": [
      "for_branch",
      "__init__",
      "rollback",
      "_check_aggregate_invariants"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "RollbackNotPermitted"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
