Repository navigation
test: make daemon disconnect checks independent of startup speed - #508
Merged
Merged
Conversation
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.
The early-disconnect regression test now reaches proxy attachment before its short idle deadline can fire, and prints daemon socket/client/shutdown state if the process stays alive.
A test-only preload skips the initial startup idle arm; the real timer still starts when the last registered client disconnects. The test retains its raw connection closing before client hello, eight-second exit requirement and writer-lock cleanup assertion. Its outer deadline now covers the sequential startup waits. The separate idle-exit tests retain their original startup behavior.
Real watcher-startup cases now have explicit 30-second outer deadlines rather than Vitest’s five-second default. These include initialization and child startup before the unchanged readiness deadlines. File-level temp cleanup reuses the existing bounded removal helper after test teardown. No production daemon behavior changes; the earlier Windows post-disconnect exit failure remains unexplained.
Validation: both changed suites passed 84/84 tests on Node 24/Linux after the final preload-path and deadline changes. TypeScript/assets/viewer build, fixture syntax, agent-doc guard and whitespace checks passed. The test floor guard flags the exit assertion’s move into a diagnostic variable; the same call, deadline and true assertion remain. The follow-up deadline correction passed all 60 runtime-control tests on Node 24/Linux. The first cross-platform CI run passed Linux and macOS. Windows passed the disconnect regression but failed two remaining watcher cases at Vitest’s 5,000 ms default (5,036 ms and 5,020 ms). Those cases and siblings with the same startup path now use the explicit outer deadline. A new Windows/macOS/Linux lifecycle run is required before landing.
README “About this fork” rows checked: tests only; no feature, language, runtime support or measured-number row changes. Related earlier lifecycle work: #398 and #399.
Summary by CodeRabbit