TenantAtlas/specs/117-baseline-drift-engine/quickstart.md
2026-03-03 08:21:24 +01:00

1.5 KiB
Raw Blame History

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)

  1. Capture a baseline snapshot via the existing Baseline UI.
  2. Trigger “Compare baseline to tenant” via the existing compare landing page.
  3. Open Monitoring → the OperationRun for the compare:
    • Verify context.baseline_compare.coverage and context.baseline_compare.evidence_gaps are populated.
  4. Open Findings:
    • Verify each finding shows a fidelity badge (content or meta).
    • Verify provenance is shown for both baseline and current evidence: fidelity, source, observed timestamp.
    • Verify filtering by fidelity works.

Developer notes

  • v1.5 compare must not fetch anything upstream. Evidence sources are strictly:
    • PolicyVersion (content) since baseline snapshot captured_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 dont appear, run assets: vendor/bin/sail npm run dev.
  • If tests fail due to stale schema, run: vendor/bin/sail artisan migrate.