deepseek-harness/packages/subprocess/subprocess-local/tests
Yichen Jiang 9757224349 fix(subprocess): fence each signal against current process state
Review found the shared observation defeated the very fence it fed:
it carries the original PID-to-start-time pairing forward, so a
recycled PID still matches it and takes a signal meant for the process
that exited. Capturing it outside the per-member try also let one
failed read abort a whole teardown round, breaking the synchronous
host-exit contract, and an empty round paid a read for no members.

signalProcess now reads ProcessInspector.isAlive immediately before
delivering, from the narrowest per-identity source each platform
offers; signalMembers and waitForMembers return before capturing when
a round has no members. snapshot() keeps serving the readiness poll,
whose per-poll table read stays at one.

Windows enumerates Toolhelp32 lazily on the first tree question, so a
snapshot asked only for liveness — the 25 ms teardown poll — performs
no table walk at all.
2026-08-27 15:19:43 +08:00
..
fixtures Merge remote-tracking branch 'origin/master' into worktree/command-attachment-envelope 2026-08-19 11:11:15 +08:00
local.spec.ts fix(subprocess): fence each signal against current process state 2026-08-27 15:19:43 +08:00
process-exit.spec.ts fix(subprocess): fence each signal against current process state 2026-08-27 15:19:43 +08:00
process-inspector.spec.ts fix(subprocess): fence each signal against current process state 2026-08-27 15:19:43 +08:00
spawn.spec.ts test(subprocess): measure the pipe-drain settle from before the pid-file handoff 2026-08-13 10:47:44 +08:00
terminal.spec.ts fix(subprocess): fence each signal against current process state 2026-08-27 15:19:43 +08:00
windows-inspector.spec.ts fix(subprocess): fence each signal against current process state 2026-08-27 15:19:43 +08:00