fix(cli): report backend readiness after startup
KR
18d ago+301+301+012345678901234567890123456789-10-10-01234567890123456789
Summary
Fixes #7252.
The dev CLI could report a running backend after its worker failed to import the app. Granian readiness now follows successful ASGI lifespan startup.
What changed
- Report unexpected worker exits while preserving recovery after file changes.
- Report frontend readiness separately from backend startup.
- Accept both frontend message formats in reflex-bench.
- Cover import failures, lifespan failures, delayed startup and repeated recovery with real workers.
Verification
- Full unit suite: 11,196 passed, 155 skipped; 79.04% coverage.
- Repository Ruff checks, formatting and Pyright passed. Changed-file pre-commit hooks passed.
- Real backend-only and combined Reflex CLI runs recovered from import failures. The benchmark driver waited for recovery; frontend HTTP and backend
/pingreturned 200. All test processes were stopped.
Deployment notes
Tools parsing Granian dev logs should recognize Frontend running at: for the frontend URL and wait for Backend running at: for backend startup. Production and legacy Uvicorn messages are unchanged.