Skip to content

refactor(macos): remove write-only voice wake state - #106468

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/macos-voice-wake-dead-state
Jul 13, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/macos-voice-wake-dead-state

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

The macOS Voice Wake runtime retained a private listening-state model that was only written and never read. That stale state implied lifecycle authority it did not have and could drift from the runtime's actual capture and configuration state.

Why This Change Was Made

Remove the unused enum, property, and three assignments while preserving the real lifecycle owners (isCapturing, currentConfig, recognition tasks, and push-to-talk coordination). pauseForPushToTalk() still calls stop(dismissOverlay: false) unchanged.

User Impact

No user-visible behavior changes. The runtime now has one less misleading state path to maintain.

Evidence

  • Exhaustive symbol search found exactly five references: the declaration, property, and three writes; there were no reads or test dependencies.
  • swiftc -frontend -parse apps/macos/Sources/OpenClaw/VoiceWakeRuntime.swift
  • swiftformat --lint apps/macos/Sources/OpenClaw/VoiceWakeRuntime.swift --config config/swiftformat
  • swiftlint lint --strict --config config/swiftlint.yml apps/macos/Sources/OpenClaw/VoiceWakeRuntime.swift
  • OPENCLAW_TESTBOX=1 changed gate: Blacksmith Testbox run 29260131827; all five macOS-related Vitest shards passed.
  • Fresh gpt-5.6-sol medium autoreview: clean, confidence 0.99. The repository reviewer rejected the full file because existing unrelated content triggered its secret-like-content guard, so the review used a sanitized behavior-complete slice containing the exact six-line deletion plus source, history, ownership, and validation evidence.
  • Open-PR overlap audit found no semantic overlap. Draft PR Create Claw agent and root install record #101755 touches the same file in a large stacked branch but retains this state unchanged.

AI-assisted: yes. I reviewed the complete change and validation evidence. No transcript is attached.

@vincentkoc vincentkoc self-assigned this Jul 13, 2026
@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos size: XS maintainer Maintainer-authored PR labels Jul 13, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 13, 2026 15:03
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 13, 2026
@clawsweeper

clawsweeper Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 13, 2026, 12:19 PM ET / 16:19 UTC.

Summary
Removes a private macOS Voice Wake enum, stored property, and three assignments whose values were never read.

PR surface: Other -6. Total -6 across 1 file.

Reproducibility: not applicable. This PR removes demonstrably write-only private state rather than fixing a user-visible failure; the exhaustive symbol audit is the relevant verification path.

Review metrics: none identified.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🌊 off-meta tidepool
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Next step before merge

  • No automated repair is needed; the patch has no concrete defect and should proceed through normal maintainer review and exact-head checks.

Security
Cleared: The six-line Swift deletion changes no permissions, secrets, dependencies, downloads, build hooks, or other security-sensitive boundary.

Review details

Best possible solution:

Land the narrow deletion while retaining isCapturing, currentConfig, recognition tasks, and VoiceSessionCoordinator as the authoritative lifecycle surfaces.

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

Not applicable: this PR removes demonstrably write-only private state rather than fixing a user-visible failure; the exhaustive symbol audit is the relevant verification path.

Is this the best way to solve the issue?

Yes. Deleting the unused private model and its assignments is the narrowest maintainable solution because no caller reads it and the real lifecycle owners remain unchanged.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P3: This is a low-risk internal cleanup with no intended user-visible behavior change.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored internal cleanup has no visible behavior to demonstrate; the supplied Swift parsing, lint, symbol audit, and Testbox evidence are appropriate.

Label justifications:

  • P3: This is a low-risk internal cleanup with no intended user-visible behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored internal cleanup has no visible behavior to demonstrate; the supplied Swift parsing, lint, symbol audit, and Testbox evidence are appropriate.
Evidence reviewed

PR surface:

Other -6. Total -6 across 1 file.

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 1 0 6 -6
Total 1 0 6 -6

What I checked:

Likely related people:

  • Nimrod Gutman: CONTRIBUTING.md explicitly associates Nimrod Gutman with the iOS and macOS applications, making this the strongest repository-documented routing signal for Voice Wake runtime changes. (role: macOS app area owner; confidence: high; files: apps/macos/Sources/OpenClaw/VoiceWakeRuntime.swift, apps/macos/Sources/OpenClaw/VoiceSessionCoordinator.swift)
  • steipete: Recent repository discussion reviewed Apple voice-session and wake-word coordination and tied it to current voice implementation work, making steipete a useful adjacent reviewer for lifecycle invariants. (role: recent adjacent voice reviewer; confidence: medium; commits: b5e5f2cede6c; files: apps/macos/Sources/OpenClaw/VoiceSessionCoordinator.swift, docs/platforms/mac/voicewake.md)
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.

@vincentkoc
vincentkoc merged commit 898ef1f into main Jul 13, 2026
133 of 139 checks passed
@vincentkoc
vincentkoc deleted the refactor/macos-voice-wake-dead-state branch July 13, 2026 21:54
@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: macos App: macos maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS 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