Skip to content

v0.13.0 — Windows support (Git-Bash baseline)

Choose a tag to compare

@Redtropig Redtropig released this 16 Jul 13:20
· 70 commits to main since this release
6694f05

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 incompatible find/sort/timeout lose to /usr/bin), portable mtime. Plugin-controlled formats (plugin.json version, cpp-detect output) parse even with ZERO engines — fixes the vunknown banner and C++-projects-typed-generic on Windows.
  • .gitattributes eol rules: every bash-consumed file checks out LF on all platforms (run-hook.cmd deliberately stays text=auto for the cmd/bash polyglot).
  • hooks/run-hook.cmd: %ProgramFiles%-based + user-scope Git discovery; WSL's System32\bash.exe excluded (hooks must see Windows paths).
  • C/C++ Windows counterpart mapping: sanitizer-build.sh.tpl turns detect_leaks off on MINGW*/MSYS*/CYGWIN* (LSan unsupported — same abort class as the v0.8.0 macOS incident); /sanitize reports TSan-on-Windows as INFRA-FAIL with substitutes; cpp-sanitizers gains Windows platform notes with a substitute-tool table (WSL2/Linux-CI TSan, Intel Inspector, Dr. Memory, CRT debug heap, UMDH, /RTC1); cpp-static-analysis gains 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.sh widen command -v python3 gates to the shared engine chain; the four duplicated escape_for_json copies collapse into ha_json_escape; hooks/stop staleness checks use mtime arithmetic instead of find -mmin (BSD/GNU/System32-neutral). Dev-surface scripts (validate-anchor / validate-manifests / measure-context) discover any python via ha_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