Skip to content

fix: restore Voice Wake after failed iOS PTT start#99942

Closed
NianJiuZst wants to merge 1 commit into
openclaw:mainfrom
NianJiuZst:codex/ios-ptt-voicewake-restore
Closed

fix: restore Voice Wake after failed iOS PTT start#99942
NianJiuZst wants to merge 1 commit into
openclaw:mainfrom
NianJiuZst:codex/ios-ptt-voicewake-restore

Conversation

@NianJiuZst

@NianJiuZst NianJiuZst commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where iOS users who had Voice Wake listening could trigger push-to-talk start, hit an early start failure such as a disconnected gateway, and leave Voice Wake paused for external audio capture even though no push-to-talk recording was active.

AI-assisted: yes.

Why This Change Was Made

talk.pttStart now restores the Voice Wake external-audio suspension when beginPushToTalk() throws before capture starts, while preserving the existing successful-start behavior where talk.pttStop or talk.pttCancel performs the resume. A focused invoke test covers the offline-gateway failure path.

User Impact

Voice Wake can recover after failed iOS push-to-talk starts instead of staying silently paused until the user toggles it or restarts the app.

Evidence

  • git diff --check upstream/main...HEAD
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base upstream/main -> clean, no accepted/actionable findings
  • pnpm ios:gen attempted for focused iOS test setup, but this machine is missing xcodegen (bash: xcodegen: command not found), so Xcode test execution is blocked locally.

@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 4, 2026, 8:34 AM ET / 12:34 UTC.

Summary
Adds failed-start cleanup to iOS talk.pttStart so Voice Wake resumes when beginPushToTalk() throws, plus a VoiceWakeManager test accessor and NodeAppModel invoke regression test.

PR surface: Other +28. Total +28 across 3 files.

Reproducibility: yes. from source inspection, but not from an executed iOS run: current main suspends Voice Wake before beginPushToTalk(), and the offline gateway guard throws before stop/cancel cleanup can resume it.

Review metrics: none identified.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted real iOS proof that a failed PTT start resumes Voice Wake without leaking private endpoints, tokens, phone numbers, or other private data.
  • Run pnpm native:i18n:sync and commit the resulting apps/.i18n/native-source.json update so pnpm native:i18n:check passes.
  • Provide focused iOS test output or Testbox/Xcode proof for the new invoke path once the local generator/test setup is available.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body lists diff checks, autoreview, and a blocked local Xcode attempt, but no live iOS/PTT log, terminal output, screenshot, recording, or artifact shows the after-fix behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] No after-fix real iOS/PTT behavior proof is present; the PR body says local Xcode execution was blocked by missing xcodegen.
  • [P1] The required native-i18n check currently fails because the branch has not refreshed apps/.i18n/native-source.json for the new Swift literals.

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow NodeAppModel failed-start cleanup after the branch refreshes native i18n inventory, supplies redacted real iOS proof for failed and successful PTT paths, and keeps existing stop/cancel resume behavior.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Contributor or maintainer action is needed to add real iOS behavior proof and fix the native i18n inventory before normal merge review can finish.

Security
Cleared: The diff only touches iOS Swift app/test code and does not alter dependencies, workflows, scripts, secrets handling, package resolution, or downloaded code.

Review findings

  • [P3] Update the native i18n inventory — apps/ios/Tests/NodeAppModelInvokeTests.swift:695
Review details

Best possible solution:

Land the narrow NodeAppModel failed-start cleanup after the branch refreshes native i18n inventory, supplies redacted real iOS proof for failed and successful PTT paths, and keeps existing stop/cancel resume behavior.

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

Yes from source inspection, but not from an executed iOS run: current main suspends Voice Wake before beginPushToTalk(), and the offline gateway guard throws before stop/cancel cleanup can resume it.

Is this the best way to solve the issue?

Yes, conditionally: NodeAppModel is the right coordination point between Voice Wake and PTT, and the PR mirrors the existing pttOnce/camera defer pattern for failed starts. It still needs inventory sync and real iOS proof before it is merge-ready.

Full review comments:

  • [P3] Update the native i18n inventory — apps/ios/Tests/NodeAppModelInvokeTests.swift:695
    Late note from this same-head re-review: the current native-i18n CI job fails with inventory drift and asks for pnpm native:i18n:sync plus a committed apps/.i18n/native-source.json update. The new Swift literals in this test are part of the PR diff, so the branch cannot pass required checks until the inventory is refreshed.
    Confidence: 0.92
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is correct
Overall confidence: 0.82

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 706443c79b1c.

Label changes

Label changes:

  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded iOS Voice Wake/Talk recovery bug with user-visible impact, but it is limited to the failed PTT start path and has no data-loss or security signal.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body lists diff checks, autoreview, and a blocked local Xcode attempt, but no live iOS/PTT log, terminal output, screenshot, recording, or artifact shows the after-fix behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Other +28. Total +28 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 3 28 0 +28
Total 3 28 0 +28

Acceptance criteria:

  • [P1] pnpm native:i18n:check.
  • [P1] pnpm ios:gen.
  • [P1] xcodebuild test -project apps/ios/OpenClaw.xcodeproj -scheme OpenClaw -destination 'platform=iOS Simulator,name=iPhone 17,OS=26.5' -only-testing:OpenClawTests/NodeAppModelInvokeTests.

What I checked:

Likely related people:

  • mbelinky: Authored the iOS push-to-talk node commands, PTT once/cancel handling, and the original Voice Wake pause during PTT flow that this cleanup path builds on. (role: introduced behavior; confidence: high; commits: 9f101d3a9aae, 1a48bce2947e, 17b18971f17c; files: apps/ios/Sources/Model/NodeAppModel.swift, apps/ios/Sources/Voice/TalkModeManager.swift)
  • PollyBot13: Authored the recent merged Voice Wake external-capture and restart hardening that shares the same audio lifecycle surface. (role: recent area contributor; confidence: high; commits: 2f707f981152, 5bc616588f17, 1c6cf77d45eb; files: apps/ios/Sources/Voice/VoiceWakeManager.swift, apps/ios/Tests/VoiceWakeManagerSuppressionTests.swift)
  • steipete: Merged the adjacent Voice Wake hardening PR and authored a recent follow-up removing Voice Wake taps after failed starts. (role: recent reviewer, merger, and adjacent contributor; confidence: high; commits: 2f707f981152, 933a88cdc66d, 16a5f0b006; files: apps/ios/Sources/Voice/VoiceWakeManager.swift, apps/ios/Sources/Voice/TalkModeManager.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 4, 2026
@NianJiuZst
NianJiuZst force-pushed the codex/ios-ptt-voicewake-restore branch from f9c4743 to 2efc949 Compare July 4, 2026 12:11
@NianJiuZst
NianJiuZst marked this pull request as ready for review July 4, 2026 12:23
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 4, 2026
@steipete steipete self-assigned this Jul 5, 2026
steipete added a commit that referenced this pull request Jul 5, 2026
steipete added a commit that referenced this pull request Jul 5, 2026
* fix(agents): harden LSP process failures

Source: #100450

Co-authored-by: morluto <[email protected]>

* fix(sandbox): report effective workspace layout

Sources: #100435, #100439

Co-authored-by: Aniruddha Adak <[email protected]>

Co-authored-by: ZengWen-DT <[email protected]>

* fix(security): fail install checks on stream errors

Source: #100413

Co-authored-by: 陈宪彪0668000387 <[email protected]>

* fix(android): normalize all-day calendar events

Source: #100032

Co-authored-by: NianJiuZst <[email protected]>

* fix(ios): serialize push-to-talk lifecycle

Source: #99942

Co-authored-by: NianJiuZst <[email protected]>

* fix(talk): reject inherited provider names

Source: #99849

Co-authored-by: zenglingbiao <[email protected]>

* fix(android): stop voice capture in background

Source: #99840

Co-authored-by: xialonglee <[email protected]>

* fix(cron): preserve fallback result classification

Source: #99913

Co-authored-by: jincheng-xydt <[email protected]>

* fix(google): bound Vertex response decompression

Source: #99812

Co-authored-by: 黄剑雄0668001315 <[email protected]>

* fix(plugins): report malformed discovery JSON

Source: #99892

Co-authored-by: 陈宪彪0668000387 <[email protected]>

* test(sandbox): configure non-default workspace fixture

* test: fix small-fix batch validation

---------

Co-authored-by: morluto <[email protected]>
Co-authored-by: ZengWen-DT <[email protected]>
Co-authored-by: 陈宪彪0668000387 <[email protected]>
Co-authored-by: NianJiuZst <[email protected]>
Co-authored-by: zenglingbiao <[email protected]>
Co-authored-by: xialonglee <[email protected]>
Co-authored-by: jincheng-xydt <[email protected]>
Co-authored-by: 黄剑雄0668001315 <[email protected]>
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Thanks @NianJiuZst — your failed-start Voice Wake restoration fix was incorporated into #100483, landed as aaf5ab9. The landed version also serializes session PTT transitions and reference-counts Voice Wake suspension across overlapping PTT owners, so one operation cannot resume wake listening while another still owns the microphone. Contributor credit is preserved. Closing this superseded PR.

@steipete steipete closed this Jul 5, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
* fix(agents): harden LSP process failures

Source: openclaw#100450

Co-authored-by: morluto <[email protected]>

* fix(sandbox): report effective workspace layout

Sources: openclaw#100435, openclaw#100439

Co-authored-by: Aniruddha Adak <[email protected]>

Co-authored-by: ZengWen-DT <[email protected]>

* fix(security): fail install checks on stream errors

Source: openclaw#100413

Co-authored-by: 陈宪彪0668000387 <[email protected]>

* fix(android): normalize all-day calendar events

Source: openclaw#100032

Co-authored-by: NianJiuZst <[email protected]>

* fix(ios): serialize push-to-talk lifecycle

Source: openclaw#99942

Co-authored-by: NianJiuZst <[email protected]>

* fix(talk): reject inherited provider names

Source: openclaw#99849

Co-authored-by: zenglingbiao <[email protected]>

* fix(android): stop voice capture in background

Source: openclaw#99840

Co-authored-by: xialonglee <[email protected]>

* fix(cron): preserve fallback result classification

Source: openclaw#99913

Co-authored-by: jincheng-xydt <[email protected]>

* fix(google): bound Vertex response decompression

Source: openclaw#99812

Co-authored-by: 黄剑雄0668001315 <[email protected]>

* fix(plugins): report malformed discovery JSON

Source: openclaw#99892

Co-authored-by: 陈宪彪0668000387 <[email protected]>

* test(sandbox): configure non-default workspace fixture

* test: fix small-fix batch validation

---------

Co-authored-by: morluto <[email protected]>
Co-authored-by: ZengWen-DT <[email protected]>
Co-authored-by: 陈宪彪0668000387 <[email protected]>
Co-authored-by: NianJiuZst <[email protected]>
Co-authored-by: zenglingbiao <[email protected]>
Co-authored-by: xialonglee <[email protected]>
Co-authored-by: jincheng-xydt <[email protected]>
Co-authored-by: 黄剑雄0668001315 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants