Skip to content

test(console): cut the audio turn tests from 19s to under 2s - #1135

Open
u9g wants to merge 3 commits into
mainfrom
jason/faster-audio-say-tests
Open

u9g wants to merge 3 commits into
mainfrom
jason/faster-audio-say-tests

Conversation

@u9g

@u9g u9g commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

go test ./cmd/lk/ spent 19s of its 34s in four audio-mode Say tests. Each turn ends only after the agent has been quiet for turnSettle, which is 3s so that it outlasts a pause from a delegating model. The fake agent never pauses, but every test still waited the full 3s, and two of them also slept turnSettle + 500ms.

  • turnSettle is now a settle field on the session, like replyWait, and it still defaults to 3s, so the CLI behaves the same. The fake agent sets it to 100ms.
  • TestAudioSayWaitsForHandoffIntroduction never reached awaitHandoffIntro. A handoff event doesn't count as the agent replying, so the turn was still waiting for a reply when the new agent's introduction arrived, and the test still passed with the handoff wait removed. The old agent now replies before the handoff, so only the handoff wait can keep the turn open for the introduction.
before after
four slow audio tests 19.2s 1.4s
cmd/lk package, test time 33.9s 15.5s

Verified:

  • go test ./cmd/lk/ -race -count=20 -run TestAudio passes, with no data races.
  • With the handoff wait removed, TestAudioSayWaitsForHandoffIntroduction now fails (it passed on main). With a stale reply counted as the answer, TestAudioSayWaitsForTheAgentToHearTheUser still fails.
  • TestDeployPrebuiltImageUnderUserAuth fails locally on main too, because docker-credential-osxkeychain isn't installed. It's unrelated.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant