mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-11-11 05:17:43 +08:00
A successful verifier message was treated as terminal even though the Worker Thread was still alive. The parent immediately terminated the worker and detached cancellation, so an error, nonzero exit, or caller cancellation after that message could be ignored and verification could resolve successfully. Keep the first successful response pending until an observed natural exit with code 0. A missing response or nonzero exit rejects after the worker has already exited. Error and abort callbacks retain the existing terminate-and-join path, including its first-error and AggregateError behavior. The scheduler stays unchanged: its permit remains held until the verification promise settles, now after successful worker quiescence. The worker already closes its parent port in finally, so success needs neither a forced stop nor another protocol message. Replace success-termination expectations with deterministic message/exit barriers and cover post-response errors, nonzero exit, cancellation, and permit handoff. Remove the obsolete hand-written termination thenable and its retired unknown-assertion baseline entry. Add real source workers for plain and Zstandard input, and require the built plain-Node migration smoke to complete with zero termination calls. Document the settlement condition. Native Windows CI recorded process access violation 0xC0000005 while a migration fixture was active. Removing unnecessary successful-worker termination is consistent with that evidence, but this commit does not claim that the native faulting module or mechanism has been established. The deterministic regressions prove the lifecycle defect independently; the next native CI run must assess whether the observed crash recurs. Validation: - Original source failed all new message-to-exit regression scenarios; the updated focused lifecycle file passes 19 tests with 100% coverage. - Node 24 owning package: 19 files, 741 passed, 1 skipped; every included package source file reaches 100% statements/branches/functions/lines. - Real source workers passed for none/zstd; built plain-Node smoke passed with zero terminate calls and no timeout or process signal. - Exact Node 22.19 source-mode none/zstd workers naturally exited 0 with zero terminate calls, exercising the async Module.register fallback. - Host TypeScript build, focused lint, no-new-unknown-assertion gate, README translation pairing, and all 42 doc-sync gates passed. Related to #4387 and #4394.