2.8 KiB
2.8 KiB
Quickstart: Canonical Operation Viewer Context Decoupling
Goal
Verify that canonical operation run viewing is independent of remembered tenant context while preserving tenant entitlement and capability semantics.
Preconditions
- Start the local environment:
vendor/bin/sail up -d
- Ensure test database and app state are ready:
vendor/bin/sail artisan optimize:clear
Manual Verification Flow
- Sign in as a user who is a member of one workspace and entitled to at least two tenants in that workspace.
- Open a canonical run linked to tenant A while tenant B is selected in the header.
- Confirm the page still renders the run and shows a non-blocking mismatch message.
- Clear tenant context or open the same run from a fresh session with no selected tenant.
- Confirm the run still renders.
- Open a tenantless run.
- Confirm the page renders with workspace-level framing and no tenant selection requirement.
- Open the same run from a notification-style or verification-surface
View runentry point with no selected tenant. - Confirm the canonical viewer still resolves the same run.
- Open a run linked to an onboarding, archived, or other tenant state already excluded from selector rules.
- Confirm the page remains viewable, lifecycle-aware messaging is shown, and tenant follow-up actions are reduced or absent without blocking the viewer.
- Open a canonical run for a tenant the current user is not entitled to.
- Confirm the response is deny-as-not-found.
- Open a run type that resolves a capability the current user lacks while workspace and tenant scope are otherwise valid.
- Confirm the response is forbidden.
Focused Test Command
vendor/bin/sail artisan test --compact \
tests/Feature/144/CanonicalOperationViewerContextMismatchTest.php \
tests/Feature/144/CanonicalOperationViewerDeepLinkTrustTest.php \
tests/Feature/Operations/TenantlessOperationRunViewerTest.php \
tests/Feature/OpsUx/OperateHubShellTest.php \
tests/Feature/Monitoring/OperationsTenantScopeTest.php \
tests/Feature/RunAuthorizationTenantIsolationTest.php \
tests/Feature/Filament/OperationRunEnterpriseDetailPageTest.php
Formatting
Run the required formatter after implementation changes:
vendor/bin/sail bin pint --dirty --format agent
Expected Outcome
- Canonical run viewing succeeds for authorized users regardless of remembered tenant context mismatch.
- Tenant-linked runs still enforce direct tenant entitlement.
- Tenantless runs and onboarding, archived, or otherwise selector-excluded tenant-linked runs remain viewable when authorized.
View rundeep links remain canonical and trustworthy across tenant, notification, verification, and monitoring surfaces.- Reduced or unavailable tenant follow-up actions do not invalidate the canonical viewer.