Task · MDE-0036

Prove background startup failures reach health state through lifespan

Description

Wave 3 found no test that drives the lifespan-created startup task through _on_startup_task_done after collect_initial raises StartupConfigurationError. A callback regression could leave health green while startup collection has failed.

Acceptance Criteria

Definition of Done

Implementation Plan

Exercise the real lifespan-created startup task with a delayed StartupConfigurationError and assert the callback records it for the health endpoint.

Implementation Notes

A real lifespan test now lets the background startup task fail after yield, proves the callback retains StartupConfigurationError, proves the dead-man switch trips, and verifies GET /health returns 503. Integrated gate: 2827 passed.

Final Summary

Added the missing lifespan/background-task health contract; post-yield startup configuration failure is proven to return HTTP 503.

View the source file on GitHub