Implements Spec 087: Legacy Runs Removal (rigorous). ### What changed - Canonicalized run history: **`operation_runs` is the only run system** for inventory sync, Entra group sync, backup schedule execution/retention/purge. - Removed legacy UI surfaces (Filament Resources / relation managers) for legacy run models. - Legacy run URLs now return **404** (no redirects), with RBAC semantics preserved (404 vs 403 as specified). - Canonicalized affected `operation_runs.type` values (dotted → underscore) via migration. - Drift + inventory references now point to canonical operation runs; includes backfills and then drops legacy FK columns. - Drops legacy run tables after cutover. - Added regression guards to prevent reintroducing legacy run tokens or “backfilling” canonical runs from legacy tables. ### Migrations - `2026_02_12_000001..000006_*` canonicalize types, add/backfill operation_run_id references, drop legacy columns, and drop legacy run tables. ### Tests Focused pack for this spec passed: - `tests/Feature/Guards/NoLegacyRunsTest.php` - `tests/Feature/Guards/NoLegacyRunBackfillTest.php` - `tests/Feature/Operations/LegacyRunRoutesNotFoundTest.php` - `tests/Feature/Monitoring/MonitoringOperationsTest.php` - `tests/Feature/Jobs/RunInventorySyncJobTest.php` ### Notes / impact - Destructive cleanup is handled via migrations (drops legacy tables) after code cutover; deploy should run migrations in the same release. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #106
37 lines
1.6 KiB
Markdown
37 lines
1.6 KiB
Markdown
# Quickstart: Legacy Runs Removal (Spec 087)
|
|
|
|
**Branch**: `087-legacy-runs-removal`
|
|
|
|
## Local Dev (Sail)
|
|
|
|
1) Start containers:
|
|
|
|
- `vendor/bin/sail up -d`
|
|
|
|
2) Run migrations:
|
|
|
|
- `vendor/bin/sail artisan migrate`
|
|
|
|
3) Run targeted tests (once implementation exists):
|
|
|
|
- Minimum required pack:
|
|
- `vendor/bin/sail artisan test --compact tests/Feature/Guards/NoLegacyRunsTest.php tests/Feature/Operations/LegacyRunRoutesNotFoundTest.php tests/Feature/Monitoring/MonitoringOperationsTest.php tests/Feature/Drift`
|
|
- Backup + directory regressions:
|
|
- `vendor/bin/sail artisan test --compact tests/Feature/BackupScheduling tests/Feature/DirectoryGroups`
|
|
- Canonical run flow checks:
|
|
- `vendor/bin/sail artisan test --compact tests/Feature/Inventory/InventorySyncServiceTest.php tests/Feature/Console/PurgeNonPersistentDataCommandTest.php tests/Feature/Console/ReconcileBackupScheduleOperationRunsCommandTest.php`
|
|
|
|
## Manual Verification Checklist (once implementation exists)
|
|
|
|
- Inventory sync run appears in Monitoring → Operations and opens via the canonical viewer.
|
|
- Entra group sync run appears in Monitoring → Operations and opens via the canonical viewer.
|
|
- Backup schedule run/retention/purge each appear in Monitoring → Operations.
|
|
- Legacy run URLs return 404 (no redirects):
|
|
- Inventory sync runs resource route
|
|
- Entra group sync runs resource route
|
|
- Backup schedule run history relation manager is removed from schedule detail
|
|
|
|
## Notes
|
|
|
|
- Per spec clarifications, no backfill of legacy run history is performed. Only reference migration from legacy IDs to existing `operation_runs` IDs is expected.
|