## Summary - add the structured subject-resolution foundation for baseline compare and baseline capture, including capability guards, subject descriptors, resolution outcomes, and operator action categories - persist structured evidence-gap subject records and update compare/capture surfaces, landing projections, and cleanup tooling to use the new contract - add Spec 163 artifacts and focused Pest coverage for classification, determinism, cleanup, and DB-only rendering ## Validation - `vendor/bin/sail bin pint --dirty --format agent` - `vendor/bin/sail artisan test --compact tests/Unit/Support/Baselines tests/Feature/Baselines tests/Feature/Filament/OperationRunEnterpriseDetailPageTest.php` ## Notes - verified locally that a fresh post-restart baseline compare run now writes structured `baseline_compare.evidence_gaps.subjects` records instead of the legacy broad payload shape - excluded the separate `docs/product/spec-candidates.md` worktree change from this branch commit and PR Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #193
3.4 KiB
3.4 KiB
Quickstart: Baseline Subject Resolution and Evidence Gap Semantics Foundation
Prerequisites
- Start the local stack.
vendor/bin/sail up -d
- Clear stale cached state if you have been switching branches or configs.
vendor/bin/sail artisan optimize:clear
Focused Verification Pack
Run the minimum targeted regression pack for this foundation:
vendor/bin/sail artisan test --compact tests/Unit/Support/Baselines tests/Feature/Baselines tests/Feature/Filament/OperationRunEnterpriseDetailPageTest.php
If the implementation introduces dedicated new files, narrow the pack further to the new subject-resolution, compare, capture, and development-cleanup tests.
Format touched files before final review:
vendor/bin/sail bin pint --dirty --format agent
Manual Verification Flow
- Ensure a tenant has fresh inventory data for at least one policy-backed type and one baseline-supported foundation type.
- Trigger or locate a baseline capture run and a baseline compare run for that tenant and profile.
- Open the canonical run detail at
/admin/operations/{run}. - Confirm the page distinguishes:
- structural cases
- operational or missing-local-data cases
- transient retryable cases
- Confirm inventory-only foundation subjects no longer surface as a new generic
policy_not_foundgap. - Confirm policy-backed missing-local-record cases still surface as an operational missing-record outcome.
Development Cleanup Verification
- Remove or invalidate old local compare or capture runs that still contain broad legacy gap reasons. Dry-run:
vendor/bin/sail artisan tenantpilot:baselines:purge-legacy-gap-runs
Apply deletion:
vendor/bin/sail artisan tenantpilot:baselines:purge-legacy-gap-runs --force
- Regenerate fresh runs under the new structured contract.
- Confirm the product and targeted tests no longer depend on the broad legacy shape being preserved in runtime code.
Runtime Capability Guard Verification
- Configure or seed one baseline-supported type whose runtime resolver path is valid.
- Configure or seed one type whose support claim would be structurally invalid without the new guard.
- Start compare or capture preparation.
- Confirm the valid type enters execution with a truthful path.
- Confirm the invalid type is limited, excluded, or explicitly classified as invalid support configuration before misleading gap output is produced.
Determinism Verification
- Run the same compare scenario twice against unchanged tenant-local data.
- Confirm both runs persist the same
subject_class,resolution_outcome, andoperator_action_categoryvalues for the same subject.
Render-Safety Verification
- Bind the fail-hard Graph client in affected UI tests.
- Verify canonical run detail and tenant baseline compare landing render without triggering Graph calls.
- Verify the richer semantics are derived solely from persisted run context and local metadata.
Deployment Notes
- No new panel provider is required; Laravel 12 continues to register providers in
bootstrap/providers.php. - Filament remains on Livewire v4-compatible patterns and does not require view publishing.
- No new shared or panel assets are required, so this slice adds no new
filament:assetsdeployment step beyond the existing deployment baseline. - Existing compare and capture operations remain on current
OperationRuntypes and notification behavior.