## Summary - add the shared operator explanation layer with explanation families, trustworthiness semantics, count descriptors, and centralized badge mappings - adopt explanation-first rendering across baseline compare, governance operation run detail, baseline snapshot presentation, tenant review detail, and review register rows - extend reason translation, artifact-truth presentation, fallback ops UX messaging, and focused regression coverage for operator explanation semantics ## Testing - vendor/bin/sail bin pint --dirty --format agent - vendor/bin/sail artisan test --compact tests/Feature/Monitoring/OperationsTenantScopeTest.php tests/Feature/Operations/OperationRunBlockedExecutionPresentationTest.php - vendor/bin/sail artisan test --compact ## Notes - Livewire v4 compatible - panel provider registration remains in bootstrap/providers.php - no destructive Filament actions were added or changed in this PR - no new global-search behavior was introduced in this slice Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #191
2.9 KiB
2.9 KiB
Quickstart: Operator Explanation Layer
Goal
Implement and verify a shared operator explanation layer so degraded, partial, suppressed, and missing-input governance results become understandable without opening diagnostics.
Implementation sequence
- Add the shared explanation-pattern builder in the support layer.
- Extend reason translation outputs with trust-impact and next-action semantics where missing.
- Define count-role taxonomy and wire it into baseline compare stats or presenters.
- Refactor Baseline Compare to render the explanation pattern before diagnostics.
- Refactor governance-oriented Operation Run detail and Baseline Snapshot result presentation to render the same reading order.
- Apply the pattern to Tenant Review detail and Review Register to prove reuse.
- Add focused regression coverage for degraded, suppressed, absent-output, and authorization-preservation cases.
- Run focused tests and format changed files.
Focused verification commands
Start services if needed:
vendor/bin/sail up -d
Run the most relevant focused suites:
vendor/bin/sail artisan test --compact tests/Feature/Baselines/BaselineCompareWhyNoFindingsReasonCodeTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/BaselineCaptureResultExplanationSurfaceTest.php
vendor/bin/sail artisan test --compact tests/Feature/Monitoring/ArtifactTruthRunDetailTest.php
vendor/bin/sail artisan test --compact tests/Feature/Filament/OperationRunBaselineTruthSurfaceTest.php
vendor/bin/sail artisan test --compact tests/Feature/Authorization/OperatorExplanationSurfaceAuthorizationTest.php
vendor/bin/sail artisan test --compact tests/Unit/Badges/OperatorOutcomeTaxonomyTest.php
vendor/bin/sail artisan test --compact tests/Unit/Badges/GovernanceArtifactTruthTest.php
Run any new focused explanation or reason-translation tests added during implementation:
vendor/bin/sail artisan test --compact --filter=Explanation
vendor/bin/sail artisan test --compact --filter=ReasonTranslation
Format changed files:
vendor/bin/sail bin pint --dirty --format agent
Manual smoke checklist
- Open Baseline Compare with a case that has
0 findingsand evidence gaps, and verify the page reads as incomplete or limited rather than healthy. - Open a Baseline Snapshot result surface after capture and verify the primary explanation, trustworthiness statement, and next action appear before low-level truth details.
- Open a governance Operation Run detail page for a technically successful but limited-confidence result, and verify run completion and result trust are clearly separated.
- Open a case with missing input or suppressed output and verify the primary explanation says why no normal result exists before diagnostics.
- Confirm raw JSON, raw reason codes, and low-level counters are still reachable but visually secondary.
- Confirm Tenant Review detail and Review Register reuse the same explanation family and next-action wording.