ReviewOS

home-lang/home

Port Bun subprocess socketpair shutdown matrix

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

Port the exact upstream test/js/bun/spawn/spawn-socketpair-shutdown.test.ts corpus into Home without TODO rewriting.

Scope:

  • preserve stdout writability across an idle child delay
  • cover Python asyncio connect_write_pipe behavior on supported platforms
  • preserve stdin readability when the parent writes after an idle delay
  • model process/pipe lifecycle and disposal semantics in the native corpus runner
  • add a durable Home regression for the exact upstream file

Acceptance:

  • exact corpus remains byte-identical to ~/Code/bun
  • 3 passed, 0 failed, 0 unsupported, 0 todo on macOS
  • adjacent spawn regression matrices remain green
  • full home_test gate passes
10 days ago

Implemented and pushed in 4bfc0b7068cf0289590e798376c1e7197e8865f9.

Ported behavior:

  • preserves delayed child stdout data across idle pipe periods
  • covers Python asyncio connect_write_pipe output on supported platforms
  • preserves parent-written stdin through write, flush, and end
  • settles exit state and implements kill/ref/unref/resource/disposal lifecycle
  • removes the exact upstream corpus file from the TODO rewrite and adds a durable Home regression

Verification:

  • exact upstream byte comparison against ~/Code/bun/test/js/bun/spawn/spawn-socketpair-shutdown.test.ts: pass
  • spawn-socketpair-shutdown.test.ts: 3 passed, 0 failed, 0 unsupported, 0 todo
  • adjacent spawn-signal.test.ts: 4 passed, 0 failed, 0 unsupported, 0 todo
  • adjacent spawn-kill-signal.test.ts: 16 passed, 0 failed, 0 unsupported, 0 todo
  • ./pantry/.bin/zig build test -Dfilter=home_test --summary failures: exit 0

Sign in to comment on this issue.