Skip to content

refactor(ios): share voice permission support - #120176

Merged
vincentkoc merged 1 commit into
mainfrom
fix/qa-matrix-config-transaction-20260807
Aug 26, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/qa-matrix-config-transaction-20260807

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 7, 2026 •

Copy link
Copy Markdown
Member

Reused Draft

This PR reuses an intentionally non-landing draft because the maintainer account is at the open-PR cap.

  • Previous title: fix(qa): restore Matrix scenario config exactly
  • Previous head: cbf6c9b239f90f5bc23fa48209d25e2fde579c23
  • Previous disposition: draft-only executor output with unresolved review findings and explicit instructions not to land

The previous commit and review history remain available by immutable SHA. They are unrelated to this replacement.

What Problem This Solves

Talk Mode and Voice Wake independently implemented the same microphone request, speech-recognition request, eight-second timeout, and speech authorization message mapping. The copies had already drifted in small callback details and made future permission fixes easy to apply to only one voice path.

Why This Change Was Made

The Voice owner now has one internal VoicePermissionSupport implementation for:

  • microphone authorization
  • speech-recognition authorization
  • timeout handling through PermissionRequestBridge
  • speech authorization status messages

Talk Mode and Voice Wake retain their existing timeout error domains. Voice Wake's microphone-specific denial wording remains local because it has different product behavior. No SDK seam, public API, config, persistence, fallback, or permission policy changes.

User Impact

No behavior change is intended. Talk Mode and Voice Wake still request the same iOS permissions, preserve the same timeout behavior, and show the same denial/restriction messages.

Evidence

  • Exact signed head: 0b92524ec341ea305d9fb4f4d1977c19193c361d
  • Production: +32/-114 (net -82)
  • Tests: +19/-0
  • Generated i18n source map: +3/-7
  • Focused iOS owner suite: 67 tests across 4 suites passed on exact head
  • SwiftFormat: 0 of 361 files require formatting
  • SwiftLint: 0 violations across 361 files
  • Native i18n verification: 4,237 entries, unchanged
  • Debug simulator app build: passed
  • Optimized Release device build with signing disabled: passed
  • Rebase from c3eca4f5081 to 9afc4ef28e7 changed no iOS or native-i18n files; exact-head focused tests, formatting, lint, and i18n verification were rerun
  • Live iPhone 17 simulator flow: Talk Mode produced the real microphone prompt, then the speech-recognition prompt; after granting both, Talk Mode reached On, returned to Off, Voice Wake resumed On, and was restored to Off
  • Physical-device deployment was attempted but stopped before install because development provisioning profiles were absent for the debug app, widget, share, and watch bundle IDs. -allowProvisioningUpdates was not used because it can mutate Apple developer account state
  • Autoreview: clean, correctness 0.99; TruffleHog clean
  • Blacksmith Testbox: tbx_01m0xfz625pg80a04nkdh8s07v
  • Testbox command: pnpm check:changed
  • Testbox result: passed
  • Testbox run: https://github.com/openclaw/openclaw/actions/runs/32905395170

Repair Closeout

  • Root cause: duplicated permission ownership across Talk Mode and Voice Wake
  • Architectural owner: apps/ios/Sources/Voice
  • Canonical fix: one internal Voice permission helper
  • Removed paths: both duplicated Voice Wake request/timeout/message implementations and the Talk-specific permission extension identity
  • Sibling coverage: Talk startup, push-to-talk startup, Voice Wake startup, permission bridge behavior, and speech status mapping
  • Changelog: omitted because this is an internal behavior-preserving refactor

@vincentkoc vincentkoc self-assigned this Aug 7, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 7:51 PM ET / 23:51 UTC.

ClawSweeper review

What this changes

The PR centralizes iOS Talk Mode and Voice Wake microphone and speech-permission handling in one internal Voice helper while preserving feature-specific messages and timeout domains.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for normal maintainer handling: this member-authored, maintainer-labeled PR is a focused net-negative refactor, and no blocking correctness or security finding was identified.

Priority: P3
Reviewed head: 0b92524ec341ea305d9fb4f4d1977c19193c361d
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, net-negative refactor with clear owner-boundary preservation and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The author is a repository MEMBER, so the external-contributor proof gate does not apply; the PR body nevertheless records an after-fix simulator permission flow.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository MEMBER, so the external-contributor proof gate does not apply; the PR body nevertheless records an after-fix simulator permission flow.
Evidence reviewed 7 items Current main still has the duplicated implementation: Current main retains Talk Mode's permission extension and Voice Wake's separate permission helpers, so the central cleanup remains necessary rather than already being implemented.
Shared owner preserves the two timeout identities: The new helper retains the existing eight-second bridge and accepts the caller's timeout domain; Talk Mode and Voice Wake pass their prior domain values explicitly.
Both callers retain their local behavior: Talk Mode keeps its normal and push-to-talk call sites while Voice Wake retains its microphone-specific denial message and listening-state transitions.
Findings None None.
Security None None.

Live Verification

Command: pnpm ios:build

Result: FAIL (failed) — execution before step 1 run: terminal command failed with exit status 1: "pnpm ios:build"

terminal command failed with exit status 1: "pnpm ios:build"

Captured output:
$ bash -c 'export PATH="$PATH:/opt/homebrew/bin:/usr/local/bin"; ./scripts/ios-configure-signing.sh && ./scripts/ios-write-version-xcconfig.sh && node scripts/i
os-write-swift-filelist.mjs && cd apps/ios && xcodegen generate && xcodebuild -project OpenClaw.xcodeproj -scheme OpenClaw -destination "${IOS_DEST:-generic/pla
tform=iOS Simulator}" -configuration Debug build'
WARN: Unable to detect an Apple Team ID; keeping existing iOS signing override (if any).
Prepared iOS version settings: ios=2026.8.1 marketing=2026.8.1 build=1 commit=0b92524ec341ea305d9fb4f4d1977c19193c361d built=2026-08-25T23:52:04.000Z
Prepared iOS Swift file list: apps/ios/SwiftSources.input.xcfilelist
bash: line 1: xcodegen: command not found
[ELIFECYCLE] Command failed.











































Assertions:

  • FAIL expect_output: BUILD SUCCEEDED

How this fits together

Talk Mode and Voice Wake request iOS microphone and speech-recognition permission before capture begins. The shared Voice helper returns permission outcomes to each manager, which retains control of its status text and start/stop state.

flowchart LR
A[User starts a voice feature] --> B[Talk Mode or Voice Wake]
B --> C[Shared permission support]
C --> D{System permission result}
D -->|Granted| E[Start listening or capture]
D -->|Denied or restricted| F[Feature-specific status message]
Loading

Decision needed

Question Recommendation
Should this member-authored iOS refactor proceed through normal maintainer approval on its current head? Review and land the refactor: Accept the shared internal owner after normal exact-head maintainer approval.

Why: The protected maintainer label and MEMBER association require explicit human handling even though the reviewed patch has no blocking finding.

Before merge

  • Complete next step (P2) - Protected member-authored work should remain open for normal maintainer handling; no mechanical repair is indicated.
Agent review details

Security

None.

PR surface

Other -67. Total -67 across 5 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 5 54 121 -67
Total 5 54 121 -67

Review metrics

Metric Value Why it matters
Production versus test delta production +32/-114 (net -82); tests +19/-0; generated i18n +3/-7 The shared owner removes duplicated production logic while adding focused status-mapping coverage.

Root-cause cluster

Relationship: canonical
Canonical: #120176
Summary: The archived Matrix references are unrelated to the replacement iOS refactor.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Retain one Voice-owned permission implementation while keeping each manager's caller-specific timeout domain and presentation behavior explicit.

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

Not applicable: this is a behavior-preserving refactor, not a report of a separate failing product behavior.

Is this the best way to solve the issue?

Yes: a Voice-owned helper removes duplicate permission mechanics without making Voice Wake depend on Talk Mode or changing either feature's local presentation behavior.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a repository MEMBER, so the external-contributor proof gate does not apply; the PR body nevertheless records an after-fix simulator permission flow.

Label justifications:

  • P3: This is a small internal iOS refactor with no intended configuration, API, or user-policy change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a repository MEMBER, so the external-contributor proof gate does not apply; the PR body nevertheless records an after-fix simulator permission flow.

Evidence

What I checked:

Likely related people:

  • steipete: Current blame and path history connect Peter Steinberger with recent maintenance and extensive earlier work on both iOS voice managers. (role: primary historical contributor; confidence: high; commits: 0dd1ca5243f8, f85a458a45bf, 4e008cd713d7; files: apps/ios/Sources/Voice/TalkModeManager.swift, apps/ios/Sources/Voice/VoiceWakeManager.swift)
  • vincentkoc: History shows prior merged iOS Talk work by Vincent Koc, in addition to this focused refactor. (role: recent area contributor; confidence: high; commits: 057ed79f96e0, 1185db56c0d5; files: apps/ios/Sources/Voice/TalkModeManager.swift, apps/ios/Sources/Voice/VoicePermissionSupport.swift)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-07T08:43:54.555Z sha cbf6c9b :: found issues before merge. :: [P1] Restore the destructive scenario's temporary account
  • reviewed August 7, 2026, 5:36 AM ET / 09:36 UTC sha unknown :: found issues before merge. :: [P1] Restore the destructive scenario's temporary account

@vincentkoc
vincentkoc force-pushed the fix/qa-matrix-config-transaction-20260807 branch from cbf6c9b to 0b92524 Compare August 25, 2026 22:19
@vincentkoc vincentkoc changed the title fix(qa): restore Matrix scenario config exactly refactor(ios): share voice permission support Aug 25, 2026
@vincentkoc vincentkoc added app: ios App: ios size: S P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. and removed size: L extensions: qa-lab P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 25, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

The draft was intentionally reused for a new exact-head iOS refactor. The previous Matrix head and findings are archived in the PR body and are not part of the current diff.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@vincentkoc
vincentkoc marked this pull request as ready for review August 25, 2026 22:20
@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 26, 2026
@vincentkoc
vincentkoc merged commit 2671eff into main Aug 26, 2026
167 of 170 checks passed
@vincentkoc
vincentkoc deleted the fix/qa-matrix-config-transaction-20260807 branch August 26, 2026 00:30
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: ios App: ios maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant