Repository navigation
Bound voice-command's context fetch and back off the fault poller - #32
Merged
Merged
Conversation
Every turn fetched the command_status resource's Status() and the sensors' Readings() with no timeout before calling the LLM, so a wedged source held the reply until the RPC's own deadline (10 minutes on Cappuccina, where the customer detector had stopped answering). fetchContext now gives up after 3 s and passes the partial data on. The fault poller asked the command_status resource for fault_active twice a second with a 1 s timeout, even when the resource never publishes the flag or keeps failing. Against a slow source that queues cancelled requests faster than it can finish them. It now polls every 5 s until the source has published fault_active, and for 5 s after any failed poll. Co-Authored-By: Claude Opus 5.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
Stop a slow or wedged
command_statusresource from stalling voice turns for minutes. Each turn waited on the resource'sStatus()with no timeout. On a beanjamin machine whose customer detector had stopped answering, every reply took 10 minutes, the gRPC deadline.Changes
{"error": ...}, so the reply goes ahead with partial contextfault_activeare polled every 5 s: a resource that only describes the scene (a customer detector) never sets the flag; once a source has published it, polling stays at 500 msTesting
voice_command_test.go, the package's first tests: a hangingStatus()is cut off at 3 s,fetchCommandFaulttells raised, lowered and missing flags apart, and the poller's rate for publishing, silent and failing sources;go test -raceandgolangci-lintpassClaude Code prompts used
🤖 Generated with Claude Code