Repository navigation
feat: S5 — silence timeout (the quiet seal) - #35
Merged
Merged
Conversation
- add the R7 silence clock to voiceSession: 5000ms with no recognizable player speech tears the session down to asleep — mic stops streaming, socket closes — silently, with no error event, notice, or audio nudge - recognizable means a server input transcript; the local RMS signal (coughs, fans) keeps the corona flaring but never resets the clock - the clock runs only on the player's turn: restarts on listening, rides through hearing, arms fresh after a barge-in cut from speaking, and pauses through thinking and speaking so the Oracle's own voice never counts as the player's silence - a medallion tap resumes via the existing wake(); silence-idle is a full sleep, so each resume mints a new rate-limited token by design - tests: idle teardown, transcript resets (listening and mid-hearing), RMS non-reset, speaking/thinking pauses, barge-in arming, rescue handoff, post-idle resume, and sleep clearing the clock Generated-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ashley Childress <6563688+anchildress1@users.noreply.github.com>
Commit-generated-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ashley Childress <6563688+anchildress1@users.noreply.github.com>
- component suite: Enter and Space fire onToggle like a tap, and the eclipsed seal swallows keyboard activation as it does the pointer - a11y e2e: the medallion carries the same 2px gold focus outline as the rune cards — asserted with the full theme CSS loaded, where a missing --gold-bright would silently void the ring Generated-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ashley Childress <6563688+anchildress1@users.noreply.github.com>
…is S13's Commit-generated-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Ashley Childress <6563688+anchildress1@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Implements S5 (R7) “silence timeout” behavior for the voice session: after 5s with no recognizable player speech (server input transcripts), the session silently idles back to asleep by stopping mic streaming, closing the socket, and sleeping the medallion—without emitting error/notice/audio nudges.
Changes:
- Add a 5s silence clock to
voiceSessionthat runs only on the player’s turn (active inlistening, armed once inhearing, paused inthinking/speaking) and resets only on server input transcripts. - Add/adjust unit tests covering idle teardown, transcript-driven resets, RMS non-reset, speaking/thinking pauses, barge-in arming, rescue interplay, and post-idle resume; plus a11y/keyboard activation coverage for the medallion.
- Update docs checklists to mark S5 complete and add an architecture-diagrams TODO.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/voice/voiceSession.ts | Adds the SILENCE_TIMEOUT_MS clock, state-based arming/pausing, transcript-driven resets, and silent idle teardown to asleep. |
| tests/lib/voice/voiceSession.test.ts | Adds a comprehensive S5 test suite and updates an existing rescue test to account for the new 5s idle behavior. |
| tests/lib/components/EclipseMedallion.svelte.test.ts | Adds keyboard activation tests (Enter/Space) and verifies eclipsed-state blocks keyboard activation too. |
| tests/e2e/a11y.e2e.ts | Ensures the medallion receives a visible keyboard focus outline in the fully themed app. |
| docs/v2-implementation-checklist.md | Marks S5 items as completed with clarified “recognizable speech” definition and turn-ownership behavior. |
| docs/ttd.md | Adds a new TODO line for architecture diagrams. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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.



What
S5 (R7): five seconds with no recognizable player speech idles the voice session back to asleep — mic stops streaming, socket closes, medallion sleeps. Silently: no error event, no notice, no audio nudge.
How the clock behaves
listening, rides throughhearingwithout restarting, and arms fresh after a barge-in cuts straight fromspeakingthinkingandspeaking— the Oracle's own voice never counts as the player's silence (R7 clause 2)thinkingdoes not arm a clock the Oracle's turn ownswake(); silence-idle is a full sleep, so each resume mints a new rate-limited token by designTests
13 new cases in the S5 describe block: idle teardown + tee, silent-by-design assertions, transcript resets from both listening and mid-hearing, RMS non-reset, speaking/thinking pauses, drain handoff, barge-in arming, thinking-rescue handoff, post-idle resume, and sleep clearing the clock. One existing rescue test updated — 10s of post-turn silence now legitimately idles at the 5s mark.
make ai-checksgreen: 879 tests, voiceSession.ts at 99.7% stmts / 96.6% branches. Semgrep + Sonar clean. Also rides along: one ttd line (architecture diagrams).🤖 Generated with Claude Code