Implements Spec 091 “BackupSchedule Retention & Lifecycle (Archive/Restore/Force Delete)”.
- BackupSchedule lifecycle:
- Archive (soft delete) with confirmation; restores via Restore action; Force delete with confirmation and strict gating.
- Force delete blocked when historical runs exist.
- Archived schedules never dispatch/execute (dispatcher + job guard).
- Audit events emitted for archive/restore/force delete.
- RBAC UX semantics preserved (non-member hidden/404; member w/o capability disabled + server-side 403).
- Filament UX contract update:
- Create CTA placement rule across create-enabled list pages:
- Empty list: only large centered empty-state Create CTA.
- Non-empty list: only header Create action.
- Tests added/updated to enforce the rule.
Verification:
- `vendor/bin/sail bin pint --dirty`
- Focused tests: BackupScheduling + RBAC enforcement + EmptyState CTAs + Create CTA placement
Notes:
- Filament v5 / Livewire v4 compliant.
- Manual quickstart verification in `specs/091-backupschedule-retention-lifecycle/quickstart.md` remains to be checked (T031).
Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #109
1.2 KiB
1.2 KiB
Quickstart — Spec 091 (BackupSchedule Retention & Lifecycle)
Goal
Verify BackupSchedule lifecycle (Archive/Restore/Force delete) behavior, RBAC semantics, audit logging, and scheduler safety.
Prerequisites
- Docker/Sail running:
vendor/bin/sail up -d
Run focused tests
-
Run BackupScheduling tests:
vendor/bin/sail artisan test --compact tests/Feature/BackupScheduling
-
Run RBAC helper tests (guardrails for 404/403 semantics and destructive confirmation):
vendor/bin/sail artisan test --compact tests/Feature/Rbac/UiEnforcementNonMemberHiddenTest.phpvendor/bin/sail artisan test --compact tests/Feature/Rbac/UiEnforcementMemberDisabledTest.php
Manual verification checklist (admin UI)
In tenant panel (/admin/t/{tenant}):
- List shows active schedules by default.
- “Archived” filter/view shows archived schedules.
- Archive action:
- requires confirmation
- moves schedule to archived view
- schedule is no longer dispatched/executed
- Restore action:
- restores schedule to active view
- does not change
is_enabled
- Force delete action:
- visible only when archived
- requires confirmation
- blocked if historical runs exist
Formatting
vendor/bin/sail bin pint --dirty