You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #179/#185. With the packaged app starting on Windows, the next gap is the tools that shell out. I ran the backend suite on Windows 11: 18 failures, 453 passed. Most of them come from two tools.
What happens today
run_shell (openbot/tools/builtin/shell.py) runs bash -lc <command>. On Windows, bash on PATH is usually C:\Windows\System32\bash.exe, the WSL launcher.
Without a WSL distro every call fails: <3>WSL … execvpe(/bin/bash) failed: No such file or directory, reported as exit code: 1.
With a distro, the command silently runs inside WSL, with Linux tools, Linux paths and a different filesystem view than the rest of the app. That seems worse than failing.
The timeout/cancel path uses start_new_session=True + os.killpg, which don't exist on Windows.
patch_file with a diff input (openbot/tools/builtin/files.py) runs the external patch program, which Windows doesn't have. The result is FileNotFoundError: [WinError 2], 6 failures in test_patch_file.py.
Proposal (happy to implement it, but the shell choice is your call, since run_shell is the trust boundary CONTRIBUTING.md asks to discuss):
On Windows, resolve bash from Git for Windows: next to git.exe on PATH (…\Git\bin\bash.exe), then %ProgramFiles%\Git\bin\bash.exe. Explicitly skip %SystemRoot%\System32\bash.exe so commands never end up in WSL by accident. The tool description stays "bash", so prompts and head/grep habits keep working.
If no Git Bash is found, run_shell returns a clear error ("run_shell on Windows needs Git for Windows (bash); install it from https://git-scm.com") instead of the WSL relay error.
Timeout/cancel on Windows: start with CREATE_NEW_PROCESS_GROUP and end the tree with taskkill /pid <pid> /T /F. os.killpg stays on POSIX.
patch_file: use the patch.exe that ships with Git for Windows (…\Git\usr\bin\patch.exe), found the same way, with the same clear error if missing.
Alternatives I considered: running run_shell through PowerShell would change the tool's semantics and every prompt that assumes bash; deliberately using WSL would make the workspace paths differ between tools. Git Bash seems the least surprising, but I'd rather hear your preference before touching run_shell.
Three tests are portability issues in the tests themselves: path separators in test_validate_workspace_directory, ~/work in test_home_relative_core_web…, and 0o600 in test_key_is_generated_once_and_kept_private, since Windows has no POSIX modes. I left those alone for now.
Follow-up to #179/#185. With the packaged app starting on Windows, the next gap is the tools that shell out. I ran the backend suite on Windows 11: 18 failures, 453 passed. Most of them come from two tools.
What happens today
run_shell(openbot/tools/builtin/shell.py) runsbash -lc <command>. On Windows,bashonPATHis usuallyC:\Windows\System32\bash.exe, the WSL launcher.<3>WSL … execvpe(/bin/bash) failed: No such file or directory, reported asexit code: 1.start_new_session=True+os.killpg, which don't exist on Windows.test_run_shell*(3),test_runner(2),test_token_efficiency(3).patch_filewith a diff input (openbot/tools/builtin/files.py) runs the externalpatchprogram, which Windows doesn't have. The result isFileNotFoundError: [WinError 2], 6 failures intest_patch_file.py.Proposal (happy to implement it, but the shell choice is your call, since
run_shellis the trust boundary CONTRIBUTING.md asks to discuss):git.exeon PATH (…\Git\bin\bash.exe), then%ProgramFiles%\Git\bin\bash.exe. Explicitly skip%SystemRoot%\System32\bash.exeso commands never end up in WSL by accident. The tool description stays "bash", so prompts andhead/grephabits keep working.run_shellreturns a clear error ("run_shell on Windows needs Git for Windows (bash); install it from https://git-scm.com") instead of the WSL relay error.CREATE_NEW_PROCESS_GROUPand end the tree withtaskkill /pid <pid> /T /F.os.killpgstays on POSIX.patch_file: use thepatch.exethat ships with Git for Windows (…\Git\usr\bin\patch.exe), found the same way, with the same clear error if missing.Alternatives I considered: running
run_shellthrough PowerShell would change the tool's semantics and every prompt that assumes bash; deliberately using WSL would make the workspace paths differ between tools. Git Bash seems the least surprising, but I'd rather hear your preference before touchingrun_shell.The other failures are separate:
/api/...on Windows is fixed in fix: keep unknown API paths a 404 on Windows instead of serving the app shell #186.test_validate_workspace_directory,~/workintest_home_relative_core_web…, and0o600intest_key_is_generated_once_and_kept_private, since Windows has no POSIX modes. I left those alone for now.