TenantAtlas/specs/118-baseline-drift-engine/quickstart.md

44 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Quickstart — Spec 118 Golden Master Deep Drift v2
Spec reference: `/Users/ahmeddarrazi/Documents/projects/TenantAtlas/specs/118-baseline-drift-engine/spec.md`
## 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) In `/admin`, open a Baseline Profile and set capture mode to **Full content**.
2) Run **Capture baseline (full content)** and select a source tenant.
3) Open Monitoring → Operations → the capture `OperationRun`:
- Verify `context.target_scope` renders a “Target” (no “No target scope details…”).
- Verify `context.baseline_capture.evidence_capture` and `context.baseline_capture.gaps` exist.
- If capture was incomplete, verify `context.baseline_capture.resume_token` exists and UI offers **Resume capture**.
4) In `/admin/t/{tenant}`, open Baseline Compare and run **Compare now (full content)**.
5) Open Monitoring → the compare `OperationRun`:
- Verify coverage proof is recorded (`context.baseline_compare.coverage`).
- Verify evidence capture stats and evidence gaps are present.
- Verify “Why no findings?” is explained via `context.baseline_compare.reason_code` when applicable.
6) Open Findings:
- Verify drift findings appear when policy settings differ.
- Verify findings include fidelity/provenance fields for baseline and current evidence.
## Forcing a resumable run (dev-only)
To test resume behavior without waiting for real throttling:
- Temporarily reduce the per-run capture budget in config (planned in Spec 118) so the run cannot process the full scope.
- Re-run capture/compare and verify a resume token is recorded and **Resume capture** continues work without duplicating already-captured subjects.
## 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`.