Repository navigation
fix(pool): settle tasks after worker failures - #186
Conversation
Port poolifier/poolifier#3343 at 8a2ee92d7 with native Web Worker lifecycle adaptations.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7fa51bc8a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Follow-up fidelity/correctness auditCompared merged port Fresh native probes on both this revision and #188, under Deno and Bun, exercised crash → migration → queued cancellation → clone-error recovery, plus native worker removal from a structured-clone getter. Healthy tasks survived; captured total/per-function counters rolled back to zero; survivor counters stayed intact; no retained task promises or duplicate exit. Additional Bun Inherited issue, not a port omission: queued cancellation loses an Error-valued No repository code changed during this audit. Temporary probes and reference worktrees removed. |



Summary
Faithful port of poolifier/poolifier#3343 at
8a2ee92d7.backPressureEnduntil removal handoffs complete. Settle tasks even if replacement construction throws.closeto the existing worker-node exit signal. Keep pool restart/intentional-destruction policy unchanged.docs/api.md; no new options, error classes or runtime dependencies.Runtime adaptations
Node-only cluster/async-hooks/synchronous port-drain APIs are omitted. Deno/browser silent shutdown has no native exit notification; only responses received before cleanup are guaranteed. Bun close and Web
ErrorEventare handled directly. The buffered response/error regression checks this delivery boundary without assuming cross-channel event ordering.Validation
deno task format:check,deno task lint,deno check src/mod.ts,deno task bundle: passed.DataCloneErrorrecovery smokes; Bun native silent-close recovery; Deno subprocess replacement-construction regression.src/utils.tsrequireswindow); browser bundle builds. No workaround included.PR Checklist
Does this PR introduce a breaking change?