ReviewOS

home-lang/home

Port Bun subprocess kill signal matrix

#149
Closed chris opened this 10 days ago ·
10 days ago

Track the focused subprocess signal slice from #66.

Upstream byte-identical corpus file:

  • js/bun/spawn/spawn-kill-signal.test.ts (85 lines, 16 tests)

Scope:

  • activate the exact matrix instead of rewriting it to a native TODO
  • model long-lived shell sleep subprocesses as pending until killed
  • normalize default, named, numeric, null/empty, and NaN signal inputs
  • expose OS signal constants needed by the upstream matrix
  • preserve exitCode === null and canonical signalCode after signal termination
  • reject unknown/non-coercible signals with ERR_INVALID_ARG_TYPE and enumerate valid signal names

Acceptance:

  • exact matrix: 16 pass, 0 fail, 0 unsupported, 0 todo
  • copied corpus remains byte-identical to ~/Code/bun
  • full Home gate passes
  • commit/push directly to main as Chris Breuer with no coauthors
  • close this issue with evidence and link it from #66.
10 days ago

Completed and pushed directly to main in af7b89b (fix(runtime): port Bun subprocess signal matrix).

Implemented a reusable pending subprocess model for long-running shell sleeps, canonical signal normalization for default/named/numeric/null/empty/NaN inputs, OS constants.signals, stable signal-termination state (exitCode === null, canonical signalCode), and Node-compatible ERR_INVALID_ARG_TYPE errors that enumerate real signal names. Invalid kills leave the child pending so a later valid kill still settles the original exited promise.

Verification on final source:

  • exact byte-identical js/bun/spawn/spawn-kill-signal.test.ts: 16 pass, 0 fail, 0 unsupported, 0 todo
  • ./pantry/.bin/zig build test -Dfilter=home_test --summary failures: exit 0
  • durable Home regression reruns the exact matrix and asserts 16/0/0/0.

Sign in to comment on this issue.