Skip to content

recovery: verify restored version hashes in an isolated scratch installation #221

Open

Description

@fieldmouseworks-workers

Child of #44. Finish only this task in one fresh session and one PR. The parent's original authorization boundaries still apply; this child grants no additional authority. Do not read earlier sessions' transcripts.

Refs #44, owner-approved decisions 5 and 6. One PR after #213. Existing restore validates SQLite and startup invariants but does not provide the approved scratch restore --verify workflow that recomputes every retained version's content and chain hashes. Add that CLI mode using the existing restore, migration, canonical-hash, and disposition-boundary owners. Specify semantics in an ADR: restore a supplied snapshot into an isolated scratch data directory, migrate forward, verify every retained schema-1/schema-2 version and its chain, apply required disposition recovery evidence, and produce a typed report and nonzero failure verdict. Keep source snapshots and the live installation unchanged. Report unavailable content and policy boundaries honestly; do not call them verified bytes. Document operation, cleanup, limitations, and recovery evidence inputs. Backup/restore remains CLI-first; no web operation may restore the live directory. Product implementation and invented-data drills only; no production restore or deployment.

Verification: Process tests prove source/live-directory immutability, forward migration, mixed schemas, corruption and broken-chain detection, unsupported-schema refusal, disposition-boundary reporting, and missing-evidence refusal. Run a clean-installation invented-data drill with the real binary and a deliberately corrupted negative control. Run full current CONTRIBUTING.md gates and preserve exact-revision artifacts.

If this is too big, publish any progress, split it with proj split FILE (a JSON array of title/body/check tasks), then end the session. Wait for the PR to land before declaring this task done.

Activity

  1. added
    later
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    later

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions