TenantAtlas/tests/Feature/Rbac
ahmido da1adbdeb5 Spec 119: Drift cutover to Baseline Compare (golden master) (#144)
Implements Spec 119 (Drift Golden Master Cutover):

- Baseline Compare is the only drift writer (`source = baseline.compare`).
- Drift findings now store diff-compatible `evidence_jsonb` (summary.kind, baseline/current policy_version_id refs, fidelity + provenance).
- Findings UI renders one-sided diffs for `missing_policy`/`unexpected_policy` when a single ref exists; otherwise shows explicit “diff unavailable”.
- Removes legacy drift generator runtime (jobs/services/UI) and related tests.
- Adds one-time migration to delete legacy drift findings (`finding_type=drift` where source is null or != baseline.compare).
- Scopes baseline capture & landing duplicate warnings to latest completed inventory sync.
- Canonicalizes compliance `scheduledActionsForRule` drift signal and keeps legacy snapshots comparable.

Tests:
- `vendor/bin/sail artisan test --compact` (full suite per tasks)
- Focused pack: BaselinePolicyVersionResolverTest, BaselineCompareDriftEvidenceContractTest, DriftFindingDiffUnavailableTest, LegacyDriftFindingsCleanupMigrationTest, ComplianceNoncomplianceActionsDriftTest

Notes:
- Livewire v4+ / Filament v5 compatible (no legacy APIs).
- No new external dependencies.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #144
2026-03-06 14:30:49 +00:00
..
RoleMatrix 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
ActionSurfaceRbacSemanticsTest.php feat: action-surface contract inspect affordance + clickable rows (#100) 2026-02-08 20:31:36 +00:00
BackupItemsRelationManagerSemanticsTest.php Spec 094: Assignment ops observability hardening (#113) 2026-02-15 14:08:14 +00:00
BackupItemsRelationManagerUiEnforcementTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
CreateRestoreRunAuthorizationTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
DenialDiagnosticsTest.php 065-tenant-rbac-v1 (#79) 2026-01-28 21:09:47 +00:00
DriftLandingUiEnforcementTest.php Spec 119: Drift cutover to Baseline Compare (golden master) (#144) 2026-03-06 14:30:49 +00:00
EditProviderConnectionUiEnforcementTest.php feat(spec-089): provider connections tenantless UI (#107) 2026-02-12 16:35:13 +00:00
EditTenantArchiveUiEnforcementTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
FilamentManageEnforcementTest.php 065-tenant-rbac-v1 (#79) 2026-01-28 21:09:47 +00:00
InventoryItemResourceAuthorizationTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
OnboardingWizardUiEnforcementTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
PolicyVersionMaintenanceAuthorizationTest.php 065-tenant-rbac-v1 (#79) 2026-01-28 21:09:47 +00:00
PolicyVersionsRestoreToIntuneUiEnforcementTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
ProviderConnectionsCreateUiEnforcementTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
RegisterTenantAuthorizationTest.php 085-tenant-operate-hub (#103) 2026-02-11 13:02:03 +00:00
TenantAdminAuthorizationTest.php fix: consolidate tenant creation + harden selection flows (#131) 2026-02-22 19:54:24 +00:00
TenantMembershipsRelationManagerUiEnforcementTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
TenantResourceAuthorizationTest.php fix: consolidate tenant creation + harden selection flows (#131) 2026-02-22 19:54:24 +00:00
UiEnforcementDestructiveTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
UiEnforcementMemberDisabledTest.php 066-rbac-ui-enforcement-helper (#81) 2026-01-30 16:58:02 +00:00
UiEnforcementNonMemberHiddenTest.php feat(spec-088): remove tenant graphOptions legacy path (#105) 2026-02-12 10:14:44 +00:00
WorkspaceMembershipsRelationManagerUiEnforcementTest.php feat: workspace-first managed tenants + RBAC membership UI fixes (072) (#87) 2026-02-02 23:54:22 +00:00