fix(ext/node): add _idleStart and _idleTimeout to Timeout#33604
Merged
Conversation
….js compat Node.js Timeout objects expose `_idleStart` (set to current time on creation and refresh) and set `_idleTimeout = -1` when destroyed. Deno was missing both, causing tests that inspect timer internals to fail. Enables `parallel/test-tls-wrap-timeout.js` Node.js compat test.
fibibot
reviewed
Apr 27, 2026
Contributor
fibibot
left a comment
There was a problem hiding this comment.
The three changes map directly to what the upstream test asserts:
Timeout()constructor sets_idleStart = DateNow()✓ — matches the test's initiallastIdleStart = socket[kTimeout]._idleStartcapture.refresh()updates_idleStart✓ — Node's documented behavior.kDestroysets both_idleTimeout = -1and_idleStart = DateNow()✓ — both required by the test's exit-time assertions:socket[kTimeout]._idleTimeout === -1ANDlastIdleStart < socket[kTimeout]._idleStart.
DateNow correctly added to the primordials destructure. Test enrollment alphabetically positioned (wrap-event-emmiter < wrap-timeout < zero-clear-in).
CI is still building (44/110 passing, no failures yet). Holding off on APPROVE until the relevant test node_compat debug and test unit_node debug jobs land green per fibibot's CI gate. I'll re-confirm once they finish.
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
_idleStartproperty toTimeoutobjects, set toDate.now()on creation, refresh, and destroy — matching Node.js behavior_idleTimeout = -1inkDestroyto signal a cleared timer, matching Node.js's unenroll semanticsparallel/test-tls-wrap-timeout.jsNode.js compat testTest plan
./x test-compat test-tls-wrap-timeout.jspasses