fix: warn at boot when the event loop cannot spawn subprocesses - #311
Closed
mickyarun wants to merge 1 commit into
Closed
fix: warn at boot when the event loop cannot spawn subprocesses#311mickyarun wants to merge 1 commit into
mickyarun wants to merge 1 commit into
Conversation
A Windows evaluator ran the backend with 'uvicorn --reload', which forces a SelectorEventLoop. That loop cannot spawn subprocesses, so every git call, repository scan and CLI agent run raised NotImplementedError from inside a request — surfacing as a 500 the setup wizard reported as a problem with the path the user had typed. One evaluator went looking for a missing .git in a checkout that had one. Detect the condition once at startup and log a loud, actionable remedy (run 'python dev_server.py', or drop --reload), where the cause is still attributable. The detector references ProactorEventLoop through getattr because that class exists only on Windows; dotted access threw on the very platforms the guard has to stay quiet on. Two adjacent fixes carried along, same theme of a symptom pointing away from its cause: - The setup wizard appended a git-checkout hint to every add-path failure, including 5xx server errors that have nothing to do with the path. It now says so only when the backend actually rejected the path. - A zero-feature synthesis run raised a message hard-coding 'Claude' and asserting an MCP-registration failure it never checked. On a local- provider org both are wrong — a different agent ran, and it registers no MCP server at all. The message now names the provider that ran and quotes the agent's own final words. Signed-off-by: Arun Rajkumar <mickyarunr@gmail.com>
Owner
Author
|
Closing — the Windows NotImplementedError this addresses is already resolved for the client via run-command guidance (use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
On native Windows, running the backend with
uvicorn --reload(or--workers) forces aSelectorEventLoop, which cannot spawn subprocesses. Every git call, repository scan, and CLI agent run then raisesNotImplementedErrorfrom deep inside a request — surfacing as a 500 that the setup wizard blames on the path the user typed. A Windows evaluator was sent hunting for a missing.gitin a checkout that had one.This detects the condition once at startup and logs a loud, actionable remedy (run
python dev_server.py, or drop--reload) while the cause is still attributable — instead of letting it resurface later as a mislabelled input error.Notes
ProactorEventLoopthroughgetattrbecause that class exists only on Windows — dotted access threwAttributeErroron macOS/Linux, i.e. on exactly the platforms the guard must stay silent on. That was a real portability bug in the original draft; it's fixed and covered.CLAUDE.mdnow documentspython dev_server.pyas the run command, with the--reload-on-Windows caveat spelled out.Two adjacent fixes, same theme — a symptom pointing away from its cause
Gates
mypy --strict,ruff,vue-tscclean; 2545 backend tests pass, including new coverage for the event-loop detector (all branches) and the provider-named synthesis message.