Repository navigation
refactor(native): deslop native apps - #163339
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 7:25 AM ET / 11:25 UTC (Revision 7). ClawSweeper reviewWhat this changesThe PR removes retired iOS connection and credential readers, consolidates native chat forwarding, narrows Swift response handling, and synchronizes an existing cancellation test. Merge readiness✅ Ready for maintainer review Keep open: the cleanup remains distinct from current main, and no actionable introduced bug was found. The earlier blanket upgrade-proof blocker is resolved by verified retirement history and the recorded July support boundary. Priority: P3 Review scores
Verification
How this fits togetherNative apps send chat, sharing, and voice requests to the Gateway through shared transports and platform adapters. The adapters retain connection ownership and routing checks while the Gateway supplies current configuration and responses. flowchart LR
A[Native chat and sharing] --> B[Platform adapter]
C[Gateway configuration] --> D[Native Talk]
D --> B
B --> E[Shared request handling]
E --> F[Gateway]
F --> G[Responses and session results]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceDocs +1, Other -181. Total -180 across 20 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the shared transport consolidation and retire unsupported iOS readers while preserving July-compatible credential, identity, and migration owners. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR primarily retires unsupported paths and consolidates existing behavior; native tests were not executed during this read-only review. Is this the best way to solve the issue? Yes: the changes reuse existing transport owners, preserve platform targeting and dispatch checks, and remove readers whose compatibility obligations fall outside the recorded support window. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e07172ef9092. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
l300 native coverageCurrent file sizes at candidate base Final disposition: five PRs are merged, removing 377 net production lines including the two Gateway-race fixes. The reviewed 41-line follow-up is open with auto-merge armed and exact-head CI recovery underway after an HTTP/2 checkout failure. Inventory: 476 files over 200 lines; 78 fully read, 119 partially read, 279 not fully read.
|
l300 native coverageCurrent file sizes at candidate base Final disposition: five PRs are merged, removing 377 net production lines including the two Gateway-race fixes. The reviewed 41-line follow-up is open with auto-merge armed and exact-head CI recovery underway after an HTTP/2 checkout failure. Inventory: 476 files over 200 lines; 78 fully read, 119 partially read, 279 not fully read.
|
l300 native coverageCurrent file sizes at candidate base Final disposition: five PRs are merged, removing 377 net production lines including the two Gateway-race fixes. The reviewed 41-line follow-up is open with auto-merge armed and exact-head CI recovery underway after an HTTP/2 checkout failure. Inventory: 476 files over 200 lines; 78 fully read, 119 partially read, 279 not fully read.
|
Retire pre-July native client-ID and Talk credential paths, use shared transport owners, remove pure forwarding layers, and narrow Swift request completions to response frames. The remaining native production diff removes 190 net lines. A sibling's independently landed health-decoder cleanup is excluded; its useful clean-JSON assertion is retained. Supported July 2026+ route, cancellation, pairing and lifecycle behavior stays intact.
What Problem This Solves
Native apps retained pre-July connection/credential paths and several forwarding layers that no longer own any behavior.
User Impact
Supported July 2026+ behavior is preserved. iOS no longer retries the pre-rename
moltbot-iosidentity or reads local Talk provider keys whose writer was removed in June; reconnect and Talk use their current configuration owners. No rendered UI, protocol version, schema, or dependency changes.Why This Change Was Made
gateway.manual.clientIdescape hatch (no writer or supported contract found; its July change was only a relocation), and the orphaned local Talk credential reader (writer removed in233b48daaab, June 15).ResponseFrame, their sole successful result type, and remove the impossible non-response branch. Existing scope assertions call the underlying internal predicate instead of a test-only forwarding method.Measured production Swift/Kotlin diff: 83 added, 273 removed; 190 net lines removed. This is a bounded first sweep, not an exhaustive dead-code verdict.
Fixes found along the way
Hosted run
36994275319exposed a pre-admission cancellation fixture race: recording the third RPC established dispatch, while its reply could still race the released admission gate. The prepare case then legitimately reconciled setup withoutwizard.next(observed 0, expected 1). The test now requires and awaits the actual cancellation task before releasing admission. Every request-count, connection and ownership assertion remains; no timeout, retry or production behavior changes. Fresh independent P2 review accepted the two-line repair and both remote cycle checks pass. The original six-case test took 0.033s. A 20-run native replay is unavailable because macOS broker preflight still returns 401; the exact-head native CI run passed, including all six repaired cases in 0.895s.Evidence
check-madge-import-cycles.tsreports 0 cycles;check-import-cycles.tsreports 0 runtime value cycles. These ran sequentially at low priority after remote preparation exceeded the campaign fallback window.git diff --checkpassed.77da3571ebepassed macOS native tests, OpenClawKit tests, all Android variants, Kotlin lint, native i18n, Android native-access checks, both iOS screenshot jobs, both Apple dead-code scans, and the shared Periphery intersection. Its iOS test bundle compiled successfully, then simulator setup failed downloading simslim (curlexit 28); selected simulator tests did not execute. That run was not rerun or bypassed.41d3b22d33715fde888cd00d28c761939e565582passed CI 36999494711. Merged ascfcee64d26cbb96d10d8b4e57d9b0b55fabd6bd2; merge ancestry verified.tbx_01m3xkvs05gwr6r19rgsxq2pk9was acquired (lease run), but source freezing failed once on a concurrent edit and the frozen retry exceeded 20 minutes before remote execution. The wrapper was stopped; Testbox status is completed and stop confirms it was already stopped. Dependency installation, Android tests/lint, and remote cycle checks did not execute.36959763404supplied macOS shared declarations as discovery leads; iOS failed before results. Cross-platform references, Codable/selector/framework contracts, and shipped July compatibility were checked before removal. Historical scan output is not current-head proof.Partial file-by-file coverage: mobile, macOS, shared Swift; remaining files are explicitly marked unread or partially read. No newly discovered product bug or flaky test is claimed fixed by this patch.