Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Continued dispatch can still access released event handlers because the ready-event loop does not recheck their destruction state.
1 open issue
What changed in this PR
This PR improves executor error recovery by preserving valid ready callbacks after failures while preventing stale batches from continuing after node shutdown or restart.
Changes:
- Collect callback errors and report them after processing the valid batch.
- Invalidate stopped batches, recheck action lifetimes, and release temporary native resources through
finallyblocks. - Document error reporting and add regression tests for recovery, lifecycle boundaries, and cleanup.
| File | Description |
|---|---|
| types/node.d.ts | Documents batch callback error reporting. |
| test/test-spinning.js | Adds error recovery, lifecycle, and resource cleanup tests. |
| lib/node.js | Implements guarded dispatch, error aggregation, and cleanup. |
Review effort: Balanced
Comment on lines
+523
to
+524
| } finally { | ||
| GoalInfoArray.freeArray(message); |
There was a problem hiding this comment.
🔵 Needs a closer look
Exception-path regression coverage is missing for expired-goal cleanup, including verification that failures in actionExpireGoals and processGoalExpired call freeArray exactly once and propagate the original exception.
Review effort: Balanced
| rcl.shutdownAll(); | ||
| }; | ||
| process.on('SIGINT', _sigHandler); | ||
| process.once('exit', () => rcl.shutdownAll()); |
minggangw
force-pushed
the
fix/executor-ready-batch
branch
from
October 29, 2026 05:53
bfcfac8 to
73f4c17
Compare
| rcl.shutdownAll(); | ||
| }; | ||
| process.on('SIGINT', _sigHandler); | ||
| process.once('exit', () => rcl.shutdownAll()); |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Keep callback dispatch fail-fast while preventing stale entity access,
ensuring exception-safe resource cleanup, and fixing the exit-time crash
exposed by ASan/LSan.
Changes
Fix: #1667