Problem
A full local test run on Windows fails 56 tests that all pass in CI (Linux). Verified identical on main — none are product regressions. They are test-environment assumptions, measured and classified:
| Class |
Representative tests |
Mechanism (measured) |
| POSIX permission bits |
test_save_agent_config_preserves_restrictive_file_mode |
NTFS has no rwx bits: os.chmod(0o600) only toggles the read-only flag and stat.S_IMODE reads 0o666 for any writable file, so == 0o600 can never pass on Windows |
| Directory fsync |
tests/core/test_audit.py (test_append_fsyncs_before_returning, fail-closed tests) |
the audit trail expects file + directory fsync (>= 2 fsync calls); Windows cannot os.open a directory for fsync, so only one fsync is observed |
| Symlink privileges |
tests/core/test_transfer.py::TestPackExtract::test_pack_dereferences_symlink_source |
WinError 1314: creating symlinks requires admin rights or Developer Mode; Path.symlink_to() fails outright on a normal account |
| POSIX path semantics |
TestValidateSpec (/tmp/...), tilde-user expansion, Downloads assumptions |
/tmp does not exist on Windows (local directory does not exist: \tmp); ~user expansion differs |
| tty/subprocess semantics |
tests/ui/test_node_shell.py, shell-fallback tests in test_app.py |
kubectl attach/exec flows assume POSIX terminal suspend/restore |
33 other tests already carry platform skip markers; these 56 are the remainder.
Why it matters
- Local development on Windows cannot use
pytest / --lf output as a signal: 56 permanent reds bury real regressions.
- Contributors on Windows may misattribute these failures to their changes (this cost an investigation cycle in practice).
Proposal
Two-track, because a blanket skip would weaken security-invariant coverage:
- Environment-limitation tests → platform markers. Symlink creation,
/tmp paths, ~user expansion, tty attach flows: pytest.mark.skipif(sys.platform == "win32", reason=...) (or a shared posix_only marker in conftest.py). These test POSIX behaviors korvid does not promise on Windows.
- Security-invariant tests → Windows-equivalent assertions, not skips. The audit fail-closed contract (design doc: if the audit entry cannot be written, the write is blocked) and the config file-mode restriction are invariants that must hold on Windows too:
- audit: assert the file fsync happens and that a failed append still blocks the write on Windows (directory-fsync expectation becomes POSIX-conditional);
- config mode: assert the POSIX bits on POSIX; on Windows assert what NTFS can express (e.g. the file is not world-readable via ACLs, or at minimum document the limitation explicitly in the test).
Acceptance criteria
Problem
A full local test run on Windows fails 56 tests that all pass in CI (Linux). Verified identical on
main— none are product regressions. They are test-environment assumptions, measured and classified:test_save_agent_config_preserves_restrictive_file_modeos.chmod(0o600)only toggles the read-only flag andstat.S_IMODEreads0o666for any writable file, so== 0o600can never pass on Windowstests/core/test_audit.py(test_append_fsyncs_before_returning, fail-closed tests)os.opena directory for fsync, so only one fsync is observedtests/core/test_transfer.py::TestPackExtract::test_pack_dereferences_symlink_sourceWinError 1314: creating symlinks requires admin rights or Developer Mode;Path.symlink_to()fails outright on a normal accountTestValidateSpec(/tmp/...), tilde-user expansion,Downloadsassumptions/tmpdoes not exist on Windows (local directory does not exist: \tmp);~userexpansion differstests/ui/test_node_shell.py, shell-fallback tests intest_app.py33 other tests already carry platform skip markers; these 56 are the remainder.
Why it matters
pytest/--lfoutput as a signal: 56 permanent reds bury real regressions.Proposal
Two-track, because a blanket skip would weaken security-invariant coverage:
/tmppaths,~userexpansion, tty attach flows:pytest.mark.skipif(sys.platform == "win32", reason=...)(or a sharedposix_onlymarker inconftest.py). These test POSIX behaviors korvid does not promise on Windows.Acceptance criteria
uv run pyteston a clean Windows checkout reports 0 unexpected failures (only pass/skip).