2.0 KiB
2.0 KiB
Quickstart — Spec 115 (Baseline Operability & Alert Integration)
Prereqs
- Run the app via Sail.
Local setup
- Start containers:
vendor/bin/sail up -d
How to exercise the feature (manual)
1) Ensure baseline compare can run
- In Filament tenant-context, start a baseline compare (existing UI surface).
- Confirm an
OperationRunof typebaseline_compareappears in Monitoring → Operations.
2) Verify auto-close safety gate
- Create/open at least one baseline compare finding (
source = baseline.compare) by running a compare with drift. - Remediate drift (or modify baseline/current so it no longer appears).
- Run baseline compare again.
- Expected:
- If the run outcome is
succeededANDsummary_counts.processed == summary_counts.totalANDsummary_counts.failed == 0, stale findings are resolved withresolved_reason = no_longer_drifting. - If the run fails/partial/incomplete, no findings are auto-resolved.
- If the run outcome is
3) Verify baseline drift alert events
- Ensure workspace settings are configured:
baseline.severity_mappinghas the three required keys.baseline.alert_min_severityis set (defaults tohigh).
- Run baseline compare to create new/reopened baseline findings.
- Trigger alerts evaluation:
vendor/bin/sail artisan tenantpilot:dispatch-alerts --once
- Expected:
baseline_high_driftevents are produced only for findings that are new/reopened within the evaluation window.- Repeat compares do not re-alert the same open finding.
4) Verify baseline compare failed alerts
- Force a baseline compare to fail (e.g., by making required preconditions fail or simulating a job failure).
- Run alerts evaluation again.
- Expected:
baseline_compare_failedevent is produced, subject to the existing per-rule cooldown and quiet-hours suppression.
Tests (Pest)
- Run focused suite for this spec once implemented:
vendor/bin/sail artisan test --compact --filter=BaselineOperability- Or run specific test files under
tests/Feature/Alerts/andtests/Feature/Baselines/.