Skip to content

worker: fence in-flight AnyTaskJob work against terminate() freeing the VM - #36817

Closed
robobun wants to merge 3 commits into
mainfrom
farm/eb906c6f/crypto-kdf-worker-terminate-uaf
Closed

worker: fence in-flight AnyTaskJob work against terminate() freeing the VM#36817
robobun wants to merge 3 commits into
mainfrom
farm/eb906c6f/crypto-kdf-worker-terminate-uaf

worker: fence in-flight AnyTaskJob work against terminate() freeing t…

bed5838
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 3, 2026 in 14m 44s

Code review found 1 potential issue

Found 2 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/web/workers/worker-terminate-lifetime.test.ts:492-494 Readiness wait swallows worker startup errors instead of rejecting

Annotations

Check warning on line 494 in test/js/web/workers/worker-terminate-lifetime.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Readiness wait swallows worker startup errors instead of rejecting

The readiness wait registers the blanket `w.on("error", () => {})` suppressor *before* awaiting the "up" message, and the promise has no `error`/`exit` rejection wired — so a worker startup failure would surface as a non-diagnostic `{stdout:'', stderr:'', exitCode:13}` mismatch rather than the actual cause. The three sibling tests in this file (the `ready()` helper at ~lines 300/439, and the require() test at ~394) wire `error`/`exit` to reject the readiness promise and only attach the suppresso