feat/047-inventory-foundations-nodes #52
Closed
ahmido
wants to merge 6 commits from
feat/047-inventory-foundations-nodes into dev
pull from: feat/047-inventory-foundations-nodes
merge into: ahmido:dev
ahmido:dev
ahmido:074-verification-checklist
ahmido:073-unified-managed-tenant-onboarding-wizard
ahmido:feat/072-managed-tenants-workspace-enforcement
ahmido:feat/999-merge-integration-session-1769990000
ahmido:069-tenant-onboarding-wizard-v2-session-1769905221
ahmido:069-managed-tenant-onboarding-wizard-session-1769903080
ahmido:068-workspaces-v2
ahmido:068-workspace-foundation-v1
ahmido:067-rbac-troubleshooting
ahmido:feat/066-rbac-ui-enforcement-helper-v2
ahmido:spec/066-rbac-ui-enforcement-helper-v2
ahmido:066-rbac-ui-enforcement-helper
ahmido:dev-session-1769637808
ahmido:065-tenant-rbac-v1
ahmido:dev-session-1769551498
ahmido:064-auth-structure
ahmido:063-entra-signin
ahmido:061-provider-foundation
ahmido:060-tag-badge-catalog
ahmido:059-unified-badges
ahmido:058-tenant-ui-polish
ahmido:feat/057-filament-v5-upgrade
ahmido:057-filament-v5-upgrade
ahmido:feat/053-unify-runs-monitoring
ahmido:feat/052-async-add-policies
ahmido:feat/044-drift-mvp
ahmido:051-entra-group-directory-cache
ahmido:feat/049-backup-restore-job-orchestration
ahmido:feat/048-backup-restore-ui-graph-safety
ahmido:feat/000-specify-deprecate
ahmido:feat/042-inventory-dependencies-graph
ahmido:046-inventory-sync-button
ahmido:feat/045-settingscatalog-classification
ahmido:fix/sail-node-modules-volume
ahmido:fix/pest-uses-cleanup
ahmido:feat/041-inventory-ui
ahmido:feat/040-inventory-core
ahmido:chore/docs-constitution-v1.1.0
ahmido:chore/solo-copilot-workflow
ahmido:feat/011-restore-run-wizard
ahmido:feat/011-restore-run-wizard-session-1767749508
ahmido:feat/011-restore-run-wizard-session-1767749319
ahmido:feat/032-backup-scheduling-mvp
ahmido:fix/032-manual-dispatch-unique-violation-session-1767604982
ahmido:feat/032-next-run-schedule-timezone-session-1767604322
ahmido:feat/032-backup-scheduling-mvp-session-1767583912
ahmido:feat/031-tenant-portfolio-context-switch
ahmido:feat/027-enrollment-config-subtypes
ahmido:feat/024-terms-and-conditions
ahmido:feat/026-custom-compliance-scripts
ahmido:spec/024-additional-intune-types
ahmido:feat/018-driver-updates-wufb
ahmido:feat/023-endpoint-security-restore-into-dev
ahmido:feat/023-endpoint-security-restore
ahmido:feat/017-policy-types-mam-endpoint-security-baselines
ahmido:016-backup-version-reuse
ahmido:015-policy-picker-ux
ahmido:014-enrollment-autopilot
ahmido:014-enrollment-autopilot-session-1767305003
ahmido:013-scripts-management
ahmido:feat/012-windows-update-rings
ahmido:feat/011-restore-run-wizard-session-1767185846
ahmido:feat/010-admin-templates
ahmido:feat/009-app-protection-policy
ahmido:feat/008-apps-app-management
ahmido:feat/007-device-config-compliance
ahmido:spec/007-008-workload-specs
ahmido:feat/005-bulk-operations
ahmido:feat/004-assignments-scope-tags
No reviewers
Labels
Clear labels
No items
No Label
Milestone
Clear milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Clear assignees
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
No dependencies set.
Reference: ahmido/TenantAtlas#52
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "feat/047-inventory-foundations-nodes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Dieses PR erweitert den Inventory-Sync um Foundation Nodes (Intune “Foundations”), damit Abhängigkeiten (Dependencies) lokal und deterministisch aufgelöst werden können – ohne UI-Graph-Lookups.
Kernidee: Foundations werden (optional) als InventoryItem-Rows gespeichert, damit Dependencies UI z.B. Scope Tags und Assignment Filters mit Namen anzeigen kann.
⸻
Scope / What’s included
Inventory Sync: Foundations als Inventory Items
• Foundations werden nur synchronisiert, wenn include_foundations=true.
• Foundations werden nicht gelöscht, wenn sie später nicht mehr gesehen werden → sie werden über last_seen_* implizit stale.
• Run-Counts sind deterministisch:
• include_foundations=true ⇒ items_observed_count/items_upserted_count beinhalten Foundations
• include_foundations=false ⇒ Counts enthalten nur Policies
Data minimization / Safety
• Foundation meta_jsonb bleibt sanitized:
• Invariant: meta_jsonb == InventoryMetaSanitizer::sanitize(meta_jsonb)
• Guard: json_encode(meta_jsonb) enthält kein Bearer / Token-Artefakte
UI: Inventory Sync Button / Toggles
• Inventory Sync UI enthält jetzt include_foundations Toggle (Default: true)
• (include_dependencies bleibt optional wie bisher)
Dependencies UI: DB-only Name Resolution (keine UI-Graph Calls)
• Dependencies UI löst Foundation-Targets nur via DB auf (z.B. Scope Tag / Assignment Filter)
• Entra Group Name Resolution bleibt out of scope (external groups bleiben maskiert, z.B. Group (external): abcd12…)
• Guardrail: Es existiert ein Test, der hart fehlschlägt, wenn beim UI-Rendering ein Graph Call erfolgt
⸻
Out of scope / Non-Goals
• Keine Entra /groups Lookups für Gruppennamen (separates “Group Inventory” Feature)
• Kein Purge/Hard-Delete von Foundation Inventory Items
• Kein UI-Polish/Redesign (Landingpage etc.) – bewusst getrennt
⸻
Tests & Verification
Ran locally
• ./vendor/bin/pint --dirty ✅
• ./vendor/bin/sail test tests/Feature/Inventory/InventorySyncServiceTest.php ✅
• ./vendor/bin/sail test tests/Feature/InventoryItemDependenciesTest.php ✅
• (falls vorhanden) ./vendor/bin/sail test tests/Feature/Filament/InventoryPagesTest.php ✅
Key test coverage
• include_foundations true/false (Upserts + Counts)
• meta_jsonb sanitizer equality + “Bearer ” guard
• FR-006 guard: UI rendering does not call GraphClientInterface
⸻
Manual UI testing (quick)
1. Inventory → Run Inventory Sync
• Run mit include_foundations=true
• Erwartung: Foundations erscheinen (Category “Foundations”), Dependencies zeigen Namen wo möglich
2. Run erneut mit include_foundations=false
• Erwartung: Foundations bleiben sichtbar (stale via last_seen), aber Run-Counts enthalten sie nicht
3. Open Inventory Item → Dependencies
• Erwartung: Scope Tags / Assignment Filters werden als Name oder “Unresolved (…)” angezeigt, externe Gruppen bleiben maskiert.
⸻
Notes
• Dieses PR ist “Spec-first” (Specs/Plan/Tasks/Checklist vorhanden und abgehakt).
• Keine neuen DB-Tabellen nötig; nutzt bestehende Inventory-Struktur und Sanitizer-Regeln.
“Already merged via #51 / already in dev”.
Pull request closed