Repository navigation
fix(controller): fail fast for local runner on native Windows - #583
Merged
Zhiyuan He (hzy46) merged 1 commit intoSep 2, 2026
Merged
Zhiyuan He (hzy46) merged 1 commit into
Zhiyuan He (hzy46) merged 1 commit into
Conversation
Raise a clear unsupported-platform error from LocalReconciler.run() on native Windows before any rollout is queried or a worker is spawned. Add regression tests for both paths and document the constraint and the WSL alternative. Closes microsoft#578
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation, tests, and documentation consistently satisfy the stated platform contract.
Pull request overview
Adds an early native-Windows guard for the POSIX-dependent local runner.
Changes:
- Rejects local-runner startup on native Windows with actionable guidance.
- Adds regression coverage for unsupported and supported platforms.
- Documents the limitation and WSL alternative.
File summaries
| File | Description |
|---|---|
agentlightning/controller/local_reconciler.py |
Adds the startup platform check. |
tests/controller/test_local_reconciler_platform.py |
Tests rejection and normal execution paths. |
docs/30-controller-configuration.md |
Documents local-runner platform support. |
docs/01-quick-start.md |
Warns Windows quick-start users. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Zhiyuan He (hzy46)
enabled auto-merge (squash)
September 2, 2026 04:46
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.
Closes #578
Summary
LocalReconciler.run()now raises a clear unsupported-platformRuntimeErroron native Windows before it queries rollouts, spawns a worker, or enters shutdown.Problem
The local runner relies on POSIX process-group semantics: workers are spawned with
start_new_session=Trueand cleaned up withos.killpg(). On native Windowsos.killpgdoes not exist, so a timed-out rollout or a controller shutdown raisedAttributeErrorfrom the cleanup path after the worker had already been spawned, and the rollout was never patched to its intended failed state.Per the discussion in #578, native Windows is not a maintained platform for the local runner. This PR therefore does not attempt Windows process-tree cleanup. It makes the unsupported configuration fail at startup with an actionable message instead of failing later inside cleanup.
What changed
agentlightning/controller/local_reconciler.py: add_is_native_windows()(os.name == 'nt', so WSL is unaffected) and check it at the top ofrun(). Construction, package import, andrunner_type=k8sare unchanged.tests/controller/test_local_reconciler_platform.py: on native Windows,run()raises and neither_reconcile_loop,_shutdown, nor any clientget/patchcall is awaited; on a supported platform,run()still reconciles and shuts down.docs/30-controller-configuration.md: add a platform-support note under Local runner limits.docs/01-quick-start.md: add an early pointer to that note, since the quick start usesrunner_type=local.Not changed: the
Operating System :: OS Independentclassifier. The package remains importable and other runner types remain available on Windows; only the local subprocess runner is rejected. This PR does not claim Windows support for the local runner.Verification
python -m agentlightning.controller runner_type=local agl_server.url=http://127.0.0.1:9exits with code 1 and printsRuntimeError: runner_type=local is not supported on native Windows; use Linux (for example, WSL) instead.No request reaches the server before the error.uv run --locked --no-sync pytest -q tests/controller- 9 passeduv run --locked --no-sync pytest -q tests --ignore=tests/verl- 66 passed (thetests/verlmodules need theverl-cpugroup, which is not installed locally; no VERL code is touched)ruff check .andruff format --check .- cleanpre-commit run --all-filesandpython scripts/check_headers.py- passedpyright --pythonplatform Linuxon the changed files - 0 errors. On a Windows host, pyright reports the pre-existingos.killpg/signal.SIGKILLstubs at the cleanup site; the same findings exist onmain.mkdocs build --strict- passed; the#local-runner-limitsanchor resolvesuv build --no-sources- sdist and wheel built