## Summary <!-- Kurz: Was ändert sich und warum? --> ## Spec-Driven Development (SDD) - [ ] Es gibt eine Spec unter `specs/<NNN>-<feature>/` - [ ] Enthaltene Dateien: `plan.md`, `tasks.md`, `spec.md` - [ ] Spec beschreibt Verhalten/Acceptance Criteria (nicht nur Implementation) - [ ] Wenn sich Anforderungen während der Umsetzung geändert haben: Spec/Plan/Tasks wurden aktualisiert ## Implementation - [ ] Implementierung entspricht der Spec - [ ] Edge cases / Fehlerfälle berücksichtigt - [ ] Keine unbeabsichtigten Änderungen außerhalb des Scopes ## Tests - [ ] Tests ergänzt/aktualisiert (Pest/PHPUnit) - [ ] Relevante Tests lokal ausgeführt (`./vendor/bin/sail artisan test` oder `php artisan test`) ## Migration / Config / Ops (falls relevant) - [ ] Migration(en) enthalten und getestet - [ ] Rollback bedacht (rückwärts kompatibel, sichere Migration) - [ ] Neue Env Vars dokumentiert (`.env.example` / Doku) - [ ] Queue/cron/storage Auswirkungen geprüft ## UI (Filament/Livewire) (falls relevant) - [ ] UI-Flows geprüft - [ ] Screenshots/Notizen hinzugefügt ## Notes <!-- Links, Screenshots, Follow-ups, offene Punkte --> Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local> Reviewed-on: #14
44 lines
2.5 KiB
Markdown
44 lines
2.5 KiB
Markdown
# 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)
|
||
- [x] T001 Create `spec.md`, `plan.md`, `tasks.md` for 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.metadata` unless columns are required).
|
||
- [ ] T004 Freeze `environment` + `highlander_label` at 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_id` resets 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 persist `check_summary` + `check_results`.
|
||
- [ ] T012 Render check results with severity (blocking/warning/safe) and block execute when blockers exist.
|
||
|
||
## Phase 5 — Preview (Diff)
|
||
- [ ] T013 Implement `RestoreDiffGenerator` using `PolicyNormalizer` + `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=RestoreRunWizard` once tests exist).
|
||
|