Summary add mobileApp contract details (assignments, expanded type family, scope tag select) and spec/test coverage so App snapshots stay metadata-only yet still capture roleScopeTagIds. guard restores so scope tags are written back whenever a snapshot carries them, even without explicit foundation mappings, and document it via a new Filament restore test. keep existing restore/sync behaviors in place while ensuring mobileApp assignments and metadata continue to flow through the backup/restore pipeline. Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local> Reviewed-on: #10
1.2 KiB
1.2 KiB
Implementation Plan: Apps (008)
Branch: feat/008-apps-app-management
Date: 2025-12-29
Spec Source: spec.md
Summary
Make mobileApp reliable in the existing Policy/Backup/Restore flows by:
- Extending Graph contract registry with app assignment endpoints and a realistic
@odata.typefamily. - Enforcing metadata-only snapshots during capture (contract-driven filtering).
- Adding targeted Pest tests for contracts + snapshot behavior.
Execution Steps
- Update
config/graph_contracts.phpformobileApp:- Add assignments list + assign action endpoints and payload key.
- Expand
type_familyusing known app types.
- Update
app/Services/Intune/PolicySnapshotService.php:- For metadata-only types, request/select and persist only metadata keys (even if Graph falls back).
- Add/extend tests:
tests/Unit/GraphContractRegistryActualDataTest.phpformobileAppcontract coverage.tests/Unit/PolicySnapshotServiceTest.phpfor metadata-only filtering behavior.
- Run formatting + tests:
./vendor/bin/pint --dirty./vendor/bin/sail artisan test tests/Unit/GraphContractRegistryActualDataTest.php tests/Unit/PolicySnapshotServiceTest.php