b35e3a6518
spec: refine 048 guardrails ( #54 )
...
Summary
Dieses PR führt Spec 048: Backup/Restore UI Graph-Safety ein.
Ziel: Backup/Restore-Screens in Filament sollen stabil und skalierbar bleiben, indem keine Microsoft Graph Calls beim UI-Rendern (mount/render/options/typeahead/labels) stattfinden. Stattdessen: DB-only Render + klare Fallbacks + Guard-Tests, die jede versehentliche UI-Graph-Nutzung sofort brechen.
⸻
Motivation / Problem
Im aktuellen Stand rutschen Graph Calls gerne in:
• Restore Wizard Group-Typeahead / getOptionLabelUsing (Graph /groups)
• “Preview/Dry-Run” oder Label-Resolution im UI-Request
Das führt zu:
• langsamen/fragilen Pages (429/Timeout/Permissions)
• schwerer Debugbarkeit im MSP-Scale
• unerwarteten Abhängigkeiten vom Graph in reinen UI-Views
⸻
Scope (Phase 1, MVP)
In scope
• UI Render DB-only: Keine Graph Calls in Filament Render-Pfaden (Backup + Restore)
• Fallback Labels für unresolved IDs:
• Format: Unresolved (…<last8>)
• Group Mapping UX (DB-only):
• manuelle GUID Eingabe
• GUID Validation
• Helper-Text, wo Admins die Object ID finden
• kein Graph-Search/typeahead
• Fail-hard Guard Tests als Pest Feature Tests (HTTP GET):
• Render Backup Sets Index
• Render Restore Wizard
• Tests assert: 200 OK + stable marker string
Out of scope
• Job-Orchestration Refactor (Actions wie “Capture snapshot”, “Rerun restore”, “dry-run execution”) → separater Spec/Feature
• Entra Group Name Resolution (Group Inventory / Cache) → separater Modul-Scope
⸻
Deliverables
• spec.md, plan.md, tasks.md
• checklists/requirements.md (constitution gate)
• Klar definierte Marker-Regeln für Guard-Tests (statische Headings, keine dynamischen Row-Werte)
⸻
Success Criteria
• Guard-Tests schlagen zuverlässig fehl, sobald ein UI-Render Pfad Graph aufruft.
• Restore Wizard bleibt bedienbar ohne Graph-Typeahead (GUID manual entry + Validation).
• Keine DB-Migrations in dieser Phase.
⸻
Next Step
Nach Review/Merge dieses Specs:
1. Implementation gemäß tasks.md (Remove UI Graph calls + Guard Tests)
2. Targeted Tests + Pint
3. Erst danach optional: eigener Spec für “job-based orchestration” (queued preview/execution)
Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local>
Reviewed-on: #54
2026-01-10 23:37:22 +00:00