fix(runtime): harden durable run lifecycle - #18
Conversation
- Keep terminal work replayable and submissions explicitly resolvable\n across crash windows.\n- Migrate durable stores from schema 4 to 6 with conservative generic\n ingest markers and additive capacity reservation tables.
ProofTested source SHA: Focused deterministic evidence on the tested SHA:
Command result: the focused pytest selection above completed successfully with 19 passed. The deadline check completed successfully. No credentials, local filesystem locations, temporary identifiers, or payload data are included here. GitHub Actions is the retained CI evidence owner; the current head has successful lint, build, documentation, multi-version test, secret-scan, and PostgreSQL contract checks: https://github.com/AnsonDev42/batchor/actions/runs/29662233537 No acceptance criterion remains unproven within the documented boundaries. |
Keep stale terminal-error replays idempotent across storage adapters.
Proof refreshThe prior proof on Focused command:
Result: 22 passed. The storage-contract selectors execute against all configured adapters, so the result includes the cross-adapter stale-replay invariant. Criterion evidence on the refreshed SHA:
Sanitization: no credentials, machine-local paths, temporary labels, payload data, or personal data are included. GitHub Actions owns retained CI evidence for this SHA: https://github.com/AnsonDev42/batchor/actions/runs/29662537134 CI disclosure: the retained run above is green for secret scan, lint, Python 3.12/3.13/3.14 tests, build, docs, and PostgreSQL contracts. A separate duplicate run on the same SHA contains one Python 3.12 failure in |
Final proofThe proof snapshots on Focused command:
Result: 25 passed. The storage contract selectors execute against all configured adapters. Final criterion map:
Composite restart recovery now proves the durable invariant directly: any valid cooperative partial checkpoint maps to the exact unconsumed source suffix, persisted indexes are contiguous, restart completes all 1,002 records exactly once, and lineage is preserved. This resolves the prior Python 3.12 timing discrepancy caused by asserting a fixed 1,000-item checkpoint. Sanitization: no credentials, local filesystem locations, temporary identifiers, payloads, or personal data are included. GitHub Actions owns the durable CI evidence. Both runs on this frozen SHA are green for secret scan, lint, Python 3.12/3.13/3.14 tests, build, strict docs, and PostgreSQL contracts:
No criterion or CI gap remains on the tested SHA. |
Summary
Proof
Source SHA:
e642d0d01f5424880ad9c4234c8a63c6d9ae8e4cuv run pytest -q— passed, 89.35% coverageuv run ty check src— passeduv run ruff check src tests— passeduv run mkdocs build --strict— passeduv build— passed; wheel and sdist report 0.0.7uv lock --check— passedgit diff --check— passedCriterion evidence is provided by focused runtime, SQLite migration, storage-contract, and fake-provider integration tests committed with this SHA. The release design record maps all ten findings to their invariant, boundary, and regression test.
Local live-provider smoke was skipped because no acceptance criterion requires paid provider execution; deterministic fake-provider and durable-storage tests exercise the changed orchestration paths.
Release boundaries