- Default lifespan: use app.router for _DefaultLifespan (router has
_startup/_shutdown; FastAPI app does not).
- Wrapper: when app is FastAPI, set fastapi_app from app and pass
app.router to _run_lifespan_dependencies so lifespan deps are collected.
- Test: use only Request.receive() (Starlette Request has no .send).
Made-with: Cursor
- Fix _collect_lifespan_dependants: handle route-level flat.computed_scope
and iterate flat.dependencies (was incorrectly iterating flat)
- No pragmas on noop_receive/noop_send; covered by test that uses
Request.receive/send in a lifespan dependency
- Add test_collect_lifespan_dependants_route_level_scope for route-level
lifespan branch
- Add test_lifespan_dependency_synthetic_request_receive_send for
noop_receive/noop_send coverage
- Add test_lifespan_dependency_nested for dependency_cache hit (utils)
- Add test_lifespan_dependency_cannot_depend_on_request_scope and
test_lifespan_dependency_not_initialized_raises for edge cases
Made-with: Cursor