Repository navigation
Conversation
`fle cluster` executes fle/cluster/run-envs.sh directly, which fails on Windows with `OSError: [WinError 193] %1 is not a valid Win32 application`. On Windows the command now goes through the Python ClusterManager in fle/cluster/run_envs.py, the same manager `fle inspect-eval` already uses to auto-start servers. start/stop/restart/help are supported, with the same defaults (1 instance, default_lab_scenario) and validation (1-33 instances, known scenarios) as run-envs.sh. Linux and macOS keep using the script unchanged. Adds server-free unit tests with a stubbed ClusterManager. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Problem
On Windows,
fle cluster startcrashes before doing anything:fle_cluster()executesfle/cluster/run-envs.shdirectly, and Windows can't run a bash script that way.Fix
On Windows (
os.name == "nt"),fle clusternow uses the PythonClusterManagerinfle/cluster/run_envs.py. That's the same managerfle inspect-evalalready uses to auto-start servers. It supportsstart,stop,restartandhelp, with the same defaults asrun-envs.sh(1 instance,default_lab_scenario) and the same validation (1–33 instances,open_worldordefault_lab_scenario).Linux and macOS keep using
run-envs.shunchanged, so behaviour there doesn't change.Testing
tests/unit/test_cluster_cli.py(8 tests, no Docker or server needed). It stubsClusterManagerand checks that the script is never executed on Windows.fle cluster help,fle cluster stop,fle cluster start -n 1 -s open_world(the server comes up and FLE connects over RCON), andfle cluster start -s bogus(exits 1 with an error).pre-commit(ruff check and format) passes on the changed files.🤖 Generated with Claude Code