refactor(apps): reuse Watch approval transport models#105024
Conversation
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: refactor(apps): reuse Watch approval transport models This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Codex review: needs real behavior proof before merge. Reviewed July 12, 2026, 2:04 AM ET / 06:04 UTC. Summary PR surface: Other -219. Total -219 across 5 files. Reproducibility: not applicable. This PR is a behavior-preserving ownership refactor rather than a bug report, and source inspection plus the exact-head iOS build provide the relevant verification. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the PR’s canonical OpenClawKit leaf-model ownership, explicit WatchConnectivity framing, and local persisted-envelope ownership, then merge after the remaining exact-head Apple checks complete. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR is a behavior-preserving ownership refactor rather than a bug report, and source inspection plus the exact-head iOS build provide the relevant verification. Is this the best way to solve the issue? Yes. Reusing the existing watchOS-capable OpenClawKit models removes duplicate protocol ownership without adding a parallel API, while retaining local envelope structs protects the established persisted inbox shape. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5459a94763d4. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Other -219. Total -219 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
|
|
Merged via squash.
|
* refactor(apps): reuse watch approval transport models * fix(ios): satisfy exact identifier lint
Related: #103912
What Problem This Solves
The native approval client feature is valuable, but the Watch target carried local copies of transport enums, commands, approval items, identifiers, and leaf DTOs that already existed in
OpenClawKit. That duplication made the approval stack larger and allowed equivalent phone/Watch protocol models to drift.Why This Change Was Made
This refactor makes
OpenClawKitthe canonical owner for reusable Watch transport leaf models while retaining local Watch envelope structs where their Codable shape is part of the existing persisted inbox state. It also compiles the phone's exact opaque-identifier implementation into the Watch target, moves notification-component framing onto that shared byte-exact key, and gives the canonical Watch action model theIdentifiableconformance required by SwiftUI.The focused test cleanup removes source guards that reimplemented generic
Setand UTF-8 behavior, while keeping guards for transport ordering, canonical readback, compound ownership, accessibility, notification framing, and snapshot acceptance.User Impact
No feature or behavior change. Android, iPhone, and Apple Watch approval review retain the same decisions, exact identifiers, persistence envelopes, WatchConnectivity payloads, retry/readback behavior, notification identity, and UI. The maintained diff is 219 net lines smaller, including 153 fewer production lines.
Evidence
git diff --checkswiftc -parseon all changed Swift sources/tests: cleanapps/ios/project.yml: cleantbx_01kxac3r9grcjsypes0vr72czx:pnpm check:changedpassed with app-surface guards and 5 routed Vitest shards (174 passed, 37 skipped)gpt-5.6-sol, xhigh): no accepted/actionable findingsRemaining platform gate: macOS CI owns SwiftLint and the authoritative iPhone/Watch compile because the delegated Testbox is Linux.