Repository navigation
feat(service): the voice brain follows a spoken ask's turn on Neon Realtime instead of polling - #3937
Closed
charleslpan wants to merge 3 commits into
Closed
charleslpan wants to merge 3 commits into
charleslpan wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
luke-agent
Bot
force-pushed
the
luke/neon-realtime-planning-hold
branch
from
October 20, 2026 01:36
fc96193 to
373ae87
Compare
luke-agent
Bot
force-pushed
the
luke/voice-brain-realtime
branch
from
October 20, 2026 01:36
3c3120d to
b4ae51f
Compare
luke-agent
Bot
force-pushed
the
luke/neon-realtime-planning-hold
branch
from
October 20, 2026 02:06
373ae87 to
90a213c
Compare
luke-agent
Bot
force-pushed
the
luke/voice-brain-realtime
branch
from
October 20, 2026 02:06
b4ae51f to
7acfb43
Compare
luke-agent
Bot
force-pushed
the
luke/neon-realtime-planning-hold
branch
from
October 20, 2026 02:43
90a213c to
ce92920
Compare
…altime instead of polling `live-brain.ts` used to read the record again every 250 ms (`POLL`), and woke on eve's session stream with a 60 ms settle after it. Now it reads the record again whenever the task conversation's mark moves. The exchange passes in the mark (`taskConversationLiveStatements` for the session's task), and the brain waits on it with `lookedUntil`, with the widest follow bound as the hold. The look still decides when the turn is overdue. The stream wake, `POLL`, `SETTLE`, and `STREAM_RETRY` are retired. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…a slow store Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…rkers part too Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
luke-agent
Bot
force-pushed
the
luke/voice-brain-realtime
branch
from
October 20, 2026 02:48
7acfb43 to
4452cf9
Compare
Contributor
This branch was successfully deployed
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.
Third of three small PRs that remove Luke's last transcript and voice loops. The goal is realtime with no fallbacks. On the coordinator's call, this is stacked on #3295 (
luke/neon-realtime-planning-hold), beside #3757, and not on #3931: it touches only the service. It needs #3266'slookedUntil/LiveWakeand #3267'staskConversationLiveStatements, and #3295 carries both.What changed
voice/live-brain.ts: a spoken ask's follow no longer reads the record every 250 ms (POLL), and no longer wakes on eve's session stream with a 60 msSETTLE.lookedUntilon the task conversation's mark. The record is read at once, then again each time the mark moves over Neon Realtime. The mark moves when a message lands, when the journal revision goes up, when the newest turn or its status changes, and when a worker starts or ends.PARKED_FOLLOW, the widest bound. The look itself still says when a turn is past the plain bound or the parked one, as before.LiveWakeis taken where the brain is built, on the socket runtime thatrunWebprovides withliveWakeFromEnvironment, and passed to each follow's fiber.POLL,SETTLE,STREAM_RETRY,EVE_DELTA_EVENTS, and the per-session stream listener.voice/live-exchange.tsandexchange-attachment.ts: the exchange gets the session'staskIdand passes the braintaskConversationLiveStatements(conversation.userId, taskId).eve-sessions.ts:EveStreamEventis no longer exported, so knip passes.EveSessions.streamhas no caller left. Removing that seam means editing eight test fakes, so I left it for a follow-up.Worth knowing
lookedUntilon this base still looks everyLIVE_SAFETY_POLL(5 s) beside the watch. That's #3266's primitive, and I didn't change it. A worker's own journal moving between its start and its end doesn't move the mark. So a worker step shown on the Work tab can arrive up to 5 s late, until the turn's own journal or a worker's start or end moves the mark. I didn't chase that edge case.Tests
live-brain.test.ts:tickingLiveWake, a new helper intesting/live-wake.tswhose watch hears a change every 5 ms, standing in for Realtime hearing each write.live-exchange.test.tsandvoice-service-exchange.test.tsprovide the ticking wake to the exchange they build.Checks run locally
pnpm check:affectedgets OOM-killed in the sandbox, so I ran its pieces one at a time:repository-checks.sh,biome check .,oxlint,knipdiscarded-effect(with a larger heap)tscfor service and websrc/voice,src/agents/brain-host, andsrc/live(114 tests)What to check by hand
Made with Luke