Skip to content

fix(npm): report why the native binary failed to launch - #211

Merged
BunsDev merged 1 commit into
mainfrom
fix/npm-launcher-errors
Oct 15, 2026
Merged

BunsDev merged 1 commit into
mainfrom
fix/npm-launcher-errors

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Member

Summary

The npm coven-code launcher now prints why the native binary failed to start, instead of exiting 1 silently.

Context

  • Related request: Coven Code surface-reduction goal, unit 12 ("npm launcher failure diagnostics" in the surface inventory ledger).
  • Scope: npm/bin/coven-code plus a fixture test and workflow.
  • Non-goals: no fallback execution, permission repair or installer change.

Changes

  • When spawnSync returns an error, print coven-code: failed to launch native binary: <message> (4 lines). The message carries the executable path and the OS error code. Inherited stdio and environment, argument forwarding, child exit status and the existing missing-binary message are unchanged.
  • New scripts/npm-launcher.test.mjs uses temporary executable fixtures: a missing binary, an argument with spaces plus environment forwarding and exit status 7, a non-executable binary (EACCES), and a missing interpreter (ENOENT).
  • New .github/workflows/npm-launcher-tests.yml: Linux and macOS, read-only, PR and manual dispatch.

Validation

  • RED: on the unchanged launcher, the EACCES case failed on empty stderr.
  • node scripts/npm-launcher.test.mjs: exit 0 on this branch (current main).
  • node --check npm/bin/coven-code, actionlint .github/workflows/npm-launcher-tests.yml, git diff --check: pass.
  • Independent spec/quality review reran these checks in the source worktree.
  • Linux run: this PR's launcher workflow. Windows is unverified.
  • Cargo gates: N/A.

PR Readiness

  • Diff is limited to the intended files.
  • Generated files were not edited by hand.
  • User-facing docs: not needed.
  • No secrets, credentials, local paths, or unrelated logs are included.
  • Remaining risks: none beyond the unverified Windows path.

The npm launcher discarded spawnSync's error, so a non-executable or
uninterpretable native binary exited 1 with empty stderr. Print the
launch error, which names the executable path and OS error code. Stdio,
environment, arguments and exit status forwarding are unchanged.

Add scripts/npm-launcher.test.mjs (missing binary, arguments with spaces
and env/status forwarding, EACCES, missing interpreter) and an
npm-launcher-tests workflow.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Oct 15, 2026 7:14am UTC

Request Review

@BunsDev
BunsDev merged commit 3499b01 into main Oct 15, 2026
3 checks passed
@BunsDev
BunsDev deleted the fix/npm-launcher-errors branch October 18, 2026 07:49

This branch was successfully deployed

1 active deployment
Preview — 70a1de40 Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant