Durability Contract (v1)¶
Status: Active baseline Last updated: 2026-05-28
This document formalizes the current ORCA durability baseline so it is testable, reviewable, and safe to evolve.
Scope¶
Durability contract v1 covers:
- Checkpoint state persistence and load semantics.
- Run lifecycle durability transitions for resume/replay/fork flows.
- Backward-compatible behavior of customer-facing run durability endpoints.
Contract Invariants¶
- Checkpoint round-trip preserves ExecutionState fields required for safe continuation.
- Resume uses a valid checkpoint as source-of-truth for continuation state.
- Replay creates a new run identity and executes from checkpoint-derived state.
- Fork creates a new pending run identity pointing to a selected checkpoint.
- Missing checkpoint/run references fail deterministically with typed not-found semantics.
- Durability flows do not mutate capability contract definitions.
Required Runtime Operations¶
- Save checkpoint record + state snapshot.
- Load checkpoint record + state snapshot.
- List run checkpoints.
- Resume run from checkpoint.
- Replay run from checkpoint.
- Fork run from checkpoint.
Verification Baseline¶
Run the durability contract verifier:
python tooling/verify_durability_contract.py --report-file artifacts/durability_contract_report.json
The verifier executes canonical test nodes for:
runtime/test_checkpoint.pyruntime/test_checkpoint_manager.pyruntime/test_run_store.py- resume/replay/fork integration slices in
test_neutral_api_slice2.py
CI Integration¶
Durability contract report artifact:
artifacts/durability_contract_report.jsonartifacts/durability_advanced_report.json
Advanced durability verifier (v2 baseline+):
python tooling/verify_durability_advanced.py --report-file artifacts/durability_advanced_report.json
The advanced verifier covers grouped scenarios for:
- restart continuity
- replay equivalence
- failure-injection durability paths
Advanced scenario tests include:
runtime/test_durability_advanced.py- resume/replay durability slices from
test_neutral_api_slice2.py - scheduler resume semantics checks in
runtime/test_scheduler_functional.py
Expected summary fields:
statussummary.total/passed/failed/pass_ratiotests[]failures[]
Expected advanced summary fields:
statussummary.total_scenarios/passed_scenarios/failed_scenarios/scenario_pass_ratioscenarios[]failures[]
Out of Scope (v1)¶
- Temporal-native orchestration semantics.
- Cross-process distributed workflow history store.
- Side-effect ledger guarantees beyond existing replay/fork lifecycle behavior.