Skip to content

feat: use connected Gateway voice in Companion - #1915

Closed
roboclaw-bot wants to merge 1 commit into
mainfrom
openclaw/gateway-voice-replacement
Closed

roboclaw-bot wants to merge 1 commit into
mainfrom
openclaw/gateway-voice-replacement

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Companion cannot use Gateway-only speech providers, including Fish Audio. Related: #1702. Replacement for #1889 (feat: use connected Gateway voice in Companion); original unchanged.

User Impact

User impact: opt-in Gateway speech; remote keys and unchanged local node/MCP defaults.

The known microphone playback-muting issue is outside this PR and will be addressed in a separate PR.

Current-head Windows evidence is below. One Tray CI assertion remains unresolved; no merge-readiness claim.

Why This Change Was Made

Reuse authenticated transport/native playback with epoch retirement and no retry/local fallback. Includes App/TestApp crash regression; recovery-only microphone repair excluded.

Evidence

October 30 v2/proof3: head e8e0c08d873499127556ce387a22c30ae06e4ff3, tree 94b0c3e2bcf9681bb5a81365ef100859cf67e942. Prerequisite check and ./build.ps1 -NoTrustRepository passed all 5 targets. All 33 source hashes and 4 product binaries match across supplements. App SDK 2.6.4; manual source/build/loaded-module association, not signed attestation.

V2: native Fish Read Aloud; same-binary repeat human confirmation: "Yes, audible and stopped early." Status cleared/Read Aloud returned. Proof3: real read-only authority, deterministic retirement and expanded-panel Axe below.

Current expanded panel

Historical only: 1f7d651586a39e376d241f0c78e4ae71619ff8f9 + 4-file local correction; Fish preview/manual/automatic and inward MCP Windows. Before, after.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-winui-interactive: targeted Fish/Stop, authority, sampled retirement and live expanded-panel Axe verified; not a whole-pool claim.
  • windows-clean-installer-upgrade: unrun. Settings compatibility below is not signed-installer upgrade proof.

Validation

Original CI run 40895316793, attempt 1, not rerun: Shared 4842 pass/8 skip (all 32 GatewaySpeechTests pass); Connection 1700 pass/1 skip; CLI 129 pass; standard accessibility 23/23; ordinary Tray UI 577 pass/35 skip; Functional UI 19/19. All 4 ExistingSpeechProfile_GatewayVoiceIsOptInAndPreservesLocalProvider cases PASS (windows/piper/kokoro/elevenlabs).

Tray: 4752 pass/1 fail: ChatComposerControllerTests.Dispose_VoiceCancellationCallbackCanWaitForReentrantControllerWork, Assert.True(callbackWorkCompleted), line 1335. Test/controller match base; baseline cause/flakiness NOT proved. CI Gate is not a second independent failure; dependent skips are not passes. Canonical runner had no verdict; current-head Sweeper had no code findings and requested evidence now supplied.

Real Behavior Proof

  • Environment tested: Windows/current isolated app; real Gateway 2026.10.10-beta.3/15dffe5.
  • PR head or commit tested: Current head/tree above; no source edits.
  • Exact steps or command run: Primary records below; v2 Fish/Stop, proof3 openai/local WAV backend.
  • Evidence after fix: Parent-inspected records/code (not executed during audit); v2 34 checksums/33 manifest rows; proof3 82/81 match.
  • Observed result: Allowed speech, read-only refusal, sampled retirement and expanded-panel Axe.
  • Screenshot or artifact links verified? Current image attached above; private ZIP/helpers not published.
  • Not verified or blocked: Tray assertion; microphone muting/recovery separate PR; installer upgrade unrun.
Primary-record excerpts and limits

B (disposable real Gateway): actual hello scopes=[operator.read], both RPCs advertised; issued-device credential, no shared/admin fallback. Allowed openai/WAV 128044 bytes: backend 0->1. Read-only status succeeds; production SynthesizeSpeechAsync=PermissionRequired, backend 1->1; same-identity raw tts.speak=GatewayPermissionRequired, backend 1->1. Production DLL/real handshake/server, not mocked grants or native read-only UI. Final helper hash captured after persistence-tooling fixes; exact earlier helper binary hash absent; product unchanged.

C request 45839a25-d556-4292-be9b-509fc02f5cab, Windows UTC: forwarded 18:44:50.130; persisted opt-out false 18:45:04.130; authentic late ok transport-send 18:45:04.269, unchanged response SHA; socket still open. Restored true 18:45:36.504; ready/no old resume. Positive 4s/660Hz WAV: 64 active/65 above-threshold samples, peak .15259518. Corrected phase: 1215 zero-activity samples; 845 post-delivery over 52.686s, 328 post-restore over 20.451s; zero peaks/query errors. Last sample 18:45:56.955 exceeds original 60s deadline 18:45:50.130; max gap ~92ms. Calibrated target-PID CoreAudio samples, NOT measured Play-call counts/recording; successful transport send, no callback instrumentation. Windows ordering is separate from WSL clock. Invalid first click retained (still on/audio played). Backend calls: protocol control, native calibration, invalid setup, corrected retirement. Provider openai, not repeated Fish.

D: PID48360/HWND0x60175C; toggle ON, all 5 controls + 2 descriptions visible. Axe2.4.2: Passed, 0 violations; unchanged canonical E8 AxeHelper, only existing NameIsInformative, NameExcludesControlType, NameExcludesLocalizedControlType, SiblingUniqueAndFocusable exclusions. No extras. Product EXE SHA256 C7A72C8187A6FDFE34D3873DD8647F89C4B5DC4340A301FACFA9A56A8DDDCA71.

Tooling caveat: early helper save error invoked default logger before private overrides; normal diagnostic append/rotation possible, unverified. No normal logs read/exported; no normal settings/credentials intentionally changed.

Security Impact

  • New permissions or capabilities? No new grants; existing operator scopes.
  • Secrets or tokens handling changed? No provider-key copying.
  • New or changed network calls? Yes: tts.status/tts.speak.
  • Command or tool execution surface changed? No.
  • Data access scope changed? Yes: opted-in text to Gateway/provider.
  • If any answer is Yes, explain the risk and mitigation: Opt-in, epoch/scope checks, bounded audio/timeouts, finite errors; no replay/fallback.

Compatibility and Migration

  • Backward compatible? Four existing-provider profile cases pass.
  • Config or environment changes? Local UseGatewayVoice defaults false.
  • Migration needed? No.
  • If yes, list the exact upgrade steps: None.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

Worked on by

Work sessions

Worked on by:
- @PollyBot13

Co-authored-by: PollyBot13 <[email protected]>
OpenClaw-Publication: 381b8d19-0116-46ea-9413-a46dfcabb6a2
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🦞👀
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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 29, 2026
@clawsweeper

clawsweeper Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex review: blocked before merge.

What this changes

This PR adds opt-in Gateway speech for Companion previews, Read Aloud, and automatic replies.

Example: A connected Gateway has Fish Audio configured, while Companion uses Windows speech locally.

  • Before: Read Aloud uses Companion's local provider and cannot use the Gateway's Fish voice.
  • After: Enabling Use connected Gateway voice sends speech text through the authenticated Gateway and plays the returned audio on Windows.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful implementation with credible runtime and authority evidence; compatibility proof and required validation remain incomplete.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Companion cannot speak with providers configured only on its connected Gateway, including Fish Audio.
Reason: The supplied maintainer-authorship fact establishes direction, and the generic integration provides concrete value without copying provider keys or replacing local defaults.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this PR open: it delivers a useful capability still absent from main, with no definite introduced bug found, but landing remains blocked.

Priority: P2
Reviewed head: e8e0c08d873499127556ce387a22c30ae06e4ff3

Before merge

  • Resolve merge risk - Before merge, a maintainer must establish whether the failed reentrant voice-cancellation assertion is patch-caused or independently reproducible; unchanged test and controller source do not settle causality.
  • Complete next step - Resolve GitHub's reported merge conflict while retaining main's host/composer visibility handling and this PR's speech-target updates.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

None.

Tests

  • Missing end-to-end proof: Fresh-install and v2026.9.8-1 upgrade runs preserving settings and provider selections remain unverified.
Agent review details

How this fits together

Companion's chat coordinator routes speech text through the existing operator connection; the Gateway synthesizes audio, and the existing native playback service plays validated MP3 or WAV bytes.

flowchart LR
A[Chat or voice preview] --> B[Chat coordinator]
B --> C[Gateway speech lifetime]
C --> D[Authenticated operator client]
D --> E[Gateway speech provider]
E --> F[Validated audio]
F --> G[Native Windows playback]
Loading

Technical review

Best possible solution:

Land the opt-in Gateway route through the existing operator and native playback owners after resolving the recorded landing blockers.

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

Main's provider selector and coordinator demonstrate the missing Gateway speech route; supplied current-head Windows observations demonstrate the new route, without executing target code during this review.

Is this the best way to solve the issue?

Gateway delegation avoids maintaining another provider-specific Windows client, while preserving local node/MCP synthesis and its existing fallback contract.

AGENTS.md: found and applied where relevant.

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the opt-in Gateway route through the existing operator and native playback owners after resolving the recorded landing blockers.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Provenance checked

  • Native chat speech routing and microphone playback muting keeps the original intent (08cab69: The native chat implementation routed Read Aloud through configured synthesis and managed capture muting during playback.)
  • Configured local-provider fallback changes intended behavior with a stated reason (ff5cafb: Unavailable configured local providers fall back to Windows, while explicit provider requests remain strict; the opt-in Gateway route deliberately adds no local fallback.)
  • Operator request admission and response correlation keeps the original intent (64d505b: Application RPCs must wait for hello-ok and remain bound to the authenticated connection generation; speech reuses those checks and the existing pending-response registry.)
  • Composer lifecycle and effective conversation selection keeps the original intent (686afdc: Composer sessions own mounted-host workflow lifetime while selection stays with existing chat owners; the new speech callback consumes the effective thread projection.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Régis Brid: Raw commit 08cab69 adds src/OpenClaw.Tray.WinUI/Chat/OpenClawChatCoordinator.cs:108 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 08cab69a038c; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatCoordinator.cs)
  • Barbara Kudiess: Raw commit ff5cafb adds src/OpenClaw.Tray.WinUI/Chat/OpenClawChatCoordinator.cs:143 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ff5cafb52f52; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatCoordinator.cs)
  • Pedro Larroy: Raw commit 2a33672 adds src/OpenClaw.Tray.WinUI/Services/SettingsManager.cs:150 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2a33672baedb; files: src/OpenClaw.Tray.WinUI/Services/SettingsManager.cs)

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a useful optional speech integration with a concrete Gateway-only provider use case and limited blast radius.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

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

  • Provide fresh-install and v2026.9.8-1 upgrade evidence showing existing settings and provider selections remain intact.
  • Establish the failing Tray assertion's cause without weakening its concurrency contract.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-29T15:07:19.221Z sha e8e0c08 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-30T19:39:25.768Z sha e8e0c08 :: blocked before merge. :: none

Reviewed October 30, 2026, 3:45 PM ET / 19:45 UTC (Revision 3).

@roboclaw-bot

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. 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: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Oct 30, 2026
@roboclaw-bot

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #1968, which states it supersedes this PR and preserves the original roboclaw-bot attribution. Requested by @vyctorbrzezowski. Branch left in place.

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

Labels

P2 Normal priority bug or improvement with limited blast radius. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant