Add regression test for daemon disconnect after per-turn site check#4193
Merged
Conversation
…TU-2034) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Thanks for the test :) |
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.
Related issues
Studio Code Desktop sessions got stuck in the "working" state after every response (STU-2034/STU-2040): a per-turn site running-state check left a daemon socket open, so the headless CLI child never exited and the UI never received the run-completion signal. #4175 fixed it by closing the socket after the check.
How AI was used in this PR
AI was used to investigate the root cause of the stuck-message bug (trace the run lifecycle and git history) and to draft the regression test. The test was reviewed and mutation-verified locally.
Proposed Changes
Add a test to avoid regressions that fails if that disconnect is ever removed again, so the same hang cannot silently return.
Testing Instructions
npm test -- apps/cli/commands/ai/tests/index.test.ts— all tests pass.await disconnectFromDaemon();line inapps/cli/commands/ai/index.ts(after theisSiteRunningcheck) and re-run — the new test fails.Pre-merge Checklist