Repository navigation
refactor(android): unify runtime, chat, and voice ownership - #136934
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 3, 2026, 1:01 AM ET / 05:01 UTC. ClawSweeper reviewWhat this changesThe branch consolidates Android gateway runtime ownership, makes pending chat sends durable, distinguishes unloaded settings from empty results, and places Talk capture and finalization under one lifecycle owner. Merge readiness⛔ Blocked before merge - 2 items remain No actionable introduced correctness defect was found, but the maintainer-authored Android refactor remains open pending its stated packaged Android replay evidence and exact-head CI. Priority: P2 Review scores
Verification
How this fits togetherThe Android app’s application runtime owns gateway connections, Room-backed chat recovery, settings summaries, and Talk capture. The foreground service observes that runtime while the UI and notifications show connection and conversation results. flowchart LR
A[Android UI and notifications] --> B[Application runtime]
B --> C[Gateway connections]
B --> D[Room chat outbox]
B --> E[Settings summaries]
B --> F[Talk capture]
C --> G[Foreground service and UI status]
D --> G
E --> G
F --> G
Before merge
Agent review detailsSecurityNone. PR surfaceTests +1110, Docs +1, Other -215. Total +896 across 50 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Attach redacted packaged Android replays for text chat/reconnect and native Talk with APK/source binding, confirm exact-head CI, then merge the unified ownership model. Do we have a high-confidence way to reproduce the issue? Yes for focused source and boundary paths; this read-only review did not execute Android tests or packaged APKs. Is this the best way to solve the issue? Yes; the canonical application runtime, Room outbox, nullable loading state, and single listening owner remove the competing ownership paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 19e4c043d01f. 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 (1 earlier review cycle)
|
Keep service observation separate from process connection ownership; fence retired requests without retiring established connections. Require canonical Room chat storage and persist unresolved sends before watchdog cancellation. Distinguish unknown settings summaries from loaded-empty results. Keep native Talk capture, finalization, and config reload under their lifecycle owners, and inherit session thinking policy. Validation: 5,407 phone tests and 174 Wear/shared tests; both phone APKs and Android lint/ktlint; native source i18n verification; independent P2 review. Native packaged flow evidence follows in the PR.
2db5dcf to
bdd8117
Compare
|
Merged via squash.
|
Wait for lazy dialog modules before starting DOM readiness polling. Gate subprocess timeout fixtures on native readiness and exit events while keeping their original timeout, signal, pipe-drain, and ownership assertions. Reproduced four dialog failures with delayed real imports and two subprocess failures with delayed child startup; all six pass after synchronization. Normal caller/owner coverage: 672 tests passed, one platform skip. Changed gates and an independent Codex P0-P2 review passed. No production changes. Related: #136934 Fixes #136708
…#136934) Keep service observation separate from process connection ownership; fence retired requests without retiring established connections. Require canonical Room chat storage and persist unresolved sends before watchdog cancellation. Distinguish unknown settings summaries from loaded-empty results. Keep native Talk capture, finalization, and config reload under their lifecycle owners, and inherit session thinking policy. Validation: 5,407 phone tests and 174 Wear/shared tests; both phone APKs and Android lint/ktlint; native source i18n verification; independent P2 review. Native packaged flow evidence follows in the PR.
) Wait for lazy dialog modules before starting DOM readiness polling. Gate subprocess timeout fixtures on native readiness and exit events while keeping their original timeout, signal, pipe-drain, and ownership assertions. Reproduced four dialog failures with delayed real imports and two subprocess failures with delayed child startup; all six pass after synchronization. Normal caller/owner coverage: 672 tests passed, one platform skip. Changed gates and an independent Codex P0-P2 review passed. No production changes. Related: openclaw#136934 Fixes openclaw#136708
Related: #112901 (iOS native Talk thinking inheritance). Integrated with #135934.
What Problem This Solves
Android could show empty counts after a failed first settings load, reconnect after the user stopped it, or recognize native Talk speech without sending it. A chat watchdog could also cancel its own coroutine before recording an unresolved send.
This is a broad cleanup of chat, process/service lifetime, settings summaries, and voice—not a rewrite of every app component.
Why This Change Was Made
Use the existing Room outbox, application runtime, loaded-or-unknown summary, and listening coroutine as the respective owners. Delete competing paths and unused projections.
low, matching iOS fix(ios): native Talk respects session thinking level #112901 and macOS.The rebase preserves #135934's recognizer/audio retirement, scoped callbacks, relay admission, physical playout, and transcript-only history/run-snapshot ownership. No replacement compatibility path was added. Compact composer/model controls and six-line drafts remain covered.
No SQLite schema, live database path, migration, protocol, dependency, or configuration-surface changes. Android Talk settings reload is improved; Gateway server restart policy is unchanged.
Handwritten production: +813 / −1,028 = −215 lines. Tests/support: +1,825 / −715 = +1,110. Docs: +4 / −3. Generated native inventory: +3 / −3, source-site references only; translation IDs and strings unchanged.
User Impact
Disconnect remains stopped until intentional reconnect. Native Talk sends recognized phrases and preserves capture ownership. Settings no longer present failed first loads as healthy empty data. Durable chat keeps its existing Room-backed recovery contract.
Evidence
Original failing reproductions use
e7951df4578ba3eb5833ea60659799fdfe68616a. Current head isbdd81178af67e7d7e28d0bbf5b3b4f81c53bbe2d, integrated against3100ba535f1d003d67a6a7536deacf8666367b38.Final exact-head proof: 2,707 Play + 2,838 third-party phone tests, 164 Wear + 10 shared tests = 5,719 passed, all freshly executed with zero failures/errors/skips. Both phone APKs, both phone lint lanes, and app/Wear/shared/benchmark ktlint passed. Source hashes remained unchanged.
The final APK is stamped to
bdd81178af67e7d7e28d0bbf5b3b4f81c53bbe2d, build time2026-09-03T04:51:42.033Z, SHA-256441ea57430c9d0715fe7b47d1ab9b082487e3e468a96f73cf3c7297ca3ec3cf7. Normal install retained app data. Native text, native Talk, true-cold Channels failure/recovery, both Disconnect paths, same-PID hot reopen/rotation, explicit reconnect, and post-reconnect Send passed. Three sends each produced one exact reply; all prior canonical history remained byte-for-byte preserved (28→34 messages), with no active run. A frozen ledger binds 74 artifacts and 11 lifecycle observations to this APK. This verifies canonical Gateway history, not direct Room rows.Exact-head CI is green, including all six Android jobs and
openclaw/ci-gate. The first run failed only an unchanged web placement-restart test waiting for a lazy-loaded dialog. An unchanged local replay passed 14/14 tests; one unchanged hosted failed-job rerun passed. The test's one-second wait includes cold lazy imports; timing is an evidence-supported inference, not a proven failure cause. No assertion, timeout, or production change was made to get green.Native testing uses a task-owned API 36 emulator, real Android Binder/SpeechRecognizer with a fixed synthetic recognition result, a real isolated Gateway pinned to
36eb0c1ec3fc1f2ee26152d238be6374b14df41b, and scripted loopback inference. It does not establish physical microphone capture, ASR quality, external-provider inference, or audible playback.ClawSweeper's latest exact-head pre-merge and Rank-up requests are addressed: packaged text/reconnect/Talk evidence and APK/source binding are attached below, fresh independent review is clean, and exact-head CI is green. Temporary test permissions/configuration were restored and owned test services stopped.
Named follow-ups: web placement-dialog readiness should join lazy imports before its existing DOM wait (separate from the Android change); audit secondary-Gateway fleet snapshot invalidation (no defect claimed here); correct the pre-existing Gateway settings label that says “Not paired” for a disconnected but still paired node (observed in native testing, not changed in this PR).
Packaged screenshots
Same API 36 emulator at 320 dp, font scale 1.0. The cold-start scenario faults the first three real
channels.statusresponses before any success reaches the app. All captures were inspected in full and contain only synthetic test data.Exact-head recovery after ordinary Refresh shows real loaded-empty data only after a successful response.
Native Talk completed on the exact-head APK
Synthetic speech crosses Android Binder/SpeechRecognizer, sends once, receives the scripted reply, and resumes listening; the test then stops Talk through the normal UI.