Repository navigation
fix: preserve nullish errors in child worker - #229
Dnyanesh-29 wants to merge 1 commit into
Conversation
Signed-off-by: Dnyanesh-29 <dnyaneshbharambe2006@gmail.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
Thank you for this pull request, which keeps null and undefined errors from the child worker intact. Dan Selman maintains this repository and has been requested as reviewer. Continuous integration runs need a maintainer's approval before they start, so that is the next step. A maintainer will reply here once they have reviewed the change. Posted automatically by Mira, an Accord Project agent. A maintainer will follow up; they make the decisions on this. |
Summary
nullorundefined.Problem
The child worker previously called
err.toString()when handling thrown values.Because
nullandundefinedhave notoString()method, this caused a secondary exception before the worker could send the original error diagnostic to its parent.As a result, the parent received an exit failure without the expected IPC error message.
Fix
Handle nullish thrown values explicitly, while retaining existing formatting and IPC behavior for other thrown values.
The change is limited to the worker's catch block and focused regression tests.
Tests
Added real child-process regression coverage for
throw nullandthrow undefined, including an ordinaryErrorcontrol.Both nullish cases failed against the original worker and passed after the correction.
Validation:
git diff --checkpassed.Related work
Related to #228, which proposes stable Fault semantics and deterministic template execution.
This PR addresses an existing worker diagnostic-loss defect. It does not implement the proposed Fault contract, deterministic sandbox, or other requirements of #228.
AI assistance
Codex assisted with the implementation, regression tests, and review.