## 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
55 lines
2.3 KiB
Markdown
55 lines
2.3 KiB
Markdown
# 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
|
|
|
|
1. Add the schema changes for BaselineSnapshot lifecycle and completion metadata.
|
|
2. Add the BaselineSnapshot lifecycle enum/model helpers and a centralized consumability/effective-snapshot resolver.
|
|
3. Update capture finalization to create `building` snapshots and finalize to `complete` or `incomplete`.
|
|
4. Update profile current-snapshot promotion and supersession logic.
|
|
5. Update compare start and compare execution guards to reject non-consumable snapshots.
|
|
6. Update artifact-truth/badge presentation and the affected Filament surfaces.
|
|
7. Add conservative historical backfill logic.
|
|
8. Run focused Pest tests and format changed files.
|
|
|
|
## Focused verification commands
|
|
|
|
Start services if needed:
|
|
|
|
```bash
|
|
vendor/bin/sail up -d
|
|
```
|
|
|
|
Run the most relevant test groups:
|
|
|
|
```bash
|
|
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:
|
|
|
|
```bash
|
|
vendor/bin/sail artisan test --compact --filter=BaselineSnapshot
|
|
```
|
|
|
|
Format changed files:
|
|
|
|
```bash
|
|
vendor/bin/sail bin pint --dirty --format agent
|
|
```
|
|
|
|
## Manual smoke checklist
|
|
|
|
1. Start a baseline capture from a workspace baseline profile and verify the produced snapshot becomes complete only after finalization.
|
|
2. Force or simulate a mid-assembly failure and verify the produced snapshot remains incomplete and is not promoted to current truth.
|
|
3. Open the baseline profile detail and confirm the latest complete snapshot remains the effective current snapshot when a newer attempt is incomplete.
|
|
4. Open baseline compare for an assigned tenant and verify compare is blocked with an operator-safe explanation when no consumable snapshot exists.
|
|
5. Open Monitoring run detail for capture/compare and confirm run outcome and snapshot lifecycle appear as separate truths.
|