Repository navigation
test(server): let fake Claude CLIs exit when stdin closes - #494
Merged
Merged
Conversation
The fake Claude CLIs in the capability probe and provider instance registry tests ended with an empty setInterval, which kept them running after the SDK closed their stdin. The SDK's fallback SIGTERM never ran either, because the test worker had finished by then. Every run of these tests left two processes behind, reparented to the service manager. Remove the interval. The open stdin keeps each fake running for as long as the test needs it, and the fake exits when stdin closes, as the real CLI does when idle.
incognitojam
pushed a commit
that referenced
this pull request
Oct 11, 2026
) Signed-off-by: Yordis Prieto <[email protected]> Fork adaptation: Fork #494 had already removed this fake CLI's unconditional interval so it exits when stdin closes. This takes upstream's interval that is cleared when stdin closes in its place. (cherry picked from commit 6414268) Upstream-PR: 14926
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.
Every run of the Claude capability probe test and the provider instance registry test left two fake
claudeprocesses running. The processes were reparented to the service manager and kept running for days after their temp directories were deleted. One machine had accumulated eleven of them.Both fake CLIs ended with
setInterval(() => {}, 1_000), which kept them alive after the SDK closed their stdin. The SDK's fallback SIGTERM runs on a timer and when the process exits, and neither fired because the test worker had already finished.The interval is removed. The open stdin keeps each fake running for as long as the test needs it, and the fake exits when stdin closes, as the real CLI does when idle.
Validation
The fake peers in
serviceLauncher.test.tsuse the same interval, but the launcher terminates them explicitly and none were among the leftovers, so they are unchanged.Written by an agent (Claude Code, claude-opus-5-5).