Repository navigation
Tests: make unsloth_cli/tests/test_start.py pass on Windows - #15987
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…, interpreter launch head, path separators, chmod-only unwritable dirs)
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…p instead of a POSIX session
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
unsloth_cli/tests/test_start.pyhas 9 tests that fail on Windows on main. They only show up when a PR touchingunsloth startgets a Windows leg (first seen on the staging xplat run for #15865, which changes none of them), because the regular CI does not run this file on Windows. In each case the product does the right thing for Windows and the test encoded a POSIX-only expectation:test_write_codex_subagent_bridge_keeps_parent_credentials_out,test_write_codex_parent_overlay_preserves_user_state_and_instructionsassert (33206 & 63) == 0st_mode & 0o077is a POSIX promise; Windows reports0o666for any writable file, whateveros.open(..., 0o600)asked fortest_no_launch_last_line_is_self_contained,test_no_launch_claude_last_line_blanks_conflicting_authKeyError: 'CODEX_HOME', noANTHROPIC_API_KEY=NAME=value cmd; on Windows--no-launchprints PowerShell, which the neighbouringtest_no_launch_output_is_parseablealready skips fortest_start_studio_server_builds_command_and_waitsassert '-X' == 'run', thenstart_new_sessionisNonepython -X utf8 ..., #8490), sorunis notcmd[1], and it is detached withCREATE_NEW_PROCESS_GROUP, not a POSIX sessiontest_connect_pi_as_subagent_preserves_cloud_parent[False/True]'...\\unsloth_cli\\pi_subagent.ts'.endswith('unsloth_cli/pi_subagent.ts')test_session_config_falls_back_when_existing_temp_root_is_unwritable,..._when_studio_auth_root_is_unwritablemkdir(mode = 0o500)/chmod(0o500)do not make a directory unwritable on WindowsWhat changed
os.name == "nt" or ... & 0o077 == 0.runafter the interpreter head on Windows and checkscreationflags & CREATE_NEW_PROCESS_GROUPthere; on POSIX it still requirescmd[1] == "run"andstart_new_session=True.Path(command[2]).as_posix().Nothing changes on Linux or macOS except that comparison.
Verification
unsloth_cli/tests/test_start.py949 passed, 1 skipped.start.py's twoos.open(..., 0o600)calls changed to0o644, both credential tests fail on Linux, so the permission guard still bites where it means something.windows-latest): the first push fixed the two mode-bit tests and showed the other 7; the second left only the server test's detach check (919 passed, 1 failed); this push covers it, and the leg is re-running.