Skip to content

fix(interceptors): report a signalled or unstartable child as a shell… - #125

Open
moise10r wants to merge 1 commit into
mainfrom
fix/16-a-command-killed-by-a-signal-is-reported
Open

moise10r wants to merge 1 commit into
mainfrom
fix/16-a-command-killed-by-a-signal-is-reported

Conversation

@moise10r

@moise10r moise10r commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

What this changes

A child killed by a signal was reported as refused (77) or failed (1). It now exits 128 plus the signal number, in both memnox-shell and the interceptor. A missing binary exits 127 and a non-executable one exits 126, with the reason on stderr. Core gains exitCodeForChild and exitCodeForSpawnError and loses SIGNAL_NUMBER. This overlaps #17, so rebase whichever merges second.

How it was verified

packages/core/test/exit-code.test.ts spawns real children:

  • One killed with SIGKILL gives 137.
  • A missing binary gives 127.
  • A file without the execute bit, in a temp dir, gives 126.

Fixes #16

Checklist

  • pnpm format && pnpm typecheck && pnpm test && pnpm deadcode all pass
  • Behaviour change ships with a test
  • No any, no magic values, no console.* outside cli-output.ts
  • If this touches the decision path: still deterministic — no LLM, network, or randomness
  • If this changes a verb table: the classes that moved are named above (not applicable)
  • If this changes a command, flag or file it writes: docs/ says so (not applicable)

This branch has not been deployed

No deployments
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.

interceptors: a command killed by a signal is reported as refused (77) or as failed (1)

1 participant