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
Several unit tests for portable behavior fail on Windows because their fixtures or assertions depend on POSIX semantics or excessively long pytest temporary paths. These failures prevent a useful Windows unit-test baseline and can obscure genuine regressions.
The failures below are test portability defects. They should not be reported as evidence that Windows authorization, subprocess cleanup, or default host installation is broken.
Steps to reproduce
On Windows at master 80d618bd61432d1bb4eae85433fa22f2bbd50bce, with development dependencies installed, run these existing nodes through uv run pytest -q:
A launchd/POSIX mode check runs on Windows, where the implementation deliberately does not apply POSIX permission bits.
The first seven nodes and the parameterized retry-state test reproduced 8 failures and 1 platform skip in an unmodified checkout.
Also run these nodes with pytest's default temporary root on a Windows machine where long-path support is disabled:
uv run pytest -q tests/test_cli_workbuddy.py::test_setup_workbuddy_remote_checkout_refreshes_the_requested_ref tests/test_opencode_cli.py::test_remote_checkout_cache_is_scoped_by_source_and_resolved_commit tests/test_opencode_cli.py::test_remote_checkout_refresh_failure_keeps_previous_commit
The default user temporary path, pytest's descriptive directory names, nested cache layout, and backup UUIDs can exceed the traditional path limit. In the same environment, all three tests pass with a sufficiently short, unused --basetemp root, such as D:\pc-win-audit-tests.
Expected behavior
Portable byte-preservation tests use explicit input bytes/newlines and compare against those inputs. They retain exact snapshot guarantees.
POSIX-only permission or execution-mode assertions are scoped to the applicable platform; archive metadata tests can use explicit ZIP mode metadata. Windows ACL claims require Windows-specific evidence rather than POSIX mode bits.
Subprocess fixtures are executable on their target platform, and process-exit assertions use the appropriate Windows semantics without weakening the cleanup guarantee.
Test temporary paths leave room for staging and backup names, including on systems without long-path support.
Windows regression coverage protects these corrected behaviors. Keep genuine unsupported-platform checks explicit.
Actual behavior
Observed failures include CRLF-versus-LF byte mismatches, mode 0644 versus 0755, 0666 versus 0600, WinError 193 for the fake executable, WinError 87 in the exited-process assertion, and failures to create/rename/remove overlong fixture paths. None of those observations alone establishes a product security or data-integrity defect.
The Python 3.11–3.14 matrix in Main runs on Ubuntu. The Windows job in Native personal service covers selected cursor and service lifecycle scenarios, so it does not catch these unit-test assumptions.
The python3/WindowsApps failure is also excluded: the unchanged helper test passed after supplying an actual python3 command in a temporary environment.
No open issue or PR was found fixing the remaining cases listed above.
AI assistance: OpenAI Codex assisted with reproduction, platform classification, duplicate checking, and this report.
Describe the bug
Several unit tests for portable behavior fail on Windows because their fixtures or assertions depend on POSIX semantics or excessively long pytest temporary paths. These failures prevent a useful Windows unit-test baseline and can obscure genuine regressions.
The failures below are test portability defects. They should not be reported as evidence that Windows authorization, subprocess cleanup, or default host installation is broken.
Steps to reproduce
On Windows at master
80d618bd61432d1bb4eae85433fa22f2bbd50bce, with development dependencies installed, run these existing nodes throughuv run pytest -q:tests/builtin/artifacts/skill/test_package.py::test_directory_package_round_trips_exact_files_and_executable_modewrite_text(), but asserts archived LF bytes; it also expects POSIX executable bits.tests/builtin/runtime/test_external_skills.py::test_explicit_external_skill_import_captures_exact_snapshot_and_enters_reviewchmod(0755)on a Windows fixture is assumed to provide POSIX executable metadata.tests/test_cli.py::test_remote_enroll_can_install_automatic_service_in_one_commandst_modeis compared directly to POSIX0600.tests/test_openclaw_cli.py::test_build_openclaw_plugin_runs_pnpm_install_non_interactivelypnpmexecutable is a shebang script without a Windows launcher.tests/test_opencode_cli.py::test_run_opencode_probe_executes_request_waits_for_nonce_and_stops_process_assert_process_stopped()treatsos.kill(pid, 0)as a POSIX liveness check and catches onlyProcessLookupError.tests/test_opencode_cli.py::test_run_opencode_probe_handles_process_exit_and_stops_processtests/test_opencode_cli.py::test_run_opencode_probe_times_out_and_stops_processtests/test_service_bootstrap.py::test_unsafe_retry_state_exits_nonzero_and_removes_token[group-readable]The first seven nodes and the parameterized retry-state test reproduced 8 failures and 1 platform skip in an unmodified checkout.
Also run these nodes with pytest's default temporary root on a Windows machine where long-path support is disabled:
The default user temporary path, pytest's descriptive directory names, nested cache layout, and backup UUIDs can exceed the traditional path limit. In the same environment, all three tests pass with a sufficiently short, unused
--basetemproot, such asD:\pc-win-audit-tests.Expected behavior
Actual behavior
Observed failures include CRLF-versus-LF byte mismatches, mode
0644versus0755,0666versus0600,WinError 193for the fake executable,WinError 87in the exited-process assertion, and failures to create/rename/remove overlong fixture paths. None of those observations alone establishes a product security or data-integrity defect.The Python 3.11–3.14 matrix in Main runs on Ubuntu. The Windows job in Native personal service covers selected cursor and service lifecycle scenarios, so it does not catch these unit-test assumptions.
Environment
80d618bd61432d1bb4eae85433fa22f2bbd50bce.LongPathsEnabled=0.python3/WindowsApps failure is also excluded: the unchanged helper test passed after supplying an actualpython3command in a temporary environment.Are you willing to submit a PR to fix this bug?