TenantAtlas/specs/118-baseline-drift-engine/quickstart.md
ahmido 92704a2f7e Spec 118: Resumable baseline evidence capture + snapshot UX (#143)
Implements Spec 118 baseline drift engine improvements:

- Resumable, budget-aware evidence capture for baseline capture/compare runs (resume token + UI action)
- “Why no findings?” reason-code driven explanations and richer run context panels
- Baseline Snapshot resource (list/detail) with fidelity visibility
- Retention command + schedule for pruning baseline-purpose PolicyVersions
- i18n strings for Baseline Compare landing

Verification:
- `vendor/bin/sail bin pint --dirty --format agent`
- `vendor/bin/sail artisan test --compact --filter=Baseline` (159 passed)

Note:
- `docs/audits/redaction-audit-2026-03-04.md` left untracked (not part of PR).

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #143
2026-03-04 22:34:13 +00:00

2.1 KiB
Raw Blame History

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.