TenantAtlas/specs/008-apps-app-management/plan.md
ahmido 47db966a19 feat: add metadata-only mobile app coverage with scope tag restore (#10)
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
2025-12-29 14:01:37 +00:00

27 lines
1.2 KiB
Markdown

# Implementation Plan: Apps (008)
**Branch**: `feat/008-apps-app-management`
**Date**: 2025-12-29
**Spec Source**: [spec.md](./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.type` family.
- Enforcing metadata-only snapshots during capture (contract-driven filtering).
- Adding targeted Pest tests for contracts + snapshot behavior.
## Execution Steps
1. Update `config/graph_contracts.php` for `mobileApp`:
- Add assignments list + assign action endpoints and payload key.
- Expand `type_family` using known app types.
2. Update `app/Services/Intune/PolicySnapshotService.php`:
- For metadata-only types, request/select and persist only metadata keys (even if Graph falls back).
3. Add/extend tests:
- `tests/Unit/GraphContractRegistryActualDataTest.php` for `mobileApp` contract coverage.
- `tests/Unit/PolicySnapshotServiceTest.php` for metadata-only filtering behavior.
4. Run formatting + tests:
- `./vendor/bin/pint --dirty`
- `./vendor/bin/sail artisan test tests/Unit/GraphContractRegistryActualDataTest.php tests/Unit/PolicySnapshotServiceTest.php`