Repository navigation
feat(talk): add macOS realtime Gateway relay - #128204
Conversation
Co-authored-by: Zhilong Zheng <[email protected]>
Co-authored-by: Zhilong Zheng <[email protected]>
Co-authored-by: Zhilong Zheng <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review Replacement PR at exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 9:55 AM ET / 13:55 UTC. ClawSweeper reviewWhat this changesAdds a default-off macOS Talk path that streams audio through a Gateway realtime relay, with native speech fallback and documented configuration. Merge readinessKeep open for maintainer proof-sufficiency review. Static review found no discrete patch defect, but physical-Mac and directly inspected Codex-protocol evidence remain necessary for a merge decision. Priority: P2 Review scores
Verification
How this fits togethermacOS Talk captures speech and plays responses locally while the Gateway owns agent and realtime sessions. This adds an opt-in pinned relay between Mac audio I/O and the Gateway, falling back to native Talk when relay startup or recovery fails. flowchart LR
A[Voice and Talk toggle] --> B[Talk configuration]
B --> C{Compatible realtime tuple}
C -->|yes| D[Pinned Gateway relay]
C -->|no| E[Native Talk]
D --> F[Mac capture and playback]
D -->|failure| E
E --> G[Visible Talk state]
Decision needed
Why: The native fallback limits blast radius, but the changed path owns real audio hardware recovery and consumes a provider path explicitly tied to Codex realtime v3. Before merge
Agent review detailsSecurityNone. PR surfaceDocs +69, Other +4217. Total +4286 across 18 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Validate the GPT-Live contract against the Codex source and attach a redacted physical-Mac relay, restart, and route-transition run before landing the opt-in path. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect report; this is a new capability, and the open evidence gap is an after-fix physical-Mac demonstration. Is this the best way to solve the issue? Unclear; the implementation follows the existing Gateway and shared Apple relay seams, but direct protocol and device evidence is still needed to establish it as the best safe landing path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b26ee4fb3500. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles)
|
Co-authored-by: Zhilong Zheng <[email protected]>
|
@clawsweeper re-review Exact head moved to |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Co-authored-by: Zhilong Zheng <[email protected]>
|
@clawsweeper re-review Exact head moved to |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* feat(talk): add macOS realtime relay transport Co-authored-by: Zhilong Zheng <[email protected]> * feat(talk): integrate realtime relay with macOS Talk Co-authored-by: Zhilong Zheng <[email protected]> * fix(talk): keep realtime bootstrap config redacted Co-authored-by: Zhilong Zheng <[email protected]> * fix(talk): surface failed native fallback Co-authored-by: Zhilong Zheng <[email protected]> * test(talk): inject deterministic relay capture Co-authored-by: Zhilong Zheng <[email protected]> --------- Co-authored-by: Zhilong Zheng <[email protected]>
Related: #71195
Related: #116201
Replaces: #118499
What Problem This Solves
macOS Talk could not use the bounded shared Apple Gateway realtime relay now landed on
main. The original contributor PR #118499 was automatically closed when its stacked base branch was deleted, and its fork head does not allow maintainer edits, so it cannot complete the repository landing workflow.This is the narrow macOS-only C layer. It deliberately does not reuse broader draft #119321, which combines additional settings and localization surfaces outside this layer.
Why This Change Was Made
The macOS app receives one pinned Gateway lease for config lookup, relay creation, and event subscription; explicit capture and output-route handling; bounded recovery; and a guarded native fallback. Realtime remains local-opt-in and activates only for a complete compatible provider/model/transport tuple. Native Talk remains the default.
The bootstrap request omits secret-bearing config. If the pinned realtime attempt fails, native fallback fetches the full Talk configuration lazily and commits it only after rechecking lifecycle, recognition, relay, startup, and session ownership. If native recognition also cannot start, the same owner boundary now publishes an idle terminal state and localized visible status instead of returning silently.
No Gateway protocol, shared Apple relay, iOS, Android, Web, dependency, SQLite, generated locale JSON, or
.xcstringscontract changes are included.User Impact
macOS users who explicitly enable Gateway realtime Talk get route-pinned microphone capture, bounded terminal recovery, and visible native fallback. Stale startup, route, recognition, and fallback work cannot overwrite the current Talk owner. The documented opt-in path names the actual Voice & Talk settings tab.
Evidence
Exact artifact
3a50b7a448c64472b956986d1bf23493595dc95450cd2d0d134cf6dd527b1c757133959915cde9ab031b5dfc56ee2a030a98b9f62f6faf519ce49403272f9d33395fdf76de66da482358a9f15bbf0617b4116e475bc3fc07d05c4602e98147fa2ced13734840f92cf5e798ce137aa613Source mapping from the closed contributor PR:
6667f43c77ce9a003770e173ad751721598a03a4->e80c5a4050026b6f6eded063442a36e230e975ebf983fb0e73672bbb1913a9ab7408842f5e4a9591->3a7cf53cb214101f3fd12c484d9e8242debc2c82b5aa4be8c157d06398f57679cdd7ad4539351ff2->1251b54891b344d63bd91d23c54a983ac009718043bb10c7fd24dfd9e958300076ec32283d7ce6cf50cd2d0d134cf6dd527b1c757133959915cde9abAll five commits are signed and preserve
Co-authored-by: Zhilong Zheng <[email protected]>.Scope and LOC
+2401/-225+22/-2+2036/-102+69/-0+110/-0Verification
changed=falseapps, docsgit diff --check: cleanmain: no actionable findingsThe mechanical restack conflict regression initially failed Swift parsing because current-main recovery tests and C realtime tests shared an insertion point; the resolved tree preserves both suites. Hosted CI then exposed three full-bootstrap runtime tests constructing the physical microphone on a headless runner; the DEBUG-only runtime capture factory keeps release behavior unchanged while those tests now exercise the real bootstrap/lifecycle owner deterministically. Exact-head CI https://github.com/openclaw/openclaw/actions/runs/32644369167 passed on attempt 2 after rerunning only the unrelated
src/agents/workspace.bootstrap-cache.test.tsshard;macos-swiftpassed on attempt 1. The exact-head ClawSweeper refresh is queued; the prior fresh review had no findings, and repository policy does not block landing on a queued publisher refresh.Codex boundary
Personally checked current sibling
openai/codex@e1831db7c31ec3ec3a88f29e95cc336858038bad:codex-rs/app-server-protocol/src/protocol/v2/turn.rs:206-212carries thread and turn identity.codex-rs/app-server/src/request_processors/turn_processor.rs:1409-1453treats an empty turn ID only as startup interruption; a non-empty ID must match the active turn and is acknowledged afterTurnAborted.Remaining proof
Rank-up moves: current Codex source inspection is complete. Exact-head physical Mac proof is explicitly skipped for this landing: no completed relay turn, audible microphone/speaker operation, clean restart, or speaker/headphone route change is claimed. Tests and hosted CI are not live-device proof. The maintainer accepts this scoped opt-in availability gap as follow-up evidence.
Release Note
macOS: add opt-in Gateway realtime Talk with pinned transport ownership, redacted bootstrap configuration, bounded recovery, visible terminal fallback failure, and native fallback. Thanks @zhilong1115.