deepseek-harness/packages/subprocess/subprocess-local/src
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
..
index.ts docs: capitalize Service Provider across repository 2026-08-13 13:31:30 +08:00
invariant.ts build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
process-inspector.ts fix(subprocess): fence each signal against current process state 2026-08-27 15:19:43 +08:00
spawn.ts test(subprocess): harden host-exit cleanup fixtures 2026-08-11 22:56:45 +08:00
terminal.ts fix(subprocess): fence each signal against current process state 2026-08-27 15:19:43 +08:00
windows-inspector.ts fix(subprocess): fence each signal against current process state 2026-08-27 15:19:43 +08:00