refactor(talk): add realtime voice session harness and adopt in google-meet and voice-call#109497
Conversation
825005d to
e539c21
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 12:10 AM ET / 04:10 UTC. Summary PR surface: Source -1, Tests +168, Docs 0, Generated 0, Other +2. Total +169 across 10 files. Reproducibility: not applicable. This PR is presented as a behavior-neutral refactor, so review requires equivalence proof across real Google Meet and voice-call sessions rather than reproduction of a reported bug. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep the harness internal while the consolidation settles, or explicitly approve and document its stable SDK contract; then land a refreshed branch only after redacted live Google Meet and voice-call evidence confirms behavioral equivalence. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR is presented as a behavior-neutral refactor, so review requires equivalence proof across real Google Meet and voice-call sessions rather than reproduction of a reported bug. Is this the best way to solve the issue? Unclear: centralizing duplicated invariants is directionally sound, but publishing the aggregate harness before its external API boundary is approved is not yet proven to be the narrowest maintainable solution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 17c2ce05d80a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source -1, Tests +168, Docs 0, Generated 0, Other +2. Total +169 across 10 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
e539c21 to
8bb26bf
Compare
|
Merged via squash.
|
…e-meet and voice-call (openclaw#109497) * refactor(talk): add realtime voice session harness and adopt in google-meet and voice-call * fix(google-meet): satisfy prefer-const in realtime engine wiring
What Problem This Solves
Every realtime voice consumer re-plumbed the same session wiring around the shared bridge/talk primitives: talk-session controller creation and event ring capture, output-activity tracking with echo-suppression window bookkeeping, transcript recording with assistant-echo filtering, agent talkback queue construction, forced-consult coordination, and barge-in-to-output-flush coupling. Google Meet carried this twice (agent/STT and bidi engines), voice-call once, Discord once — four hand-maintained copies of the same invariants.
Why This Change Was Made
Phase 3 of the voice-stack consolidation (follows #109413, #109466). New
src/talk/realtime-session-harness.ts(createRealtimeVoiceSessionHarness, exported viaopenclaw/plugin-sdk/realtime-voice) owns the transport-agnostic session shape: talk lifecycle helpers with injected payload builders, input/output audio recording with echo-suppression windows and suppressed-byte accounting, bounded transcript + bridge-event capture, talkback queue, forced-consult coordinator, health snapshot assembly, andhandleBargeInwith flush-generation fallback (generalizing Meet's clear-count pattern).Adopted by Google Meet (both engines) and voice-call's realtime handler; their local wiring is deleted. Consumers keep audio I/O, format conversion, provider resolution, prompts, and pacing.
Discord adoption is deliberately a follow-up: the mapping was verified against
extensions/discord/src/voice/realtime.ts(bridge creation, talkback, forced-consult state, output tracker, barge-in paths all map onto the harness; speaker attribution, wake-name policy, Opus conversion, preroll, and player lifecycle stay Discord-side) and no harness API gap was found.User Impact
None intended. Talk-event shapes and payloads, health fields, echo-suppression timings, log lines, and barge-in behavior are unchanged per consumer.
Evidence
node scripts/run-vitest.mjs src/talk extensions/google-meet extensions/voice-call: 1009+ tests pass (rerun after rebase onto current main).pnpm plugin-sdk:surface:checkgreen (+2 exports / +1 callable, standard annotations);node scripts/check-deadcode-exports.mjsall scans 0; API baseline regenerated; SDK docs updated.