Repository navigation
REQ 115
The engine shall reuse a completed partial Ollama assessment only from a private, integrity-checked checkpoint whose approval, evidence, model, and review-policy identities exactly match the resumed run.
Repeating successful frame inference wastes time, but reusing a result under changed approval or evidence is unsafe. A checkpoint is neither a completed receipt nor authenticated attestation of the local model. Issue #236, under epic #229, depends on privacy in issue #234 and bounded execution in issue #235.
A versioned canonical checkpoint binds run identity, approval hash, evidence receipt hash, source/submitted frame hashes, expected model tag/digest, prompt/rubric/schema versions, inference options, budget, sampling, disclosure, and residency policies. Only validated completed per-input assessments are reusable; timed-out or malformed responses are not completed work. Before reuse, all identities, retention validity, private custody, integrity, and current model preflight match exactly; any mismatch rejects reuse without overwriting the old checkpoint or silently broadening approval. Checkpoint writes use an atomic replacement of run-owned state with private temporary files, preserving the last valid checkpoint on failure and refusing links/unsafe destinations. Linux custody is mode 0700 for the containing private directory and 0600 for files; Windows uses an exact current-user-plus-SYSTEM ACL, or fails closed where custody cannot be verified. No raw image, unrestricted prompt/response, credential, or activation value is stored. Partial state is explicitly incomplete and cannot be consumed as a passing assessment or final receipt. Resumption still requires final model postflight, complete required coverage, and valid aggregation before an independently distinguishable completed receipt is written. Hashes detect inconsistent state but do not authenticate a malicious same-user writer; that host trust limitation is explicit.
Checkpoint recovery supporting TEST-117 and partial-state separation in TEST-118 integrated through PR #243, implementation a624c919d0a56b84eef332ae31f2d1be0f14d4fc, merge c34d555e41f0a15bcd36b5c948c564bff9b01874. Focused review/run/contract tests pass 180 cases; the full Python suite passes 2,142 cases, and all seven upstream checks passed. A two-frame interrupted/resumed fixture reuses only completed inference and matches uninterrupted output. Tests cover exact identity/approval/policy changes, corrupt or unsafe state, model pre/postflight/template checks, expiry, process-lock concurrency, atomic replacement failure, minimized canaries, consumed/exhausted/uncertain budget accounting and partial/final receipt rejection. Checkpoint custody is implemented and tested on POSIX; unsupported platforms fail closed rather than claiming Windows checkpoint ACL support. No malicious same-user authentication, full live benchmark or native-build proof is claimed.
SYS-REQ-029; prerequisites REQ-109, REQ-110, REQ-111, REQ-112, REQ-113, and REQ-114
Medium
scripts/tests/test_assisted_benchmark_review.py (test_interrupted_assessment_resumes_without_repeating_completed_inference, test_changed_checkpoint_identity_is_rejected_without_overwrite, test_corrupt_or_unsafe_checkpoint_is_refused, test_checkpoint_exclusive_lock_refuses_a_concurrent_writer, test_checkpoint_atomic_replace_failure_preserves_last_valid_state, test_checkpoint_preserves_budget_and_minimized_output_without_raw_canaries, test_checkpoint_retains_only_minimized_canary_results_and_preserves_a_failure, test_resume_requires_fresh_model_identity_without_overwriting_old_state, test_uncertain_inflight_checkpoint_reserves_budget_instead_of_resetting_it, expiry/exhaustion/unsupported-platform cases); scripts/tests/test_assisted_benchmark_run.py (test_partial_checkpoint_cannot_masquerade_as_final_receipt, test_invalid_checkpoint_cli_options_fail_before_external_work); .github/workflows/ci-assurance.yml. Reproduce with .venv/bin/python -m pytest scripts/tests/ -q --tb=short after the documented pinned dependency setup.
scripts/assisted_benchmark_checkpoint.py (CheckpointStore.__enter__, _read, save, __exit__, private_file: private bounded canonical state, exclusive locking, integrity, atomic persistence and safe cleanup); scripts/assisted_benchmark_review.py (ReviewLifecycle.restore, progress, minimize_input, validate_retained_input, collect_review_inputs, review_evidence: exact binding, minimized reuse, fresh model checks and carried lifecycle budget); scripts/assisted_benchmark_run.py (orchestrate, write_private_receipt, main: separate partial/final evidence and fail-fast checkpoint CLI); tools/assisted-benchmark/README.md (hash policy ordered-input-digests@1, custody/platform and server-completion limits).
Implemented in develop; POSIX recovery/identity/custody regressions and CI verified, fail-closed elsewhere, not live qualification or authenticated same-user state