feat/048-backup-restore-ui-graph-safety #55

Merged
ahmido merged 4 commits from feat/048-backup-restore-ui-graph-safety into dev 2026-01-11 00:14:35 +00:00
Owner

Feature 048: Backup/Restore UI Graph-Safety (Phase 1)

Dieses PR entfernt Microsoft Graph Calls aus UI-Renderpfaden (Filament/Livewire mount/render/options/typeahead/labels) in den kritischen Backup/Restore Screens und fügt Fail-Hard Guard Tests hinzu, die regressionssicher verhindern, dass UI-Rendering wieder Graph aufruft.

Motivation

Backup/Restore UI wurde teilweise “fragil”, weil UI-Komponenten (z.B. Group Typeahead/Option Labels) Graph/Entra direkt beim Rendern triggern konnten. Das führt zu:
• langsamen/unstabilen Seiten (429/Timeout/Permissions)
• schwer reproduzierbaren UI-Fehlern im MSP-Scale
• unnötiger Kopplung von “Page render” an Graph-Verfügbarkeit

Ziel: UI muss DB-only rendern; Graph darf nur in Jobs/Run-Execution stattfinden.

Scope / Changes

  1. Restore Wizard: Entfernt Graph-Typeahead & Label-Resolution
    • Group Mapping ist jetzt DB-only:
    • manuelle GUID Eingabe / Skip
    • GUID Validation
    • Helper Text, wo die Object ID zu finden ist
    • Keine Graph calls mehr in options() / getOptionLabelUsing() / typeahead beim Rendern.

  2. Fail-Hard Guard Tests (Graph-Safety)
    • Neue Test-Infrastruktur: FailHardGraphClient (GraphClientInterface darf nicht aufgerufen werden)
    • Guard Tests als Pest Feature Tests (HTTP GET):
    • Backup Sets Index rendert mit fail-hard Graph client
    • Restore Wizard Route rendert mit fail-hard Graph client
    • Assertions:
    • 200 OK
    • plus stable UI marker string
    • Masking/Fallback Format ist deterministisch: Unresolved (…)

  3. Spec/Plan/Tasks/Checklist
    • Spec 048 aktualisiert, Tasks abgehakt
    • requirements.md Checklist Gate: PASS

Out of Scope / Non-Goals
• Kein Umbau der “Execution”-Actions zu Jobs (Capture snapshot, Restore rerun, Dry-Run execution etc.) → eigener Folge-Spec (Phase 2).
• Keine Entra Group Name Resolution (separates Group-Inventory/Cache Feature).
• Keine neuen Tabellen/Migrations in Phase 1.

How to verify (manual)

Mit absichtlich kaputtem Tenant/Auth (Graph failt):
1. Öffne Backups & Restore → Backup Sets
muss laden (UI render DB-only)
2. Öffne Restore Runs → Create Restore Run (Wizard)
muss laden, kein Group-Typeahead mehr
3. Starte eine Restore Operation
darf fehlschlagen (Graph kaputt) – wichtig ist: Render bleibt stabil, Run zeigt Fehler sauber pro Item.

Tests / Validation

Executed:
• ./vendor/bin/pint --dirty
• ./vendor/bin/sail artisan test tests/Feature/Filament/BackupSetGraphSafetyTest.php tests/Feature/Filament/RestoreWizardGraphSafetyTest.php
• (optional) Combined targeted suite

Notes
• This PR intentionally focuses on UI Graph-Safety only.
• Any future reintroduction of Graph search/typeahead in UI must go through contracts first and be executed asynchronously, never in UI render paths.

Feature 048: Backup/Restore UI Graph-Safety (Phase 1) Dieses PR entfernt Microsoft Graph Calls aus UI-Renderpfaden (Filament/Livewire mount/render/options/typeahead/labels) in den kritischen Backup/Restore Screens und fügt Fail-Hard Guard Tests hinzu, die regressionssicher verhindern, dass UI-Rendering wieder Graph aufruft. ⸻ Motivation Backup/Restore UI wurde teilweise “fragil”, weil UI-Komponenten (z.B. Group Typeahead/Option Labels) Graph/Entra direkt beim Rendern triggern konnten. Das führt zu: • langsamen/unstabilen Seiten (429/Timeout/Permissions) • schwer reproduzierbaren UI-Fehlern im MSP-Scale • unnötiger Kopplung von “Page render” an Graph-Verfügbarkeit Ziel: UI muss DB-only rendern; Graph darf nur in Jobs/Run-Execution stattfinden. ⸻ Scope / Changes 1) Restore Wizard: Entfernt Graph-Typeahead & Label-Resolution • Group Mapping ist jetzt DB-only: • manuelle GUID Eingabe / Skip • GUID Validation • Helper Text, wo die Object ID zu finden ist • Keine Graph calls mehr in options() / getOptionLabelUsing() / typeahead beim Rendern. 2) Fail-Hard Guard Tests (Graph-Safety) • Neue Test-Infrastruktur: FailHardGraphClient (GraphClientInterface darf nicht aufgerufen werden) • Guard Tests als Pest Feature Tests (HTTP GET): • Backup Sets Index rendert mit fail-hard Graph client • Restore Wizard Route rendert mit fail-hard Graph client • Assertions: • 200 OK • plus stable UI marker string • Masking/Fallback Format ist deterministisch: Unresolved (…<last8>) 3) Spec/Plan/Tasks/Checklist • Spec 048 aktualisiert, Tasks abgehakt • requirements.md Checklist Gate: PASS ⸻ Out of Scope / Non-Goals • Kein Umbau der “Execution”-Actions zu Jobs (Capture snapshot, Restore rerun, Dry-Run execution etc.) → eigener Folge-Spec (Phase 2). • Keine Entra Group Name Resolution (separates Group-Inventory/Cache Feature). • Keine neuen Tabellen/Migrations in Phase 1. ⸻ How to verify (manual) Mit absichtlich kaputtem Tenant/Auth (Graph failt): 1. Öffne Backups & Restore → Backup Sets ✅ muss laden (UI render DB-only) 2. Öffne Restore Runs → Create Restore Run (Wizard) ✅ muss laden, kein Group-Typeahead mehr 3. Starte eine Restore Operation ❌ darf fehlschlagen (Graph kaputt) – wichtig ist: Render bleibt stabil, Run zeigt Fehler sauber pro Item. ⸻ Tests / Validation Executed: • ./vendor/bin/pint --dirty ✅ • ./vendor/bin/sail artisan test tests/Feature/Filament/BackupSetGraphSafetyTest.php tests/Feature/Filament/RestoreWizardGraphSafetyTest.php ✅ • (optional) Combined targeted suite ✅ ⸻ Notes • This PR intentionally focuses on UI Graph-Safety only. • Any future reintroduction of Graph search/typeahead in UI must go through contracts first and be executed asynchronously, never in UI render paths.
ahmido added 3 commits 2026-01-11 00:10:48 +00:00
Add fail-hard Graph guard tests for Backup Sets index + Restore wizard create, and refactor restore group mapping to be DB-only with masked fallback labels.
ahmido added 1 commit 2026-01-11 00:12:00 +00:00
ahmido merged commit 060a82a1ed into dev 2026-01-11 00:14:35 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
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#55
No description provided.