Let a started capture outlast the reply window it began in - #226
Merged
RobVanProd merged 2 commits intoAug 12, 2026
Conversation
docs/BRIDGE_AI_HANDOFF.md records this as an open source-level blocker: the host's capture commitment is shorter than the firmware's endpoint ceiling and can reject a valid long utterance. The reply window bounds how long we wait for someone to *start* speaking. Once they have started, the device owns the ending: firmware's dedicated capture ceiling is 12 s, and the terminal plus the final PCM chunks still have to reach the host after that. The commitment that protects an in-progress capture was sized as `now + reply_window_ms`, so with the shipped 10 s window a capture that ran anywhere near the firmware ceiling could be closed out from under itself. The two numbers were never related; one just happened to be in the same units. The commitment is now its own value, defaulting to 13.5 s, validated to sit above the 12 s firmware ceiling and at or below the host's 14.5 s absolute capture lease. That keeps it long enough for the longest capture firmware can take while ensuring it can never become the control that keeps an abandoned capture alive -- the absolute lease still bounds that. Coverage: a capture running to the firmware ceiling now commits; a capture that never delivers still closes on timeout; the commitment no longer tracks a short reply window; and the bounds reject a value at or below the ceiling or above the lease. python -m unittest discover -s bridge -p "test_conversation_session.py": 19/19. Full bridge suite: 583 tests, with only the four pre-existing numpy/opencv environment gaps. Not qualified on hardware. This changes live conversation timing, and the 2026-08-11 physical evidence was collected under the previous value, so it needs a supervised run with a deliberately long utterance before promotion. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The handoff still described the shorter-than-ceiling capture commitment as an open source-level blocker. Record what changed, the reasoning that the reply window bounds waiting for speech to start while the device owns the ending, and that this alters live conversation timing and therefore still needs a supervised long-utterance run before promotion. Co-Authored-By: Claude Opus 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.
Closes the open source-level blocker recorded in
docs/BRIDGE_AI_HANDOFF.md:The mistake
The reply window bounds how long we wait for someone to start speaking. Once they have started,
the device owns the ending — firmware's dedicated capture ceiling is 12 s, and the terminal plus the
final PCM chunks still have to reach the host after that.
But the commitment protecting an in-progress capture was:
With the shipped 10 s window, a capture running anywhere near the firmware ceiling could be closed
out from under itself. The two values were never related; one just happened to be in the same units.
The comment directly above that line already stated the correct intent — "the final audio chunks can
arrive after that listening lease expires" — so the intent was right and the sizing wasn't.
The change
capture_commit_msbecomes its own configuration value, defaulting to 13.5 s, validated to sitabove the 12 s firmware ceiling and at or below the host's 14.5 s absolute capture lease.
That range is the whole point:
the absolute lease still bounds that, and a capture that never delivers still closes on timeout.
Coverage
python -m unittest discover -s bridge -p "test_conversation_session.py"— 19/19.Full bridge suite: 583 tests, with only the four pre-existing
numpy/opencvenvironment gaps(
test_rvc_directml_worker_service,test_vision_service).Not claimed
No hardware qualification. This changes live conversation timing, and the 2026-08-11 physical
evidence in #221 was collected under the previous value. It needs a supervised run with a
deliberately long utterance — one that runs to the firmware ceiling — before promotion.
Worth noting the ambiguity honestly: in that 2026-08-11 evidence a 217-chunk (10.85 s) capture did
commit successfully, so I have not reproduced the rejection on hardware. The defect is clear in the
source and is what the handoff describes; the fix removes the coupling either way.