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.