v0.13.0 — Windows support (Git-Bash baseline)
Until now the hooks assumed a Unix world: a python3 on PATH, /-rooted walk-up loops, LF checkouts, and a find/sort/timeout that behave like GNU's. On Windows every one of those assumptions broke somewhere — the banner reported vunknown, C++ projects were typed generic, and a drive-letter path could spin a root-walk until the 5s watchdog killed it. v0.13.0 makes Git Bash a supported surface (design invariant #10): one shared platform layer, honest degradation when no JSON engine exists, and a windows-latest CI arm so it stays that way. All warn-only, zero new runtime dependencies.
Added
- Windows support (Git-Bash baseline).
scripts/lib/portable.sh— shared platform layer sourced by all four hooks and runtime scripts: JSON engine chain (python3 → python → py -3 → node → narrow pure-bash) with run-validated detection (immune to the Windows-Store python stub),C:\path normalization at hook entry, fixed-point project-root walk (the old!= "/"loop spun the 5s watchdog on drive-letter paths), Windows PATH shield (System32's incompatiblefind/sort/timeoutlose to/usr/bin), portable mtime. Plugin-controlled formats (plugin.json version, cpp-detect output) parse even with ZERO engines — fixes thevunknownbanner and C++-projects-typed-genericon Windows. .gitattributeseol rules: every bash-consumed file checks out LF on all platforms (run-hook.cmddeliberately staystext=autofor the cmd/bash polyglot).hooks/run-hook.cmd:%ProgramFiles%-based + user-scope Git discovery; WSL'sSystem32\bash.exeexcluded (hooks must see Windows paths).- C/C++ Windows counterpart mapping:
sanitizer-build.sh.tplturnsdetect_leaksoff on MINGW*/MSYS*/CYGWIN* (LSan unsupported — same abort class as the v0.8.0 macOS incident);/sanitizereports TSan-on-Windows as INFRA-FAIL with substitutes;cpp-sanitizersgains Windows platform notes with a substitute-tool table (WSL2/Linux-CI TSan, Intel Inspector, Dr. Memory, CRT debug heap, UMDH,/RTC1);cpp-static-analysisgains Windows compile_commands/driver-mode notes. tests/windows-compat.sh— static Windows invariants on every platform; new contract tests:session-start-engine-degradation.sh,post-tool-use-windows-paths.sh(Windows path bugs are string bugs — Linux CI catches them); windows-latest CI arm (curated core subset).
Changed
- Hooks and
status-report.sh/session-end-precheck.shwidencommand -v python3gates to the shared engine chain; the four duplicatedescape_for_jsoncopies collapse intoha_json_escape;hooks/stopstaleness checks use mtime arithmetic instead offind -mmin(BSD/GNU/System32-neutral). Dev-surface scripts (validate-anchor / validate-manifests / measure-context) discover any python viaha_python; the test suite SKIPs honestly (visible, never silent) where an assert's engine is missing. CLAUDE.md gains design invariant #10 (Windows surface).
Verification: full suite green on Windows 11 / MINGW64 (13 hook-contract + 13 unit + windows-compat + posix-compat, 0 FAIL) and on all three CI arms — the first-ever windows-latest run passed in 2m38s (PR #15, 9/9 checks).
Full Changelog: v0.12.0...v0.13.0