Summary
Three lightweight GC/performance audit commands fail on a supported Windows development host before they can evaluate repository state:
python scripts/gc_runtime_root_holders.py --self-test # exit 1
python scripts/gc_runtime_root_holders.py # exit 1
python scripts/check_thread_locals.py # exit 1
python benchmarks/gc_ratchet/gc_ratchet.py validate --scope structural
# ModuleNotFoundError: No module named 'resource'
The first two scanners build repository-relative keys with str(Path.relative_to(...)), which produces backslashes on Windows. Their checked-in inventories/allowlists and synthetic self-test expectations use forward-slash repository paths. Consequently every real declaration appears new and every checked-in entry appears stale; the root-holder self-test also reports every planted fixture as missed.
gc_ratchet.py imports the Unix-only resource module at module import time even though it is unused (peak RSS uses os.wait4) and validate --scope structural does not launch a measured process. Structural artifact validation should not require a Unix process API.
Impact
- Windows developers cannot run two fast gates that protect GC root coverage and hot-TLS policy.
- The ratchet's cheap structural validation cannot run before a heavy build on Windows, despite the harness explicitly separating platform-independent validation from measurement.
- This makes local preflight weaker on a platform Perry advertises and runs in GC native-root CI.
Evidence
Acceptance criteria
- Normalize all repository-relative identity keys with
Path.as_posix() (including call-graph/module-edge keys and synthetic fixture expectations).
- Both scanners'
--self-test and live verify modes pass on Windows and Unix.
- Remove the unused
resource import or defer any genuinely Unix-only import to the measurement path with a clear platform refusal.
gc_ratchet.py validate --scope structural and harness unit tests run on Windows without compiling Perry.
- Add a Windows CI step for these structural/self-test commands; it should not run the heavy ratchet measurement.
Summary
Three lightweight GC/performance audit commands fail on a supported Windows development host before they can evaluate repository state:
The first two scanners build repository-relative keys with
str(Path.relative_to(...)), which produces backslashes on Windows. Their checked-in inventories/allowlists and synthetic self-test expectations use forward-slash repository paths. Consequently every real declaration appears new and every checked-in entry appears stale; the root-holder self-test also reports every planted fixture as missed.gc_ratchet.pyimports the Unix-onlyresourcemodule at module import time even though it is unused (peak RSS usesos.wait4) andvalidate --scope structuraldoes not launch a measured process. Structural artifact validation should not require a Unix process API.Impact
Evidence
check_thread_locals.pyconverts relative paths with platform-native separators and again in the live scangc_runtime_root_holders.pydoes the same for inventory keysgc_ratchet.pyimportsresourceunconditionally, while its runner documents and usesos.wait4instead.Acceptance criteria
Path.as_posix()(including call-graph/module-edge keys and synthetic fixture expectations).--self-testand live verify modes pass on Windows and Unix.resourceimport or defer any genuinely Unix-only import to the measurement path with a clear platform refusal.gc_ratchet.py validate --scope structuraland harness unit tests run on Windows without compiling Perry.