Repository navigation
fix(macos): stop cancelled Voice Wake timers - #116189
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 10:52 PM ET / July 30, 2026, 02:52 UTC. ClawSweeper reviewWhat this changesThe PR makes macOS Voice Wake delayed tasks stop after cancellation so superseded timers cannot restart recognition or leave capture monitoring active. Merge readinessKeep this PR open for normal maintainer review. Current main still lets several Voice Wake delays continue after cancellation, while the proposed guard is focused, covered by a cancellation test, and does not introduce a compatibility, security, or configuration change. Priority: P2 Review scores
Verification
How this fits togetherVoice Wake runs a macOS speech-recognition pipeline that schedules short silence, capture-monitoring, and restart delays around microphone capture. Those delayed tasks feed back into recognizer start/stop transitions and user voice-session handling. flowchart LR
A[Microphone and speech callbacks] --> B[Voice Wake runtime]
B --> C[Delayed silence and restart tasks]
C --> D{Task still active?}
D -->|Yes| E[Capture or restart action]
D -->|Cancelled| F[Exit without stale work]
E --> G[Recognizer and voice session]
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceDocs +1, Other +23. Total +24 across 3 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Land the focused cancellation-aware delay handling after the macOS Swift check completes, preserving the existing Voice Wake lifecycle while ensuring replaced timers cannot perform stale work. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main swallows cancellation from delayed sleeps in the affected Voice Wake paths, and the PR adds a focused cancellation test. A live microphone reproduction was not needed to establish the stale-task mechanism. Is this the best way to solve the issue? Yes. Checking cancellation at each delay boundary is the narrowest maintainable fix because it prevents stale work before it re-enters the Voice Wake actor, rather than attempting to infer cancellation after recognizer state changes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 859280ee1199. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
* origin/main: fix(macos): stop canceled voice wake timers (openclaw#116189) fix(macos): coalesce location permission requests (openclaw#116183) fix(macos): guard remote tunnel restart ownership (openclaw#116172) fix(agents): throw CompactionError when summarization fails (openclaw#115500) fix(test): isolate ACP startup output stream (openclaw#116076) fix(agents): deny all tools when scheduled authority names a removed account (openclaw#115932) fix(test): stop collecting Vydra test helpers (openclaw#116139) fix(discord): preserve webhook deadline errors (openclaw#116155) fix(test): isolate Google embedding batch timeout (openclaw#116161) fix(cron): stop replaying old schedule slots after a cron job is edited (openclaw#115779) fix(plugins): report request timeouts for stalled response bodies (openclaw#116166)
What Problem This Solves
Fixes an issue where cancelling or replacing Voice Wake work could leave delayed tasks running. Those stale tasks could later restart the recognizer or keep capture-monitor loops alive after the active Voice Wake operation had moved on.
Why This Change Was Made
Voice Wake delays now preserve task cancellation instead of swallowing it. Trigger-pause, pre-detect silence, capture monitoring, and recognizer restart all exit before performing stale runtime work when their task is cancelled.
User Impact
Voice Wake no longer lets superseded timers restart the microphone pipeline or continue monitor work in the background, reducing unnecessary runtime activity and avoiding stale recognizer transitions.
Evidence
swift test --package-path apps/macos --scratch-path apps/macos/.build-local --filter VoiceWakeRuntimeTests: 21 tests passed.swiftformat --lint --config config/swiftformat ...: 0 files require formatting.swiftlint lint --strict --config config/swiftlint.yml ...: 0 violations.node scripts/check-changed.mjs -- CHANGELOG.md apps/macos/Sources/OpenClaw/VoiceWakeRuntime.swift apps/macos/Tests/OpenClawIPCTests/VoiceWakeRuntimeTests.swift: passed on Blacksmith Testbox; 211 tests passed, 37 skipped..agents/skills/autoreview/scripts/autoreview --mode branch --base 859280ee11992d5ea4bd72a87d2e53640909de98: clean, no accepted/actionable findings, confidence 0.96.AI-assisted; implementation and proof reviewed by the author.