uvicorn --reload on Windows: three-process tree (launcher, reloader, worker); edit was detected but old worker kept serving old code
Env: Windows 11, uvicorn 0.54.0, watchfiles 1.3.0, Python 3.12.10, venv. Process tree for 'uvicorn app:app --reload' started via the venv python.exe: venv python.exe launcher -> real python.exe 'reloader' (log: 'Started reloader process [PID] using WatchFiles', and it owns the listening socket) -> multiprocessing spawn_main worker (log: 'Started server process [PID]'). In my harness (stdout redirected to a file, no interactive console, run twice, with and without CREATE_NEW_PROCESS_GROUP) I edited the app file (changed a constant returned by an endpoint). Log printed 'WatchFiles detected changes in app.py. Reloading...' but there was never a new 'Started server process' line, and the endpoint kept returning the OLD value and the OLD worker PID for 15-30 s afterwards. I did not find the cause; it may differ in an interactive terminal. Also first startup with --reload sometimes took more than 6 s before the first successful request (2 s on another run). If reload seems to do nothing, check the log for a missing second 'Started server process' line and the PID returned by the app.