Skip to content

feat: add restore apply contract checkpoint#221

Merged
cafitac merged 1 commit into
mainfrom
g4/query-preview-cleanup-restore-apply-contract
May 7, 2026
Merged

feat: add restore apply contract checkpoint#221
cafitac merged 1 commit into
mainfrom
g4/query-preview-cleanup-restore-apply-contract

Conversation

@cafitac
Copy link
Copy Markdown
Owner

@cafitac cafitac commented May 7, 2026

Summary

  • Add a read-only blocked restore apply contract checkpoint for dogfood query-preview-cleanup-restore --apply.
  • Require the separate restore policy, actor, and reason while exposing only reason_sha256 in output.
  • Keep live restore unavailable with restore_apply_contract_checkpoint_only and live_restore_not_implemented blocked reasons.
  • Update G4a handoff/roadmap docs to record the contract-only restore apply boundary.

Tests

  • uv run pytest tests/test_cli.py::test_python_module_cli_dogfood_query_preview_cleanup_restore_dry_run_validates_artifact_without_mutation_or_leaks tests/test_cli.py::test_python_module_cli_dogfood_query_preview_cleanup_restore_apply_is_contract_blocked_without_mutation_or_leaks tests/test_cli.py::test_python_module_cli_dogfood_query_preview_cleanup_restore_dry_run_blocks_source_database_mismatch tests/test_cli.py::test_python_module_cli_dogfood_query_preview_cleanup_restore_dry_run_reports_wrong_policy_as_read_only_error tests/test_cli.py::test_python_module_cli_dogfood_query_preview_cleanup_restore_dry_run_blocks_artifact_integrity_mismatch -q
  • uv run pytest tests/ -q
  • uv run ruff check src tests
  • git diff --check
  • local smoke: /tmp/agent-memory-restore-apply-contract-smoke

Safety

  • Restore apply is not implemented and cannot mutate the DB.
  • Broad G4 apply remains blocked.
  • Raw query previews and raw reason text are not printed or stored.
  • Future live restore still requires a separate disposable-restore rehearsal/audit implementation slice.

@cafitac cafitac merged commit 9023d38 into main May 7, 2026
2 checks passed
@cafitac cafitac deleted the g4/query-preview-cleanup-restore-apply-contract branch May 7, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant