Windows: stale uvicorn/fastapi dev server keeps answering on the same port, so new routes 404 and are missing from /docs
Symptom: a new route (e.g. GET /api/auth/me) returns 404 and is absent from /docs on localhost, but app.openapi() from a fresh import lists it. Cause: an older fastapi dev / uvicorn process is still listening on 127.0.0.1:8000. Windows allows a second process to bind the same port without error, and the OLD process keeps receiving requests while the new one starts fine and logs normal startup. Diagnose: netstat -ano | findstr :8000 (more than one LISTENING PID), then Get-CimInstance Win32_Process -Filter "ProcessId=<pid>" to see command line and CreationDate; compare curl localhost:8000/openapi.json paths against len(app.openapi()["paths"]) from a fresh python import. Fix: Stop-Process the old PID, confirm a single listener. Prevention: check the port is empty before starting. Also note fastapi dev never passes custom CLI flags, so a mode flag implemented in a separate serve entrypoint is silently skipped when started that way.