fix(monitor): add checkDeadSessions forwarding method for backward compat#4399
Open
OneStepAt4time wants to merge 1 commit into
Open
fix(monitor): add checkDeadSessions forwarding method for backward compat#4399OneStepAt4time wants to merge 1 commit into
OneStepAt4time wants to merge 1 commit into
Conversation
…mpat The monitor refactor moved checkDeadSessions to DeadDetector sub-component, but existing tests still call (monitor as any).checkDeadSessions(). This causes 28 test failures because the method no longer exists on SessionMonitor. Add a forwarding method that delegates to this.deadDetector.checkDeadSessions() and update poll() to use it consistently, matching the existing forwarding pattern (stallHas, stallAdd, etc.). Fixes test failures in PR #4392.
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.
Problem
PR #4392 moved
checkDeadSessions()fromSessionMonitorto theDeadDetectorsub-component. But 46 existing tests indead-session.test.tsstill call(monitor as any).checkDeadSessions(), causing 28 test failures in CI on both Node 20 and Node 22.Fix
Add a forwarding method on
SessionMonitorthat delegates tothis.deadDetector.checkDeadSessions(), matching the existing forwarding pattern (stallHas,stallAdd,stallDeleteAll, etc.).Also updated
poll()to callthis.checkDeadSessions()instead ofthis.deadDetector.checkDeadSessions()for consistency.Verification
dead-session.test.ts: 46/46 ✅ (was 28 failed)dead-detector.test.ts: 8/8 ✅monitor.test.ts: 46/46 ✅session.test.ts: 47/47 ✅This should unblock PR #4392 CI.