Skip to content

fix: make prefix mode work on Windows - #119

Merged
hyldmo merged 10 commits into
mainfrom
hyldmo/verify-numux-windows
Sep 11, 2026
Merged

hyldmo merged 10 commits into
mainfrom
hyldmo/verify-numux-windows

Conversation

@hyldmo

@hyldmo hyldmo commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Proves numux --prefix on Windows for parallel verify-style DAGs and fixes everything found.

What was broken (each proven on a windows-2025 runner)

  1. bun run docs crashed: Windows checks out CRLF, the marker regex expects LF (Marker not found: subcommands).
  2. Segfault at startup: static import of ghostty-opentui native code crashes Bun 1.3.12 on Windows (exit 3 in ~100ms), even for --prefix.
  3. Spawn hung: Bun PTY terminal spawn is POSIX-only on 1.3.12; one run hung to the 10-minute timeout.
  4. Exit codes silently became 0: Bun MSVCRT-style argv escaping mangles inner quotes for cmd.exe, so bun -e "..." ran as bare bun. Failure detection was fully broken.

Changes

  • src/index.ts: TUI loads via dynamic import only in TUI mode; exec uses the shared shell helper; logs <proc> streams the file in chunks instead of spawning cat.
  • src/process/runner.ts: win32 spawns cmd with piped stdio pumped into the existing handlers; direct kill instead of negative-PID group kill. POSIX path untouched.
  • src/utils/shell.ts (new, tested): shellArgv (sh -c vs Node-style cmd /d /s /c "cmd") and shellSpawnOptions (windowsVerbatimArguments, which is what preserves quotes and exit codes).
  • scripts/generate-docs.ts: CRLF-tolerant reads. .gitattributes: eol=lf, matching the Biome LF rule.
  • CI: new windows-prefix job running scripts/windows-prefix-smoke.ts (parallel DAG + dependsOn ordering + failing exit code + skip propagation, all bun -e commands); workflow_dispatch trigger; commitlint PR-only.

Proof

Green run (check + windows-prefix, 10/10 smoke assertions on win32): https://github.com/hyldmo/numux/actions/runs/34586422554

Caveat: only prefix mode is proven. The TUI still loads native modules that crash Bun on Windows, so recommend --prefix there.

@hyldmo
hyldmo merged commit 372685b into main Sep 11, 2026
3 checks passed
@hyldmo
hyldmo deleted the hyldmo/verify-numux-windows branch September 11, 2026 13:18
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.19.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant