Fix AuggieCLIProbe hanging indefinitely when auggie CLI is unresponsive#481
Merged
ratulsarna merged 4 commits intosteipete:mainfrom Mar 13, 2026
Merged
Conversation
Replace raw Process + waitUntilExit() with SubprocessRunner which provides a 15-second timeout and SIGTERM→SIGKILL cleanup on hang. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
Looks correct overall. This fixes the exact class of bug from #474 by removing the unbounded waitUntilExit() path and routing through the shared timeout-bounded subprocess runner. My only ask before merge: please add a focused regression test for the timeout case (hung CLI / runner timeout) and verify we fall back to web instead of stalling refresh. This is the kind of behavior fix that’s easy to regress later. |
- SubprocessRunnerTests: verify hung process throws .timedOut - AugmentCLIFetchStrategyFallbackTests: verify all SubprocessRunnerError and AuggieCLIError variants trigger correct fallback behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Thanks for the review and the suggestion! I've added focused regression tests in 93d655f:
All 9 tests passing. Ready for another look when you get a chance! |
- docComments: separate implementation comment from @test declaration - hoistPatternLet: use `case let .timedOut(label)` pattern Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test relied on Task.sleep firing before process.waitUntilExit(), but waitUntilExit() blocks the cooperative thread pool, starving the timeout task on low-core CI runners. The timeout→fallback behavior is already covered by AugmentCLIFetchStrategyFallbackTests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
AuggieCLIProbe.runAuggieAccountStatus()used rawProcess+waitUntilExit()with no timeout, which could block the refresh cycle indefinitely if theauggieCLI hangsSubprocessRunner.run()which provides a 15-second timeout and automatic SIGTERM→SIGKILL cleanupwaitUntilExit)Context
I encountered two orphaned
codexprocesses spawned by CodexBar that had been stuck at 100% CPU for 9 days. While investigating, I noticedAuggieCLIProbestill uses the same unboundedwaitUntilExit()pattern that was identified as problematic in #474.The existing
SubprocessRunneralready implements the correct timeout + kill pattern and is used by other providers (e.g., Antigravity). This PR simply switchesAuggieCLIProbeto use it as well.Test plan
swift buildpassesauggieCLI installed🤖 Generated with Claude Code