- Created StartupDAG class to orchestrate startup stages with explicit dependencies - Defined 6 startup stages: WORKER_MODE → DATABASE → GEO_CACHE → HTTP_SESSION → SCHEDULER → TASKS - Each stage has prerequisites, error handling, and rollback support - Refactored startup_shared_resources() to use the DAG - Added StartupContext for resource tracking and failure management - Partial failures automatically roll back all completed resources in reverse order - Added health checks to verify all resources initialized successfully - Comprehensive test coverage: 15 DAG unit tests + 3 integration tests + 6 existing tests - Documented startup DAG in Architekture.md with detailed stage descriptions and failure modes This replaces implicit ordering with explicit dependency tracking, making lifecycle changes safe and failure modes predictable. Hidden order dependencies no longer exist. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
14 KiB
14 KiB