Implements Spec 081 provider-connection cutover. Highlights: - Adds provider connection resolution + gating for operations/verification. - Adds provider credential observer wiring. - Updates Filament tenant verify flow to block with next-steps when provider connection isn’t ready. - Adds spec docs under specs/081-provider-connection-cutover/ and extensive Spec081 test coverage. Tests: - vendor/bin/sail artisan test --compact tests/Feature/Filament/TenantSetupTest.php - Focused suites for ProviderConnections/Verification ran during implementation (see local logs). Co-authored-by: Ahmed Darrazi <ahmeddarrazi@MacBookPro.fritz.box> Reviewed-on: #98
49 lines
1.8 KiB
Markdown
49 lines
1.8 KiB
Markdown
# Quickstart: Provider Connection Full Cutover (Spec 081)
|
|
|
|
**Branch**: `081-provider-connection-cutover`
|
|
**Spec**: [specs/081-provider-connection-cutover/spec.md](spec.md)
|
|
|
|
This quickstart is for validating the cutover implementation once tasks are executed.
|
|
|
|
## Prerequisites
|
|
|
|
- Docker + Laravel Sail installed.
|
|
- App dependencies installed (`vendor/bin/sail composer install`).
|
|
|
|
## Run the backfill (Microsoft defaults)
|
|
|
|
Run the idempotent backfill command (introduced by this feature) to ensure each managed tenant has a Microsoft default provider connection:
|
|
|
|
- `vendor/bin/sail artisan tenantpilot:provider-connections:backfill-microsoft-defaults --no-interaction`
|
|
|
|
Expected behavior:
|
|
|
|
- Does not create duplicates when re-run.
|
|
- If exactly one Microsoft connection exists and none is default, sets it default.
|
|
- If multiple Microsoft connections exist and none default, does not auto-select (tenant remains blocked until admin remediation).
|
|
|
|
## Smoke test key flows
|
|
|
|
After backfill and cutover changes are in place:
|
|
|
|
- Start an inventory/policy sync for a tenant with a default Microsoft connection → should proceed and record `provider_connection_id` on the `OperationRun`.
|
|
- Start the same flow for a tenant missing default connection/credential → should create an `OperationRun` and end as blocked with a stable `reason_code` and link-only next steps.
|
|
|
|
## Run the focused tests
|
|
|
|
Run the minimal set of tests introduced/updated by this spec:
|
|
|
|
- `vendor/bin/sail artisan test --compact --filter=Spec081`
|
|
- `vendor/bin/sail artisan test --compact --filter=ProviderConnection`
|
|
- `vendor/bin/sail artisan test --compact --filter=OperationRun`
|
|
|
|
## Code style
|
|
|
|
- `vendor/bin/sail bin pint --dirty`
|
|
|
|
## Deployment note
|
|
|
|
If any Filament assets are registered/changed as part of the implementation, ensure deploy includes:
|
|
|
|
- `vendor/bin/sail artisan filament:assets`
|