Repository navigation
feat: use the connected Gateway voice for Companion replies - #1968
shanselman merged 19 commits into
Conversation
Co-authored-by: PollyBot13 <[email protected]>
Co-authored-by: PollyBot13 <[email protected]>
Worked on by: - @PollyBot13 Co-authored-by: PollyBot13 <[email protected]> OpenClaw-Publication: 8f40a17d-1fc8-46cf-b0d1-6f88c50ad0f4
The case creates two unrelated state objects despite naming voice services. The real-service overlapping playback test already protects independent lease ownership, with separate shared-domain transition coverage retained. Keep production and the recorded hardware proof inputs unchanged.
Mark chat generation retirement before fresh admission while draining cancellation callbacks outside the coordinator lock. Reject cancelled native playback under the active-player lock before selecting an interrupt target. Keep explicit Stop behavior and cover the real admission boundary plus cross-thread recovery callbacks. The admission regression failed before correction and passes with the fix; all 34 focused native playback/capture tests pass.
User-requested empty commit to start fresh CI after the prior native UI test-host abort and superseded hosted review. Preserve the exact reviewed and hardware-tested source tree; no files or runtime behavior change.
Worked on by: - @PollyBot13 Co-authored-by: PollyBot13 <[email protected]> OpenClaw-Publication: 381b8d19-0116-46ea-9413-a46dfcabb6a2 (cherry picked from commit e8e0c08)
|
Codex review: blocked before merge. What this changesAdds an opt-in route for Companion Read Aloud and automatic replies to use the connected Gateway’s speech provider. Example: Companion uses Windows speech locally, while its connected Gateway has Fish Audio configured.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep open: main still lacks Gateway speech delegation, and this PR provides distinct work with no identified source findings and passing current-head CI. Priority: P2 Decision needed
Before merge
FindingsNone. Agent review detailsHow this fits togetherThe chat coordinator sends opted-in speech text through the existing authenticated operator client, validates returned MP3/WAV audio, and uses the existing native player; inward node/MCP speech retains local provider selection. flowchart LR
A[Native chat speech] --> 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 player]
Technical reviewBest possible solution: With owner approval, land the opt-in route through the existing operator client and native player after its playback-muting dependency. Do we have a high-confidence way to reproduce the issue? Main’s selector, provider dispatch, and chat coordinator establish the missing Gateway speech route; this review executed no target code. Is this the best way to solve the issue? Gateway delegation avoids duplicating provider clients and keys in Windows. The invariant is that only current, authorized speech reaches the existing player while local defaults remain intact. The narrowed implementation reuses the request registry, native player, effective conversation projection, and dependency-owned mute domain without an unnecessary parallel provider system. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a4dd026cc5f8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (7 earlier review cycles)
Reviewed November 1, 2026, 9:37 AM ET / 14:37 UTC (Revision 8). |
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
@clawsweeper re-review Requested for head CI investigation update (2026-11-01)No product source, workflow filters, assertions or skip rules were changed. Both task worktrees remained clean. Local runs used separate temporary settings/appdata/localappdata roots, Windows x64 Debug and the installed Windows App Runtime 2.6.4.
Main control output (copied from its fresh TRX): The chat layout test file, shared UI fixture and composer control have identical Git blobs on main and the PR. These controls establish native UI instability on unchanged main as well as on this candidate. They do not establish that every abort has the same cause or rule out a PR contribution. The CI cause remains unclassified and CI is still red; no baseline waiver or speculative fix is claimed. The downloaded CI artifact SHA-256 matched GitHub's recorded digest A failed-jobs-only hosted retry was attempted through both the GitHub integration and the existing author sign-in. GitHub refused both; the author response was HTTP 403, |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Current-head runtime evidence is now published and the PR body updated for
Independent proof/privacy audit and all loaded-module hashes are included. No production source changed. Please assess the two actual shipped retirement boundaries separately rather than crediting a delivered-late permission test that the reconnect path did not execute. Still open: owner decision on the default-off Gateway voice opt-in, #1949 landing, and repository-admin CI investigation/retry. No rating or merge-readiness claim. Listening update: all three current-run user confirmations are now recorded in |
|
🦞👀 Re-review progress:
|
|
🦞👀 Re-review progress:
|
Author-requested empty commit after the required native UI test-host abort. Preserve the exact reviewed and runtime-tested tree; no source, tests or build inputs changed. Request fresh CI validation without claiming a fix for the prior failure.
|
Per the author's request, empty commit f5ecde0a requests fresh CI after the required UI test-host abort.
The PR body was updated first. Owner approval for the default-off feature and landing #1949 remain separate obligations; this commit does not resolve them. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review CI is now green for unchanged head
The PR body was updated before this request to replace pending-CI wording with the completed result. No additional commits or source/test changes were made. The earlier UI-host abort remains recorded and unclassified; this successful fresh run is not a claimed root-cause fix. Please refresh the review using the completed CI state. The separate maintainer decision on the default-off Gateway voice option and #1949 landing/reconciliation remain unresolved; green CI does not approve either. |
|
🦞👀 Re-review progress:
|
… shared player Co-authored-by: Copilot App <[email protected]>
|
Hi! I'm a Copilot triage agent helping the maintainers (not Scott himself). Since #1949 landed, I merged main into this branch to clear the conflicts. I kept this PR's Gateway voice changes and re-added one thing from #1949: turning on speaker mute still stops the shared player, so agent |
What Problem This Solves
Companion cannot use speech providers configured only on its connected Gateway. Supersedes #1915; related to #1702. Original roboclaw-bot attribution is preserved.
User Impact
Users can opt into Gateway speech for existing Read Aloud and automatic replies. Provider keys stay on the Gateway; local node/MCP speech keeps its local route.
Depends on #1949 (fix: keep Companion playback out of microphone capture). Do not merge first. This branch includes pinned dependency
0c6c5987; Gateway-only diff. Refresh against main after the dependency lands.Why This Change Was Made
Use one authenticated
tts.speakcall and the existing native player. The Gateway owns provider selection/fallback. Keep opt-in, audio limits, finite errors, Stop and target/permission/connection retirement.Dedicated readiness/preview UI and per-utterance status queries are deferred. Transmission disclosure is visible before opt-in, and invalid replacements cannot interrupt current speech. Capture muting uses #1949’s App-owned leases; this feature adds no parallel mute store.
Evidence
The narrowed feature has 1,765 added lines against main plus #1949, down from 2,060 in the previous standalone feature. Regression controls reproduced rejected-call mute acquisition and cancellation of fresh recovery before correction.
Validation and source-review records. New current-head runtime and authority proof: actual Fish Read Aloud/automatic/Stop render measurements; real issued read-only rejection before provider invocation; persisted permission transport retirement; same-connection authentic late-audio retirement after native Stop; and an actual signed v2026.9.8-1 portable application/data upgrade. The user confirmed current-build manual and automatic Fish audibility and counting stopped before forty. Earlier-build Fish/preview evidence stays historical.
Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: focused consent/status rendering and Gateway speech behavior. Record completed checks and remaining limits below; no whole-pool claim.Validation
Current PR head is
f5ecde0a2ea50e5c97420010a24c5cab4cc6b036, an author-requested empty CI-restart commit whose parent isc98608cf0dd934d3a29ff79111ec2c65da6f8a4c. Both have the identical full tree1881b78edf3334d473e155733c3e8f58e4b94eca; no source, tests or build inputs changed. Earlier validation and runtime records below retain their actual executed commit and loaded-binary hashes; tree equality does not claim a new execution or a fix for the prior CI abort. Fresh Build and Test CI, attempt 1, passed on this head, completing at 2026-11-01 14:18 UTC: 15 successful jobs and 7 skipped jobs, including successful UI/functional/accessibility tests and CI Gate. These are job totals, not test-case counts or whole proof-pool coverage.Tested head
c98608cf0dd934d3a29ff79111ec2c65da6f8a4c, tree1881b78edf3334d473e155733c3e8f58e4b94eca; integration comparison base331da8fbis maina4dd026cplus pinned #1949. Separate temporary data/appdata/localappdata roots per invocation../build.ps1 -NoTrustRepository: all 5 targets passed, including documentation checks.dotnet test tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4,826 passed / 1 failed / 27 skipped.dotnet test tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 4,836 passed / 0 failed / 0 skipped.dotnet test tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -r win-x64 --no-restore --filter "FullyQualifiedName~GatewaySpeechPermissionTests|FullyQualifiedName~ChatPlaybackMutingTests|FullyQualifiedName~VoiceServicePlaybackMutingTests|FullyQualifiedName~AudioPipelineFirstAudioTimeoutTests|FullyQualifiedName~SetupNativeChatWarningTests": 51 passed / 0 failed / 0 skipped.One earlier full Tray run timed out in an unchanged Local AI test; its isolated check passed, then serial full Tray passed. The timeout cause remains unclassified. An existing dependency test needed explicit TTS permission in its setup; the corrected full affected suite passed.
The unchanged Windows symlink-privilege failure is retained; the prior exact main control reproduced it. The original PR1915 cancellation CI failure remains unclassified. Hosted CI run 41296958343 failed because its Tray UI test host aborted. CI investigation and clean-main controls reproduce native UI instability on main, but the specific CI cause remains unclassified. GitHub denied a direct failed-jobs retry with HTTP 403 requiring repository admin rights. The author-requested empty commit triggered new run 41313247633, whose UI job and CI Gate passed. The earlier failed run is retained and its abort cause remains unclassified; fresh CI no longer needs a maintainer retry.
Real Behavior Proof
2026.10.10-beta.3,15dffe5) with local synthetic WAV provider. No microphone/recording; normal app/shared Gateway unchanged.c98608cf0dd934d3a29ff79111ec2c65da6f8a4c. Four loaded module hashes match the frozen build.fish-audio. After Stop, 277 samples contained zero active/above-threshold activity. The user confirmed manual audibility, automatic audibility without Read Aloud, and that the audible counting stopped before forty; the current-run receipt is included and historical answers are not reused. Automatic voice was restored Off.operator.readhello and successfultts.status; current production client returnedPermissionRequired, separate raw Gateway call returnedGatewayPermissionRequired. Both left the synthetic provider counter unchanged at 2 after a positive control moved 1→2. Production assemblies ran in a verified helper; no shipped-UI refusal or Fish claim.NodeTtsEnabled=falseclosed the old authenticated socket before the held genuine response was released (forward_not_open). Restore did not replay; a fresh native request played on a new connection. Native Permissions/tray/MCP share the existing capability-reload/reconnect path. This proves transport retirement, not delivery of late bytes after permission revocation.Security Impact
operator.writeor supported superset.tts.speak.Yes, explain the risk and mitigation: Default-off consent/disclosure, scoped authenticated transport, bounded audio/text/time, sanitized errors and stale-result retirement. No automatic retry/local fallback.Compatibility and Migration
UseGatewayVoice, default false.Review Conversations
Independent findings and dispositions are linked above. Earlier PR discussions and historical failures are retained; publication does not imply merge readiness.