Skip to content

fix(voice-call): keep the opening greeting from being wiped by barge-in - #159144

Closed
mnowrot wants to merge 9 commits into
openclaw:mainfrom
mnowrot:fix/voice-call-greeting-protection
Closed

mnowrot wants to merge 9 commits into
openclaw:mainfrom
mnowrot:fix/voice-call-greeting-protection

Conversation

@mnowrot

@mnowrot mnowrot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #159139

What Problem This Solves

Fixes: a realtime call's opening greeting is cut off a fraction of a second in when the callee barges in, because a barge-in clears the whole queued greeting burst and cancels the greeting turn.

User Impact

User impact: the callee hears the complete opening greeting (including any consent or intro question) before barge-in takes effect; barge-in behaves normally again once the greeting has played.

Why This Change Was Made

The greeting is generated once and queued as a single large burst, so any barge-in — the local RMS gate or a provider VAD interrupt — during that burst was destructive. A greeting-protection window, armed when the provider becomes ready with an initial greeting, now holds both barge-in entry points off and mutes the caller's audio to the provider so a barge-in is not interpreted as an answer; the window disarms once the greeting has actually played out (turn complete, pacer drained, sustained quiet) or after a hard timeout, whichever comes first.

Evidence

Live calls before the change: 6240a23d lost a full 53 760-byte opening 0.3 s after the callee said "Hello"; 8d938602 lost the rest after an early disarm with 34 240 bytes queued. After the change, 3f7686b0 and d003a231 kept the greeting intact through two provider barge-ins (log: outbound audio kept by provider barge-in during greeting protection), with no cleared by line, and disarmed reason=played-out after the full consent question. pnpm tsgo:extensions passes on the branch.

Review response

Reworked on head e19494fa in response to the review:

  • The protection window could end before the carrier had actually played the greeting (carrier-lag). Protection is no longer released on queue-emptiness alone. It now stays armed until the greeting turn has completed, the paced queue has drained, and the carrier has confirmed the greeting played out (its playback mark acknowledged / sustained quiet), or the hard timeout elapses — whichever comes first. An empty queue while the carrier is still playing no longer disarms.
  • Caller-speech handling inside the protected window. Caller audio is muted to the provider for the whole protected window, and the release path is now covered on both branches: an actual played-out greeting resumes caller audio, and a greeting that never produces audio releases protection without muting the caller indefinitely.

Tests added (green):

  • mutes caller audio to the provider while the opening greeting is protected
  • keeps protection until the carrier confirms the greeting played, then resumes caller audio
  • releases caller audio when the greeting never produces audio

Command: node --import ./scripts/tsx.mjs scripts/run-vitest.mjs run extensions/voice-call/src/webhook/realtime-handler.greeting-protection.test.ts — observed 3 passed.

pnpm tsgo:extensions passes on the branch.

Review response

CI check-lint-core-2 failed on the new greeting-protection test: oxlint typescript(no-base-to-string) flagged data.toString() on the untyped ws message payload.

Fixed in c39c530f — the ws.on("message") callback is typed as RawData and normalized to a Buffer (same pattern as realtime-handler.test.ts).

  • Lint: node scripts/run-oxlint.mjs --tsconfig extensions/tsconfig.json extensions/voice-call/src/webhook/realtime-handler.greeting-protection.test.ts → Found 0 warnings and 0 errors.
  • Tests: node --import ./scripts/tsx.mjs scripts/run-vitest.mjs run extensions/voice-call/src/webhook/realtime-handler.greeting-protection.test.ts → 3 passed
  • Types: pnpm tsgo:extensions → exit 0

Review response — Revision 5 (real-call proof)

Standing on head 052846f6309. Patch quality is 4/6 with no actionable findings; the
remaining ask is evidence on this head. This section records the current-head verification
and the exact live-call signature the proof will carry.

Verification on this head (host, Node 26)

Check Command Result
Focused greeting-protection suite node --import ./scripts/tsx.mjs scripts/run-vitest.mjs run extensions/voice-call/src/webhook/realtime-handler.greeting-protection.test.ts 5 passed
Full handler suite node --import ./scripts/tsx.mjs scripts/run-vitest.mjs run extensions/voice-call/src/webhook/realtime-handler.test.ts 77 passed
Types node scripts/run-tsgo.mjs -p tsconfig.extensions.json exit 0
Lint node scripts/run-oxlint.mjs --tsconfig extensions/tsconfig.json extensions/voice-call/src/webhook/realtime-handler.ts extensions/voice-call/src/webhook/realtime-handler.greeting-protection.test.ts 0 warnings, 0 errors

Real-call trace on this head (captured)

Captured on @openclaw/[email protected], built from this PR's source at head 052846f6309 and loaded by the voice-call host. Build hashes: tarball efe73021…89b4 · dist/index.js 3f26cdc9…6f40 · handler chunk 67592bfd…b097.

All three phases in one call — greeting protected, carrier-confirmed disarm, caller input resumed:

Real-call trace excerpt on 2026.9.6-pr159144.052846f (redacted: callId->call-A, providerCallId->sid-A; numbers/hosts/URIs/tokens stripped; caller speech in text= blanked). Shows greeting-protection armed; the caller's barge-in was suppressed during the window (muted to provider + local speech suppressed) so the greeting audio was never cleared; carrier-confirmed disarm (reason=carrier-confirmed); and caller input resumed after disarm.

2026-09-28T18:35:16.634+02:00 [voice-call] realtime greeting protection armed callId=call-A providerCallId=sid-A maxMs=30000
2026-09-28T18:35:16.650+02:00 [voice-call] realtime caller audio muted to provider during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.751+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.773+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.791+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.835+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.838+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.853+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.871+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.891+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.911+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.932+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.953+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.972+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.994+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.012+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.031+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.053+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.193+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.214+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.233+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.252+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.271+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.291+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.311+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.331+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.356+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.372+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.391+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.412+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.431+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.451+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.530+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.551+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.572+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.594+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.612+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.631+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.652+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.671+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.692+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.713+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.732+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.752+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.771+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.794+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.812+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.831+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.852+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.872+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.892+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:24.498+02:00 [voice-call] realtime greeting protection awaiting carrier playout callId=call-A providerCallId=sid-A mark=openclaw-greeting-complete-0
2026-09-28T18:35:25.103+02:00 [voice-call] realtime greeting protection disarmed callId=call-A providerCallId=sid-A reason=carrier-confirmed
2026-09-28T18:35:27.527+02:00 [voice-call] realtime local speech detected callId=call-A providerCallId=sid-A
2026-09-28T18:35:27.529+02:00 [voice-call] realtime outbound audio cleared by local barge-in callId=call-A providerCallId=sid-A queuedBytes=0
2026-09-28T18:35:29.891+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=false chars=32 aggregateChars=32
2026-09-28T18:35:33.848+02:00 [voice-call] realtime outbound audio cleared by provider barge-in callId=call-A providerCallId=sid-A queuedBytes=800
2026-09-28T18:35:35.258+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=false chars=9 aggregateChars=42
2026-09-28T18:35:36.814+02:00 [voice-call] realtime outbound audio cleared by provider barge-in callId=call-A providerCallId=sid-A queuedBytes=12640
2026-09-28T18:35:38.095+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=false chars=4 aggregateChars=47
2026-09-28T18:35:38.411+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=true chars=45 aggregateChars=45
2026-09-28T18:35:38.684+02:00 [voice-call/lifecycle] [voice-call] Call finalized callId=call-A providerCallId=sid-A endReason=completed
Capture and redaction procedure
  1. Start the voice-call host with stdout captured (foreground 2>&1 | tee or journalctl -u <unit> -f -o cat).
  2. Place one outbound call with an initial greeting; answer; stay silent ~2 s, then barge in once, then speak normally; hang up.
  3. Keep only the [voice-call] realtime lines for that callId from the set listed above.
  4. Redact: callId/providerCallId → pseudonyms; strip numbers, SIP URIs/hostnames/endpoints, credentials.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call size: S labels Sep 26, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 4, 2026, 2:49 PM ET / 18:49 UTC (Revision 14).

ClawSweeper review

What this changes

The voice-call plugin protects opening greetings from interruption until carrier playback is acknowledged, temporarily replacing caller input with silence and adding carrier-boundary regressions.

Merge readiness

⛔ Blocked before merge - 3 items remain

This remains a useful, proven fix that main does not provide. Earlier findings are addressed; the unresolved blocker is owner acceptance of the stalled-greeting caller experience.

Priority: P1
Reviewed head: bc75528a1f76bbaa245a5dbdbf4548e4cdf36066
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong real-call evidence and meaningful carrier-boundary regressions support a sound repair; the outstanding caller-experience choice remains separate from patch quality.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Redacted real-call logs from the deployed 3a11eaf build exercise the webhook's greeting protection, carrier-confirmed release, and resumed caller transcription. Relevant behavior is retained through the reviewed revisions; later changes deduplicate logs and repair test synchronization/teardown. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): Redacted real-call logs from the deployed 3a11eaf build exercise the webhook's greeting protection, carrier-confirmed release, and resumed caller transcription. Relevant behavior is retained through the reviewed revisions; later changes deduplicate logs and repair test synchronization/teardown. No stored-data contract changes.
Evidence reviewed 8 items Pinned introduced behavior: The main-to-head delta adds greeting protection to both interruption paths, caller-audio suppression, carrier acknowledgment, and terminal cleanup. Ownership matches the host's pinned introduction evidence.
Main and release still need the fix: Current main forwards caller audio and clears queued audio on barge-in without this greeting window. Inspection of the latest release, v2026.9.8, also found no greeting-protection implementation. The same-author linked report remains open: #159139.
Real-call after-fix evidence: The redacted trace at #159144 (comment) identifies the deployed build from 3a11eaf, suppressed interruption during the greeting, carrier-confirmed release, and subsequent caller transcription and normal interruption. Source comparison found only suppression-log bookkeeping changes in the greeting state block since that evidence.
Findings None None.
Security None None.

How this fits together

The voice-call plugin connects telephony audio to realtime voice providers. Its webhook handler paces assistant speech to the carrier and controls when caller speech can interrupt playback.

flowchart TD
  A[Caller audio] --> B[Voice-call handler]
  C[Initial greeting] --> D[Realtime voice provider]
  D --> E[Paced carrier playback]
  E --> F[Playback acknowledgment]
  F --> B
  B --> G[Greeting protected?]
  G -->|Yes| H[Send silence to provider]
  G -->|No| D
Loading

Decision needed

Question Recommendation
Should an initial greeting suppress caller speech for up to 30 seconds without provider completion or carrier acknowledgment, or should the greeting enter an explicit recovery outcome sooner? Define stalled-greeting recovery: Choose a bounded, visible recovery outcome while retaining carrier-confirmed protection for successfully generated greeting audio.

Why: Protecting a delayed greeting and keeping the caller responsive conflict in the stall case; changing that tradeoff requires voice-call product intent.

Before merge

  • Resolve merge risk (P1) - If the greeting provider stalls or its playback acknowledgment never arrives, existing calls can discard caller speech for up to 30 seconds; the voice-call owner has not accepted that experience or selected a recovery policy.
  • Complete next step (P2) - Have the voice-call owner accept the 30-second stalled-greeting mute or specify the recovery behavior required before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.
Agent review details

Security

None.

PR surface

Source +179, Tests +533. Total +712 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 180 1 +179
Tests 1 533 0 +533
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 713 1 +712

Review metrics

Metric Value Why it matters
Caller-audio suppression Up to 30 seconds; no new setting The new opening-call policy applies automatically to existing calls with an initial greeting.
Production versus regression growth Production net +179 lines; tests +533 lines Production growth implements greeting lifecycle and acknowledgment handling, with carrier-boundary regressions providing distinct failure coverage.

Merge-risk options

Maintainer options:

  1. Choose a greeting-stall recovery policy (recommended)
    Have the voice-call owner specify how stalled greetings recover without dropping prolonged caller input.
  2. Accept up to 30 seconds of suppression
    Record explicit owner acceptance of the existing caller-audio suppression backstop.

Technical review

Best possible solution:

Preserve carrier-confirmed greeting protection while giving stalled greetings an owner-approved recovery outcome that avoids prolonged unexplained caller silence.

Do we have a high-confidence way to reproduce the issue?

Yes, source establishes the current-main failure path: an early local or provider interruption clears queued opening audio. The linked report supplies an official-release call scenario; this review did not execute it.

Is this the best way to solve the issue?

Unclear for the stall case: carrier acknowledgment is the appropriate playback boundary, but unconditional prolonged caller suppression still needs an owner-approved recovery policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0816aa1b57dc.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: The linked official-release report describes opening greetings consistently being cut off, including consent or introductory questions.
  • merge-risk: 🚨 message-delivery: The introduced protection can silently discard caller speech for up to 30 seconds during a greeting stall.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): Redacted real-call logs from the deployed 3a11eaf build exercise the webhook's greeting protection, carrier-confirmed release, and resumed caller transcription. Relevant behavior is retained through the reviewed revisions; later changes deduplicate logs and repair test synchronization/teardown. No stored-data contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. Redacted real-call logs from the deployed 3a11eaf build exercise the webhook's greeting protection, carrier-confirmed release, and resumed caller transcription. Relevant behavior is retained through the reviewed revisions; later changes deduplicate logs and repair test synchronization/teardown. No stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Obtain the voice-call owner's explicit stalled-greeting recovery or 30-second suppression decision.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (13 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-28T10:56:47.843Z sha 052846f6309e34c121f51050b0f62fd94c55beb1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-28T16:49:23.168Z sha 052846f6309e34c121f51050b0f62fd94c55beb1 :: blocked before merge. :: [P1] Release greeting protection when continuity resets playback
  • reviewed 2026-09-28T16:57:07.466Z sha 052846f6309e34c121f51050b0f62fd94c55beb1 :: blocked before merge. :: [P1] Release greeting protection when continuity resets playback
  • reviewed 2026-09-28T18:36:59.507Z sha 118ac3d4703fc071b8614c21636718ebea9e5863 :: blocked before merge. :: [P1] Keep caller speech from interrupting a late greeting | [P1] Do not complete protection for a cancelled greeting
  • reviewed 2026-09-28T20:28:55.290Z sha 3a11eaf075fb14a86636d49d6ca754a6a6c0cda0 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-29T03:47:46.766Z sha 3a11eaf075fb14a86636d49d6ca754a6a6c0cda0 :: blocked before merge. :: [P2] Log suppressed speech once per protection window | [P3] Replace polling in the new carrier regression suite
  • reviewed 2026-09-29T07:06:02.133Z sha c5e76628db1a38d1f37dddf85e30f8286baa00ad :: blocked before merge. :: [P3] Replace polling waits in the carrier regression suite
  • reviewed 2026-09-29T17:48:33.865Z sha 5e3c640ef7873b00542c9c2be68976e691b48c46 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 26, 2026
@mnowrot

mnowrot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The findings from the last review have been addressed on the current head; the PR body now carries a "Review response" section with the reworked behaviour and the after-fix regression tests (names + exact command + observed result). passes on the branch.

@clawsweeper

clawsweeper Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@mnowrot

mnowrot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@mnowrot

mnowrot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Real-call proof on head 052846f6309

Artifact under test: @openclaw/[email protected] — built from this PR's source at head 052846f6309 and loaded by the voice-call host. Build hashes: tarball efe73021…89b4 · dist/index.js 3f26cdc9…6f40 · handler chunk 67592bfd…b097.

Real-call trace excerpt on 2026.9.6-pr159144.052846f (redacted: callId->call-A, providerCallId->sid-A; numbers/hosts/URIs/tokens stripped; caller speech in text= blanked). Shows greeting-protection armed; the caller's barge-in was suppressed during the window (muted to provider + local speech suppressed) so the greeting audio was never cleared; carrier-confirmed disarm (reason=carrier-confirmed); and caller input resumed after disarm.

2026-09-28T18:35:16.634+02:00 [voice-call] realtime greeting protection armed callId=call-A providerCallId=sid-A maxMs=30000
2026-09-28T18:35:16.650+02:00 [voice-call] realtime caller audio muted to provider during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.751+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.773+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.791+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.835+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.838+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.853+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.871+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.891+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.911+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.932+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.953+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.972+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:22.994+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.012+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.031+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.053+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.193+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.214+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.233+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.252+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.271+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.291+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.311+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.331+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.356+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.372+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.391+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.412+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.431+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.451+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.530+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.551+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.572+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.594+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.612+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.631+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.652+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.671+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.692+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.713+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.732+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.752+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.771+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.794+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.812+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.831+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.852+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.872+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:23.892+02:00 [voice-call] realtime local speech suppressed during greeting protection callId=call-A providerCallId=sid-A
2026-09-28T18:35:24.498+02:00 [voice-call] realtime greeting protection awaiting carrier playout callId=call-A providerCallId=sid-A mark=openclaw-greeting-complete-0
2026-09-28T18:35:25.103+02:00 [voice-call] realtime greeting protection disarmed callId=call-A providerCallId=sid-A reason=carrier-confirmed
2026-09-28T18:35:27.527+02:00 [voice-call] realtime local speech detected callId=call-A providerCallId=sid-A
2026-09-28T18:35:27.529+02:00 [voice-call] realtime outbound audio cleared by local barge-in callId=call-A providerCallId=sid-A queuedBytes=0
2026-09-28T18:35:29.891+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=false chars=32 aggregateChars=32
2026-09-28T18:35:33.848+02:00 [voice-call] realtime outbound audio cleared by provider barge-in callId=call-A providerCallId=sid-A queuedBytes=800
2026-09-28T18:35:35.258+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=false chars=9 aggregateChars=42
2026-09-28T18:35:36.814+02:00 [voice-call] realtime outbound audio cleared by provider barge-in callId=call-A providerCallId=sid-A queuedBytes=12640
2026-09-28T18:35:38.095+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=false chars=4 aggregateChars=47
2026-09-28T18:35:38.411+02:00 [voice-call] realtime input transcript callId=call-A providerCallId=sid-A final=true chars=45 aggregateChars=45
2026-09-28T18:35:38.684+02:00 [voice-call/lifecycle] [voice-call] Call finalized callId=call-A providerCallId=sid-A endReason=completed

@mnowrot

mnowrot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 28, 2026
@mnowrot

mnowrot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Fix for the Rev 7 P1 — head 118ac3d4703

[P1] Release greeting protection when continuity resets playback (realtime-handler.ts:1068-1070)

On session.continuity.reset the handler now retires the greeting window (disarmGreetingWindow("continuity-reset")) before the pacer reset can wipe pendingMarkAcks, so the discarded completionMarkName can no longer pin muteCallerAudio to the 30 s GREETING_PROTECTION_MAX_MS backstop after provider continuity resets.

  • Source — extensions/voice-call/src/webhook/realtime-handler.ts (+1 line, in the session.continuity.reset branch).
  • Regression — extensions/voice-call/src/webhook/realtime-handler.greeting-protection.test.ts (+67 lines): carrier-boundary test that arms the real completion mark, asserts caller silence, fires session.continuity.reset, and asserts a clear frame is emitted, the caller audio path resumes, and barge-in works again — all before GREETING_PROTECTION_MAX_MS.

Verification (local, on this head)

Check Result
Focused greeting-protection suite 6/6 passed
Full voice-call extension suite 687 passed / 9 failed
oxlint (changed files) 0 warnings / 0 errors
typecheck (tsgo) deferred to CI

The 9 failures are pre-existing and unrelated: all in extensions/voice-call/index.test.ts / index.lifecycle.test.ts (plugin runtime bootstrap). A baseline run with this patch reverted shows the identical 9-failure set (686 passed), so the change introduces none.

@clawsweeper re-review

@mnowrot

mnowrot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks @clawsweeper — re-reviewing the two Rev 11 findings.

P2 (suppression log once per window) — fixed. greetingLocalSpeechSuppressionLogged is declared at greeting-window scope and reset on both armGreetingWindow and disarmGreetingWindow, so the [voice-call] realtime local speech suppressed during greeting protection … line emits at most once per protection window instead of per audio frame. The message text and the return false veto are byte-identical — no change to trace-redactor markers or barge-in behaviour. Commit c5e76628db1, fast-forwarded onto fix/voice-call-greeting-protection.

P3 (vi.waitFor test polling) — dropped, not rewritten. I attempted the event-driven rewrite and it regressed two of seven cases: the clear-frame count moved 2→3, and the late-greeting mute test timed out because the deferred it awaited never resolves. Rather than weaken assertions or paper over a race, I reverted the test file unchanged. The existing suite stays green (7/7 focused) and its waits are a deliberate, bounded harness choice here rather than an incidental waitFor-for-sleep smell. If you want the event-driven version, the root cause is the providerAudio.frames.length = 0 buffer-reset semantic and I'll take it as a focused follow-up instead of folding a fragile rewrite into this fix.

Verification. Focused greeting-protection suite 7/7 (wall ~9 s). Full voice-call lane 688 passed / 9 failed; the 9 failures are the pre-existing plugin registration/lifecycle cases in index.test.ts/index.lifecycle.test.ts, unchanged from baseline. oxlint 0/0 on the touched file. Ran via node_modules/.bin/vitest directly — the host is offline and pnpm refuses to start because it can't verify its package-manager identity (ERR_PNPM_PNPM_ENGINE_IDENTITY_UNVERIFIABLE); that's a host/network condition, not a repo issue.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 29, 2026
@mnowrot

mnowrot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

P3 (polling waits in the carrier regression suite) — addressed

Fixed in 5e3c640ef78. Changes are confined to
extensions/voice-call/src/webhook/realtime-handler.greeting-protection.test.ts;
every assertion and the observed frame ordering are preserved.

Why the polling was load-bearing

The audio pacer paces on real setTimeout/performance.now(), while the
suite fakes Date/setInterval. Sampling array lengths with vi.waitFor
therefore synchronised across two independent clocks and raced two real events:

  • the continuity-reset path emits its second clear ~1 ms after the first, so a
    length snapshot taken between them reads clearCount = 1 where the settled
    value is 2 — the barge-in predicate then matches the reset's clear instead of
    the barge-in clear;
  • in the late-greeting test, advanceTimersByTime could fire the greeting poll
    before the pacer had drained, leaving hasPendingAudio() true, so the
    completion mark was never armed and the awaited deferred never resolved (the
    15 s timeout).

What changed

  • observeCarrierFrames exposes waitForFrame(predicate) — it checks frames
    already seen, otherwise resolves on the next match.
  • bridgeCreated is a deferred resolved inside the bridge factory, replacing the
    "callbacks defined" poll.
  • expectCallerAudio arms a deferred before sending the caller frame and awaits
    the bridge sendAudio callback; the audio loop awaits a counter rather than
    sampling a length.
  • The two ordering-sensitive tests await the pacer's own openclaw-playout-*
    boundary before snapshotting / advancing the fake clock.

No sleeps, timers, or vi.waitFor are used as synchronisation — grep -n "vi.waitFor" over the file returns nothing.

Evidence

  • Focused suite: Test Files 1 passed (1), Tests 7 passed (7), exit 0.
  • oxlint on the file: 0 warnings, 0 errors.
  • Full extensions/voice-call lane: Test Files 2 failed | 59 passed (61),
    Tests 9 failed | 688 passed (697) — identical to the baseline before this
    change (index.test.ts, index.lifecycle.test.ts). No new failures.

Tradeoffs worth recording

  1. The drain waits key on the pacer's openclaw-playout-* mark cadence (one mark
    per 160 ms of queued audio). That cadence is an internal detail, not a
    contract: if it changes, these waits would hang rather than fail loudly. A
    pacer-level "drained" signal would be a cleaner test seam — kept minimal here
    and flagging it for the maintainer.
  2. The file still reports 6.76 s wall, above the repository's 5 s target — but
    that is transform (43%) + import (43%) of the extension bundle; test execution
    is 4% (~0.27 s). The polling the finding was about is gone.

The separate 30 s stalled-greeting mute decision is untouched by this change.

@mnowrot

mnowrot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

P3 (polling waits in the carrier suite) is addressed in 5e3c640ef78 — details in the comment above.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 29, 2026
@mnowrot

mnowrot commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Ready for maintainer review at head 5e3c640ef78.

Both open findings from the last review pass are addressed — P2 (suppression-log dedup) and P3 (replaced the greeting suite's vi.waitFor polling with carrier-event awaits; the details and the remaining trade-offs are in the comment above). ClawSweeper re-review is queued.

.github/CODEOWNERS has no entry for extensions/voice-call, so tagging the maintainers who have been working this path per commit history and the Foundation people page: @vincentkoc @steipete

mnowrot and others added 9 commits October 4, 2026 20:37
An outbound realtime call queued its opening greeting as one large audio burst.
A barge-in arriving while that burst was still queued - the local speech gate, or
a provider VAD interrupt - cleared the whole burst and cancelled the greeting
turn, so the callee heard only the first sliver and sat in silence (a live
outbound call lost a 53760-byte opening 0.3s after the callee said "Hello").

Arm a greeting-protection window when the provider becomes ready with an initial
greeting. While armed:

- cancelOutputAudioForBargeIn returns early and the audio sink ignores
  reason === "barge-in", so neither barge-in path clears outbound audio or
  cancels the greeting turn;
- the caller's audio is muted to the provider (mu-law silence) so a barge-in is
  never taken as a user turn.

The window disarms once the greeting has genuinely played out - the turn is
complete, the pacer is drained and the line has been quiet for a sustained
interval - or after a hard timeout, whichever comes first, and on session close,
so normal barge-in resumes afterwards.
oxlint's typescript(no-base-to-string) rule flags data.toString() on the
untyped ws message payload and fails the changed-extensions lint lane.
Type the callback as RawData and normalize to a Buffer like the sibling
realtime-handler test.
…yout

The opening greeting is queued as one large audio burst. Protection used to
release on a sustained-quiet heuristic or, once the completion mark was
queued, on a short fixed grace. Both substituted for the carrier's own
playout signal: a stalled pre-audio window kept caller audio muted past the
point the provider could answer, and the mark grace released before the
carrier had actually played the greeting tail.

- Separate "window armed" from "caller audio muted" so a stalled pre-audio
  wait releases caller audio while the window stays armed for a late burst.
- Drop the mark-grace release; protection now ends only on carrier
  acknowledgement, an explicit failed/incomplete/no-audio outcome, session
  close, or the 30s outermost backstop.
- Let onResponseDone treat a completed turn with no audio as terminal.
- Tests drive the real completion mark and prove silence/non-silence via
  observable media using selective fake timers.
A continuity reset discards the queued greeting and its pending carrier mark acknowledgement. Disarm the greeting window before clearing playback because there is no longer a greeting tail to protect; this promptly restores caller audio and barge-in without changing the carrier-confirmed normal path.
…d greeting

Keep caller audio muted to the provider for the whole pre-audio greeting
window instead of releasing it after 3 s, so a delayed greeting cannot be
barged in before its first chunk. Release only on a terminal signal: a
response that ends without audio, a cancelled response, or the 30 s
backstop.

Treat a cancelled response as its own terminal case: end greeting
protection without arming a completion mark behind partial output.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…window

The realtime local-speech suppression veto fires per audio frame during
greeting protection and logged on every trigger, flooding the console for the
whole protection window. Gate the log behind greetingLocalSpeechSuppressionLogged,
reset on both armGreetingWindow and disarmGreetingWindow so each window emits the
message at most once. The emitted text and the veto (return false) are unchanged,
so trace-redactor markers and barge-in behaviour are unaffected.
…of polling

Replace the vi.waitFor sampling in the greeting-protection carrier suite with
event-driven awaits, preserving every assertion and the frame ordering:

- bridge creation: a deferred resolved inside the bridge factory replaces the
  "callbacks defined" poll
- provider audio: expectCallerAudio arms a deferred before sending the caller
  frame and awaits the bridge sendAudio callback; the 4-frame loop awaits a
  counter, not a length sample
- carrier frames: observeCarrierFrames exposes waitForFrame(predicate), which
  checks existing frames first and otherwise resolves on the next match
- drain: wait for the pacer's own openclaw-playout-* boundary before the
  fake-clock poll re-runs, since the pacer paces on real time while the suite
  fakes Date/setInterval

No sleeps or timers are added as synchronization. Focused suite 7/7, oxlint
clean.
…g suite

The rebase onto current main picks up the shared connectCarrierStream helper,
which now registers onTestFinished(ws.terminate(); handler.close();
server.close()). The greeting suite also tore down the same resources itself,
so its server.close() ran a second time and the promisified close callback
rejected with ERR_SERVER_NOT_RUNNING, failing every test in the file.

Drop the duplicated teardown and the now-unused `server` binding, keeping only
test-local cleanup (vi.useRealTimers, log.mockRestore) and unwrapping the two
try/finally blocks that became empty. This matches the base's own
realtime-handler.lifecycle.test.ts usage (`const { ws } = await
connectCarrierStream(handler)`).
@mnowrot
mnowrot force-pushed the fix/voice-call-greeting-protection branch from 5e3c640 to bc75528 Compare October 4, 2026 18:41
roboclaw-bot added a commit that referenced this pull request Nov 3, 2026
…ptions (#191584)

Preserve the opening voice-call response and its queued carrier playback when
early caller speech or noise would otherwise trigger local or provider barge-in.
Withhold overlapping input through the opening, then restore normal interruption
after response completion and playback drain. Reuse the existing audio controller
and playback clock, excluding the answering-machine hold acknowledgement.

Supersedes #159144, thanks @mnowrot.

Co-authored-by: mnowrot <[email protected]>
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Thanks @mnowrot for finding and developing this fix! The focused replacement landed in #191584 (399cb0b), with your authorship preserved. Its fake-carrier regression fails on main and passes with opening protection, later turns still allow barge-in, and CI passed. Closing this as superseded by that merged fix.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
…ptions (openclaw#191584)

Preserve the opening voice-call response and its queued carrier playback when
early caller speech or noise would otherwise trigger local or provider barge-in.
Withhold overlapping input through the opening, then restore normal interruption
after response completion and playback drain. Reuse the existing audio controller
and playback clock, excluding the answering-machine hold acknowledgement.

Supersedes openclaw#159144, thanks @mnowrot.

Co-authored-by: mnowrot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: realtime outbound call's opening greeting is cut off by barge-in a fraction of a second in

2 participants