Commit Graph

7 Commits

Author SHA1 Message Date
Julius Brussee 783dbeafb5 fix(xplat): close Windows/macOS data-loss, encoding, and hook-budget gaps
Findings from a whole-repo cross-platform audit.

Data loss:
- evals/llm_run.py wrote the snapshot with write_text(ensure_ascii=False) and
  no encoding: on Windows that truncates results.json to 0 bytes, then raises
  at the first non-cp1252 char. Destroyed the committed snapshot and the run.
- compress.py read the user's target with errors="ignore", silently dropping
  undecodable bytes, backing up the mangled text, passing its own readback
  check, then overwriting the original. Now decodes strictly and refuses.

Broken on Windows:
- benchmarks/ and evals/ read SKILL.md, README.md and results.json without an
  encoding; all three raise on a cp1252 decode.
- cavemem's Python client used text=True with no encoding, so a non-ASCII
  memory failed to store and any recall came back mojibake.
- native-hook-fast spawned a second full Node process from inside a hook with
  no timeout at all.

Also fixed:
- Backported the pnpm cross-drive shim fix to the five copies that never got
  it; hoisted two inline parsers so all of them are unit-testable.
- portable-command now resolves through PATH/PATHEXT instead of silently
  no-op'ing on a bare command name.
- uninstall.ps1 writes a temp .js instead of node -e (matches install.ps1).
- Real backoff on the flag rename retry; EPERM/EBUSY retry when replacing a
  running binary.
- Hooks act on the first complete JSON payload instead of blocking on EOF;
  the stats child timeout drops below the host's hook budget.
- Statusline tests run the .ps1 on Windows instead of skipping.
- Added the macOS CI job the repo never had.

Left unfixed and annotated in place: the win32 hookCommand emits PowerShell
call-operator syntax while #835 describes the runner as git-bash /bin/sh.
Needs a real Windows host to settle; guessing would break whichever works.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NveRZs9mV97iX7HSgq3BYF
2026-08-20 04:14:48 +02:00
sebastianbreguel 64c4e2113f Switch eval plot to real boxplot with per-prompt distribution 2026-04-08 18:44:27 -04:00
sebastianbreguel 6588ad1e26 Flip eval plot to vertical orientation 2026-04-08 18:36:03 -04:00
sebastianbreguel 784df686b4 Switch eval plot to dot+whiskers (median, IQR, min/max) 2026-04-08 18:32:06 -04:00
sebastianbreguel 7de87db9e6 Reframe eval plot as 'tokens saved' stacked bars 2026-04-08 18:28:58 -04:00
sebastianbreguel 1254e714e6 Switch eval plot to plotly, more intuitive horizontal layout 2026-04-08 18:26:08 -04:00
sebastianbreguel 6391a702b7 Add bar chart of skill compression with median/mean/range 2026-04-08 18:24:28 -04:00