Implements Spec 117 (Golden Master Baseline Drift Engine): - Adds provider-chain resolver for current state hashes (content evidence via PolicyVersion, meta evidence via inventory) - Updates baseline capture + compare jobs to use resolver and persist provenance + fidelity - Adds evidence_fidelity column/index + Filament UI badge/filter/provenance display for findings - Adds performance guard test + integration tests for drift, fidelity semantics, provenance, filter behavior - UX fix: Policies list shows "Sync from Intune" header action only when records exist; empty-state CTA remains and is functional Tests: - `vendor/bin/sail artisan test --compact tests/Feature/Filament/PolicySyncCtaPlacementTest.php` - `vendor/bin/sail artisan test --compact --filter=Baseline` Checklist: - specs/117-baseline-drift-engine/checklists/requirements.md ✓ Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #142
1.5 KiB
1.5 KiB
Quickstart — Spec 117 Baseline Drift Engine
Prereqs
- Docker running
- Dependencies installed:
vendor/bin/sail composer install - Containers up:
vendor/bin/sail up -d
Run the minimum checks
- Format (dirty only):
vendor/bin/sail bin pint --dirty --format agent - Tests (focused):
vendor/bin/sail artisan test --compact --filter=Baseline(adjust filter to match added tests)
Manual verification flow (admin)
- Capture a baseline snapshot via the existing Baseline UI.
- Trigger “Compare baseline to tenant” via the existing compare landing page.
- Open Monitoring → the
OperationRunfor the compare:- Verify
context.baseline_compare.coverageandcontext.baseline_compare.evidence_gapsare populated.
- Verify
- Open Findings:
- Verify each finding shows a fidelity badge (
contentormeta). - Verify provenance is shown for both baseline and current evidence: fidelity, source, observed timestamp.
- Verify filtering by fidelity works.
- Verify each finding shows a fidelity badge (
Developer notes
- v1.5 compare must not fetch anything upstream. Evidence sources are strictly:
PolicyVersion(content) since baseline snapshotcaptured_at- Inventory meta contract (meta)
- When neither side has evidence for a subject, no finding should be created; the compare run should record an evidence gap.
Troubleshooting
- If UI changes don’t appear, run assets:
vendor/bin/sail npm run dev. - If tests fail due to stale schema, run:
vendor/bin/sail artisan migrate.