Repository navigation
Description
Observed CI failure
The native Windows ARM64 job fails in Check native Windows process supervision, before later unit/frontend, artifact-publication and executor checks run:
- Latest master job, 386795668a74bf734a13bd6e03d3d172d259d808
- PR #675 job
- The same failure already appears in the master run after #666.
ERROR: test_validate_compiler_checks_launchable_on_posix
tools/test_check_case_sources.py:141
checker.validate_compiler(fake_wavec)
tools/check_case_sources.py:43
raw = Path(raw_str)
NotImplementedError: cannot instantiate 'PosixPath' on your system
Ran 28 tests ... FAILED (errors=1)
Host: native Windows ARM64, Python 3.11.9. These tests do not require compiling Wave.
Cause and reproduction
The test patches checker.os.name to posix. This mutates the shared os module, including the platform value observed by pathlib.Path. The path created before the patch is converted to a string and reconstructed inside validate_compiler, selecting an unsupported concrete path class before the intended launchability check is reached.
Run on native Windows with the CI Python version:
python -m unittest tools.test_check_case_sources.SourceCheckTests.test_validate_compiler_checks_launchable_on_posixThe adjacent Windows-policy test also patches shared os.name; inspect both directions so a fix does not merely move the incompatibility to POSIX hosts or another supported Python version.
Scope and acceptance
Difficulty: easy; suitable for a first contribution. Isolate the platform-policy dependency used by the checker/test instead of changing the platform seen by unrelated standard-library modules. A module-local fake or a narrowly scoped policy helper is sufficient; no compiler/platform redesign is needed.
- Both POSIX and Windows launchability-policy tests reach their intended PermissionError assertions on Windows and POSIX hosts.
- Keep real native filesystem paths for existence/regular-file checks; do not replace the production path validation with a success stub.
- Preserve early rejection, structured report behavior, and the assertion that no source-check subprocess runs for an unusable compiler.
- Run
python -m unittest tools.test_check_case_sourceson native Windows ARM64 and a POSIX host, including the Python versions configured in CI. - Do not disable the test, mark it expected-failure, or remove the process-supervision gate.
Follow-up to #655/#666's early compiler validation. This is independent of the MSVC frontend target-selection failure #669 and the earlier native I/O failure #635.
Activity
fix: resolve native CI regressions and preserve independent checks (#686