## Summary - add explicit BaselineSnapshot lifecycle truth with conservative backfill and a shared truth resolver - block baseline compare from building, incomplete, or superseded snapshots and align workspace/tenant UI truth surfaces with effective snapshot state - surface artifact truth separately from operation outcome across baseline profile, snapshot, compare, and operation run pages ## Testing - integrated browser smoke test on the active feature surfaces - `vendor/bin/sail artisan test --compact tests/Feature/Filament/BaselineSnapshotTruthSurfaceTest.php tests/Feature/Filament/BaselineProfileCompareStartSurfaceTest.php` - targeted baseline lifecycle and compare guard coverage added in Pest - `vendor/bin/sail bin pint --dirty --format agent` ## Notes - Livewire v4 compliance preserved - no panel provider registration changes were needed; Laravel 12 providers remain in `bootstrap/providers.php` - global search remains disabled for the affected baseline resources by design - destructive actions remain confirmation-gated; capture and compare actions keep their existing authorization and confirmation behavior - no new panel assets were added; existing deploy flow for `filament:assets` is unchanged Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #189
2.3 KiB
2.3 KiB
Quickstart: BaselineSnapshot Artifact Truth
Goal
Implement and verify explicit BaselineSnapshot lifecycle/completeness semantics so baseline compare and profile truth consume only complete snapshots.
Implementation sequence
- Add the schema changes for BaselineSnapshot lifecycle and completion metadata.
- Add the BaselineSnapshot lifecycle enum/model helpers and a centralized consumability/effective-snapshot resolver.
- Update capture finalization to create
buildingsnapshots and finalize tocompleteorincomplete. - Update profile current-snapshot promotion and supersession logic.
- Update compare start and compare execution guards to reject non-consumable snapshots.
- Update artifact-truth/badge presentation and the affected Filament surfaces.
- Add conservative historical backfill logic.
- Run focused Pest tests and format changed files.
Focused verification commands
Start services if needed:
vendor/bin/sail up -d
Run the most relevant test groups:
vendor/bin/sail artisan test --compact tests/Feature/Baselines/BaselineCaptureTest.php
vendor/bin/sail artisan test --compact tests/Feature/Baselines/BaselineComparePreconditionsTest.php
vendor/bin/sail artisan test --compact tests/Feature/Baselines/BaselineCompareStatsTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament
vendor/bin/sail artisan test --compact tests/Unit/Badges
Run any new focused baseline lifecycle regression test file added during implementation:
vendor/bin/sail artisan test --compact --filter=BaselineSnapshot
Format changed files:
vendor/bin/sail bin pint --dirty --format agent
Manual smoke checklist
- Start a baseline capture from a workspace baseline profile and verify the produced snapshot becomes complete only after finalization.
- Force or simulate a mid-assembly failure and verify the produced snapshot remains incomplete and is not promoted to current truth.
- Open the baseline profile detail and confirm the latest complete snapshot remains the effective current snapshot when a newer attempt is incomplete.
- Open baseline compare for an assigned tenant and verify compare is blocked with an operator-safe explanation when no consumable snapshot exists.
- Open Monitoring run detail for capture/compare and confirm run outcome and snapshot lifecycle appear as separate truths.