feat(VM-523): Add --wait flag to service status for synchronous startup checking#220
Open
feat(VM-523): Add --wait flag to service status for synchronous startup checking#220
Conversation
Add --wait and --timeout parameters to the service() MCP tool for synchronous startup checking. When wait=True on status action, polls until the service is ready or timeout is exceeded. New functions: - get_service_port(): centralized port lookup for services - is_service_ready(): checks port accessibility + Kokoro startup status - wait_for_service(): async polling loop with 1s interval, dot progress Implementation follows design from SPEC.md: - 1 second polling interval for fast local service detection - Progress dots printed to stderr during wait - Timeout returns message with ⏱️ prefix - Kokoro readiness requires port listening AND model loading complete Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 13 unit tests for the wait flag feature in TestWaitFunctionality class: - get_service_port() returns correct ports for all services - is_service_ready() handles port not listening, port listening, kokoro loading, and kokoro ready states - wait_for_service() handles immediate ready, timeout, and delayed ready scenarios - service() integration tests for wait/timeout params including string conversion and default handling All tests use mocking to isolate the wait functionality from actual service state. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update service-commands.md with --wait and --timeout flag examples - Add wait functionality to SKILL.md service management section - Include example output showing wait progress and timeout behavior Co-Authored-By: Claude Opus 4.5 <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
Adds
--waitand--timeoutparameters to the VoiceMode service status MCP tool, allowing scripts and agents to block until a service is ready instead of implementing their own polling loops.Key changes:
wait(bool, default: false) andtimeout(int, default: 60s) params toservice()MCP toolget_service_port(),is_service_ready(),wait_for_service()Usage
Test plan
get_service_port()- returns correct portsis_service_ready()- handles all stateswait_for_service()- immediate/timeout/delayedservice()integration - params and defaultsDocumentation
docs/reference/cli/service-commands.md.claude/skills/voicemode/SKILL.md🤖 Generated with Claude Code