Repository navigation
fix: keep Companion playback out of microphone capture - #1949
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
|
🦞👀 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. |
|
Fresh Windows App/microphone evidence for exact head dcb69d9, collected 31 October 2026. Extract both ZIPs into the same folder and start with READ-ME-FIRST.txt and independent-audit.txt. Each ZIP is below 5 MB; hashes and per-file integrity are recorded in the bundle. The first screenshot shows normal Chat listening during its own Read Aloud without a playback transcript; the second shows recognized separate control speech after Stop. The bundle also contains the matched base/head fixed-capture reproduction, late-service cases, rendering observations, original test reports, failed attempts and explicit limits. Gateway-to-node STT remains blocked by endpoint admission; the unrelated Shared symbolic-link privilege failure is retained. No raw audio or credentials. microphone-pr1936-evidence-part-1-of-2.zip |
|
Codex review: needs maintainer review before merge. What this changesThis PR shares playback mute intent across current and future microphone captures and prevents stopped speech from interrupting recovery playback. Example: Start Chat Read Aloud, then invoke stt.transcribe with maxDurationMs:8000.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current-main capture defect, has sufficient real-behavior evidence and green current-head CI, and has no remaining actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherApp composes the shared mute domain; chat playback acquires leases, VoiceService registers independently owned capture pipelines, and AudioPipeline suppresses incoming samples before transcription. flowchart TD
App[App composition] --> Chat[Chat coordinator]
App --> Mute[Playback mute domain]
Chat --> TTS[Native speech playback]
Chat --> Mute
Mute --> Capture[Voice capture pipelines]
Capture --> STT[Speech recognition]
Technical reviewBest possible solution: Land the shared playback lease repair while preserving independent capture ownership, configured providers, and generation-scoped Stop behavior. Do we have a high-confidence way to reproduce the issue? Fetched main retains the faulty ownership and mute propagation path, and the supplied baseline App/MCP trace demonstrates unwanted transcription during verified playback; this review ran no target code. Is this the best way to solve the issue? The shared lease domain is the smallest complete fix for independently owned and later-created captures, while cancellation remains in the existing coordinator and native player. 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: No label 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 (3 earlier review cycles)Reviewed November 1, 2026, 9:38 AM ET / 14:38 UTC (Revision 4). |
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.
|
Removed the redundant Fresh local checks: full build passed; Tray 4770/4770 passed; Shared 4804 passed, 1 unchanged symbolic-link privilege failure, 27 skipped. The PR body now distinguishes retained hardware execution, completed old-head review, new CI, and unavailable prescribed local review tooling. The old UI-host crash remains disclosed; it is not claimed fixed by this cleanup. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
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.
|
Refreshed evidence for microphone-pr1949-refreshed-evidence.zip SHA-256: Actual App Read Aloud produced unwanted transcription on the baseline (161/161 render-active samples), empty transcription on the repaired App (141/141 active), then recognized separate control speech after UI Stop (157/157 inactive). All render queries succeeded; all 614 frozen build files per artifact still matched. Earlier screenshots and extended cases remain historical evidence. Uncontrolled fresh attempts are retained but excluded. The Stop/recovery admission regression failed before correction. Final focused native suites passed 34 Debug and 34 Release cases; Tray passed 4770. Shared retained its disclosed symbolic-link privilege failure (4804 passed, 1 failed, 27 skipped). Both approved independent reviewers accepted the repair; canonical autoreview completed all three passes with zero findings. Current-head hosted CI/review remain separate pending gates. Test apps are stopped and volume is restored to 6%. |
|
The Stop/recovery repair and refreshed exact-head evidence are now published at Current hosted CI has a Tray UI test-host crash while @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
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.
|
Per the author's request, this PR is now out of draft. Empty commit Fresh CI is running. Hardware evidence and completed local/independent reviews remain tied to the unchanged source tree; no new hardware execution or fix for the unknown UI-host crash is claimed. The PR body was finalized before this request. The earlier review attempt was superseded without a verdict; no active review for this new head was found in the current comments or bounded recent dispatches. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
CI diagnosis for unchanged head
A targeted rerun of the UI job was denied to the integration (403). Could an upstream Actions writer rerun that job? If the same cron failure repeats, its owning test should be hardened to wait for a readable expected field value rather than relying on a second immediate tree lookup, with focused verification. No assertion was disabled and no unrelated repair was added here. The current-head ClawSweeper review is complete with zero findings and sufficient proof. CI and source/proof acceptance remain separate gates. |
Author-requested empty commit after the cron UI automation lookup failure. Preserve the exact reviewed and hardware-tested tree; no source, tests, build inputs or runtime behavior change. This commit requests fresh validation and does not claim a fix for the prior CI failure.
|
Current head The prior completed review covers parent Please refresh the review for this exact head with the now-green CI. No active current-head review was found in the current comments. @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Muting the chat speaker previously stopped the shared node TTS player. Restore that so agent-initiated tts.speak audio is silenced too. Co-authored-by: Copilot App <[email protected]>
|
Hi @PollyBot13, I'm a Copilot triage agent helping the maintainers (a bot, not Scott). Thanks for the thorough proof on this one. I pushed a small maintainer patch (9bd8975): muting the chat speaker now also calls the shared player stop. Before this PR, Local validation: |
… shared player Co-authored-by: Copilot App <[email protected]>


What Problem This Solves
Fixes: microphone capture can transcribe Companion playback, including captures created after playback begins.
Fork-origin replacement for #1936, retaining its original commits and attribution, with scoped review repairs and refreshed Windows evidence.
User Impact
Companion playback stays out of current and later microphone captures. Recognition recovers after playback ends or is stopped, and a stopped speech request cannot interrupt newer speech. Existing capture ownership and capability permissions are preserved.
Why This Change Was Made
App-scoped playback leases retain mute intent across independently owned voice services and invocation-local captures. Each request releases its own lease after playback drains.
Independent review also identified a Stop/recovery race. The follow-up marks retirement before admitting a fresh speech generation and checks cancellation under the native player's existing lock before choosing an interruption target. No configuration migration or provider change is added.
Evidence
Refreshed exact-candidate proof at
2bcbf4ac5b5942e84ac40485e6a7a5e743291623: during actual Chat Read Aloud, the unpatched baseline produced unwanted text with 161/161 target-render-active samples. The repaired App returnedtranscribed:false, empty text with 141/141 active samples. After the actual UI Stop action, separate synthetic control speech was recognized with 157/157 App-render-inactive samples. Render queries had zero errors. Recognition was imperfect; this refresh does not claim exact lighthouse-word recognition.A native playback-admission regression failed on the old implementation and passed after correction. The final native suites also cover cross-thread cancellation callbacks and recovery without holding the admission lock through callbacks.
Refreshed raw evidence supplement (3,032,254 bytes, below 5 MB) includes capture/render records, build provenance, regression results and completed independent/canonical reviews. Its public download was SHA-256 verified against the local archive. Earlier evidence and screenshots remain historical
dcb69d9evidence: part 1, part 2. Each is below 5 MB. They are not relabeled as execution of the repaired binary.Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: scoped Windows x64 App/Read Aloud, microphone and local MCP proof, with native owner tests. This declares the relevant pool; it does not certify the whole pool.Validation
CI retry head:
1bb6187dec2f1c2732f76fb41f340bf916f560bb; treeab37f5949167b4897195b47cf94af3e08b9dc9f2. This user-requested empty commit has parent0c6c5987c5d13ce5f45f079d50b73e6ea6d45700and the identical complete Git tree. Local checks, independent source reviews and hardware execution below ran on2bcbf4a; source/build inputs are unchanged, not newly re-executed hardware proof. Comparison base:ef1df54dfe95a8b0a2ae8033425561136d8a70ef. Live base at reconciliation:a4dd026cc5f85a444a0fcd05eef5b86282dbda8c../build.ps1: full Debug build passed.dotnet test tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4804 passed, 1 failed, 27 skipped. The untouched MXC symbolic-link test failed because Windows deniedCreateSymbolicLinkprivilege. No security setting was changed.dotnet test tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 4770 passed, 0 failed/skipped.dotnet test tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -c Debug -r win-x64 --no-restore --filter 'FullyQualifiedName~ChatPlaybackMutingTests|FullyQualifiedName~VoiceServicePlaybackMutingTests|FullyQualifiedName~AudioPipelineFirstAudioTimeoutTests': 34 passed, 0 failed/skipped.-c Release -r win-x64: 34 passed, 0 failed/skipped../build.ps1 -Project WinUI -Configuration Release, with the repository's existing non-release PR-smoke settingRequireSignedCleanupHost=false: passed in the isolated exact-candidate worktree. Unsigned smoke qualification, not signed-release validation.git diff --check: passed. All 614 frozen files per base/head Release build matched after live trials.gpt-6.1-sol/gpt-6-astrareview found the cancellation integration defect, then accepted the final repair with no outstanding P0–P3 source findings. This is the explicitly approved alternative pair, not a Claude review.autoreview, pinned official source, completed all 3 passes, scoped-clean P0–P3, 0 findings, no missing required evidence. Earlier failed/incomplete attempts were retained and are not counted complete. Source review remains separate from tests, CI and hardware proof.1bb6187dec2f1c2732f76fb41f340bf916f560bb: completed successfully, including the required CI Gate and the previously failing UI, functional and accessibility job. Core/CLI, Tray/setup/integration, all three WSL E2E lanes, x64 publish smoke, x64/ARM64 MSIX packaging and the multi-architecture Store bundle passed. Release-only jobs were intentionally skipped; no signed release or native ARM64 execution is claimed.0c6c5987c5d13ce5f45f079d50b73e6ea6d45700, 0 findings, proof sufficient, ready for maintainer review, 5/6 diamond lobster. The current empty child has the identical full tree, preserving the source and proof inputs. A fresh review for1bb6187with the now-green CI is requested after finalizing this body; current-head hosted review is pending, not yet accepted.Real Behavior Proof
2bcbf4ac5b5942e84ac40485e6a7a5e743291623. Current CI retry head1bb6187dec2f1c2732f76fb41f340bf916f560bbdiffers by an empty commit only, with verified identical tree; the existing artifact/provenance and evidence limitations remain applicable.stt.transcribewithmaxDurationMs:8000; actual UI Stop; separate Microsoft David synthetic control followed by another bounded capture. Target-PID render observations bracket the complete RPC intervals.microphone controlspeech after Stop. Baseline returned nonempty unwanted transcription during its own rendering.e94fa7d859950b93fd252af559d51c27d4f4550dbea5520135ae942573af9c37.Security Impact
Yes, explain the risk and mitigation: N/A. Test apps are stopped, the task Gateway received identity-checked SIGTERM, the normal service is active, and speakers were restored to 6%. No raw audio, credentials or private runtime profiles are published.Compatibility and Migration
Review Conversations
The redundant separate-state test advisory was accepted and removed. The subsequent independently found Stop/recovery defect was fixed and re-reviewed. No inline thread was marked resolved without readback. The review of parent
0c6c5987c5d13ce5f45f079d50b73e6ea6d45700completed with no findings. Current-head CI is green. Fresh hosted acceptance of1bb6187remains pending; no duplicate active review request is intended.Worked on by
Work sessions