fix(ios): avoid inactive Voice Wake audio startup#100370
Conversation
|
Codex review: stale review; fresh review needed. Summary Next step Review history (3 earlier review cycles)
|
|
Merged via squash.
|
There was a problem hiding this comment.
💡 Codex Review
When agentActivity is enabled for a direct-message account, handleClickClackInbound passes the resolved turnProvenance into sendClickClackText, but this DM branch drops it because createDirectMessage has no provenance option. Channel and thread replies get author_model/author_thinking, while DM final replies do not, contradicting the new docs/channels/clickclack.md attribution behavior for final agent-authored posts. Please thread the provenance through the DM create path too.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
* fix(ios): avoid inactive voice wake audio startup * fix(ios): avoid inactive voice wake audio startup * fix(ios): avoid inactive voice wake audio startup
What Problem This Solves
The iOS Debug app aborted during launch on Simulator even when Voice Wake was disabled.
NodeAppModeldisables Voice Wake during initialization; teardown still accessedAVAudioEngine.inputNode, which initializes RemoteIO. The simulator audio service deadlocked and CoreAudio aborted the process after its RPC timeout.Why This Change Was Made
Voice Wake teardown now uses the existing recognition request as the pipeline-lifetime sentinel. It removes the input tap only after
startRecognitioncreated a pipeline that may have installed one, then clears the request. Inactive teardown no longer touchesinputNode; active and failed-start teardown still remove the tap before releasing the request.This is the narrow owner-boundary fix: no simulator special case, no audio fallback, and no change to enabled Voice Wake behavior.
User Impact
The iOS app launches normally when Voice Wake is disabled, including Simulator development builds, and avoids unnecessary microphone audio initialization on inactive cleanup.
Evidence
Initialize: RPC timeout. Apparently deadlocked; the crash stack wasVoiceWakeManager.tearDownRecognitionPipeline()→AVAudioEngine.inputNode→AURemoteIO::Initialize().xcodebuild ... -only-testing:OpenClawTests/AppCoverageTests test— 2/2 passed on iPhone 17 Simulator, includingvoiceWakeStartReportsUnsupportedOnSimulator()and itsstop()cleanup.scripts/ios-run.sh— full iOS Debug build passed, installed, and launched on iPhone 17 Simulator.VoiceWakeManager.swift.