github alexgreensh/token-optimizer v5.11.48
v5.11.48 — Windows hook launcher (script-install) + test-coverage restore

3 hours ago

Windows hooks (Claude Code, script-install) + test-coverage restore

Windows hook launcher (script installs)

On Windows, Claude Code settings-hook commands now invoke Python directly (via subprocess.list2cmdline) instead of the POSIX bash for-loop + python-launcher.sh, eliminating the multi-second MSYS CreateProcess latency per hook. The POSIX (macOS/Linux) path is byte-for-byte unchanged — every Windows branch is gated on platform.system()=="Windows" / sys.platform=="win32".

  • _windows_hook_command + _windows_hook_command_is_stale
  • _resolve_hook_command Windows branch, HOOK_COMMAND win32 branch
  • setup_all_hooks ensure-health self-heal for legacy Git-Bash launchers

Note: this covers script installs. Marketplace/plugin installs (which run hooks.json's launcher directly) are addressed in a follow-up.

Reliability / tests

  • Restored the full test suite to green and closed a coverage gap: force-added 8 previously-untracked tests validating the Windows/Codex/Umbrel install surface (.gitignore had been silently dropping them).
  • runtime_env: warning-dedup registry is now exposed lazily (import is side-effect-free; strict POSIX invariance).
  • test_baseline_savings: asserts the honest net-negative main pool (issue #87 design — the headline stays gated/hidden), replacing a stale clamp-to-zero expectation.

Integrity

Savings-critical code untouched: content-based outsourcerer detection and the session quality filter are intact; no path-substring detection, no Path.lower().

Don't miss a new token-optimizer release

NewReleases is sending notifications on new releases.