2.5 KiB
2.5 KiB
Tasks: Restore Run Wizard (011)
Branch: feat/011-restore-run-wizard | Date: 2025-12-30
Input: specs/011-restore-run-wizard/spec.md, specs/011-restore-run-wizard/plan.md
Phase 0 — Specs (this PR)
- T001 Create
spec.md,plan.md,tasks.mdfor Feature 011.
Phase 1 — Data Model + Status Semantics
- T002 Define RestoreRun lifecycle statuses and transitions (draft→scoped→checked→previewed→queued→running→completed|partial|failed).
- T003 Add minimal persistence for wizard state (prefer JSON in
restore_runs.metadataunless columns are required). - T004 Freeze
environment+highlander_labelat run creation for audit.
Phase 2 — Filament Wizard (Create Restore Run)
- T005 Replace current single-form create with a 5-step wizard (Step 1–5 as in spec).
- T006 Ensure changing
backup_set_idresets downstream wizard state. - T007 Enforce “dry-run default ON” and keep execute disabled until all gates satisfied.
Phase 3 — Restore Scope UX
- T008 Implement scoped selection UI grouped by policy type + platform with search and bulk toggle.
- T009 Mark preview-only types clearly and ensure they never execute.
- T010 Ensure foundations are discoverable (assignment filters, scope tags, notification templates).
Phase 4 — Safety & Conflict Checks
- T011 Implement
RestoreRiskChecker(server-side) and persistcheck_summary+check_results. - T012 Render check results with severity (blocking/warning/safe) and block execute when blockers exist.
Phase 5 — Preview (Diff)
- T013 Implement
RestoreDiffGeneratorusingPolicyNormalizer+VersionDiff. - T014 Persist preview summary (and per-item diffs with safe limits) and require preview completion before execute.
Phase 6 — Confirm & Execute
- T015 Implement Step 5 confirmations (ack checkbox + tenant hard-confirm).
- T016 Execute restore via a queued Job (preferred) and update statuses + timestamps.
- T017 Persist execution outcomes and ensure audit logging entries exist for execution start/finish.
Phase 7 — Tests + Formatting
- T018 Add Pest tests for wizard gating rules and status transitions.
- T019 Add Pest tests for safety checks persistence and blocking behavior.
- T020 Add Pest tests for preview summary generation.
- T021 Run
./vendor/bin/pint --dirty. - T022 Run targeted tests (e.g.
./vendor/bin/sail artisan test --filter=RestoreRunWizardonce tests exist).