Repository navigation
refactor(macos): consolidate native app state and handlers - #166558
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: blocked before merge. Reviewed October 7, 2026, 9:43 AM ET / 13:43 UTC (Revision 5). ClawSweeper reviewWhat this changesThe macOS companion shares repeated configuration validation, speech capture resources, socket lifecycle bookkeeping, and native handlers while deriving temporary state from its existing owners. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this useful consolidation remains distinct from the merged configuration repair, and no concrete introduced correctness defect was found. The previous compatibility concern is resolved by source comparison. Likely related people: steipete (high-confidence routing) and Vincent Koc (medium-confidence voice-lifecycle routing). Priority: P3 Review scores
Verification
How this fits togetherThe macOS companion connects local device capabilities and native controls to the selected OpenClaw Gateway. Its configuration readers, lifecycle owners, and handlers translate user actions and Gateway requests into native operations and status updates. flowchart LR
A[Native controls] --> C[Shared state and handlers]
B[Local configuration] --> C
D[Gateway requests] --> C
C --> E[Lifecycle and authority checks]
E --> F[Device operations]
E --> G[Gateway replies and native status]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep the shared native owners while preserving configuration acceptance, native fallback, persisted preferences, and teardown ordering. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR consolidates existing behavior, and source inspection found no concrete introduced failure to reproduce. Is this the best way to solve the issue? Yes: shared lifecycle and validation owners remove duplicate bookkeeping while retaining the existing contracts; the earlier blanket compatibility follow-up is no longer supported. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fbac0bec8980. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
Share catalog validation, capture resources, socket lifecycle settlement, and native handler variants while retaining existing configuration, wire shapes, user-visible text, and authority checks. Derive parallel state from its existing owners and migrate tests off removed internal seams.
747c9c1 to
d8528ff
Compare
|
@clawsweeper re-review Compatibility review for exact head The full native app job now passes all 2,519 tests on this exact head. The shared-package job passes too. Both checkout and workflow SHA are pinned to this head. The rebase also passed app/test compilation, full locale parity, formatting, strict lint, both zero-cycle checks, suppression tests, and a fresh independent review across two complete passes. The consolidated configuration reader preserves current main's accepted/rejected values; it does not write configuration. CLIInstallPrompter only shares its existing status assignment and log reporting. Protocol payloads, persisted shapes, native schema version 20, and migration behavior are unchanged by this PR. No operator migration or upgrade action is required. Broader CI failures remain under individual attribution and are tracked separately in the PR evidence. |
|
🦞👀 Re-review progress:
|
|
Coordinator-authorized landing evidence for exact head The introduced diff is 165 Swift files and one Objective-C file, all under Concrete path independence
Authorized reruns and exhaustive attribution
The archive-placement main reproduction used clean main The historical cancelled PR-context job The exact-head, paginated All failed check-run IDs across the three attempts
The latest ClawSweeper review (13:43 UTC) reports no correctness/security findings and confirms unchanged configuration and existing-state contracts. Its procedural CI checklist is addressed by the targeted results and evidence here; compatibility was also confirmed in the earlier maintainer comment. Admin squash merge is requested under the coordinator's explicit decision, pinned to |
…166558) * refactor(macos): consolidate native app state and handlers Share catalog validation, capture resources, socket lifecycle settlement, and native handler variants while retaining existing configuration, wire shapes, user-visible text, and authority checks. Derive parallel state from its existing owners and migrate tests off removed internal seams. * fix(macos): preserve localization keys during consolidation
What Problem This Solves
The macOS companion repeats validation, lifecycle bookkeeping, and per-variant handlers across its native features. This maintainer-requested cleanup reduces that duplication without retiring those features.
User Impact
No intended change to features, visual appearance, user-visible text, CLI flags, configuration, protocol payloads, or persisted data. No migration or operator action is required.
Why This Change Was Made
Shared paths now carry their real differences explicitly: catalog validation rules, voice capture modes, socket startup settlement, native action dispatch, and presentation descriptors. State already owned by a task, capture, or parsed configuration is derived from that owner instead of copied into parallel flags. Authority checks, recovery, retry timing, and teardown ordering remain at their existing boundaries.
The file-by-file implementation pass removes 1,399 net production lines (1.38%), including new helpers; tests, fixtures, generated output, and static resources are excluded. Native fallback and the current catalog configuration contract are retained. Existing localization keys and translation memory are unchanged.
Evidence
d8528ffd5496bc67d7723feb539b76882743fb32; the shared-package job also passed. The app test partitions took 260.446s, 7.610s, and 16.250s, excluding compilation.747c9c1c50b7c3670d70b7e4ad9d4fb6dea2a880, including Darwin-specific cases; its three script groups took 398.53s, 630.66s, and 754.55s.Existing tests were retained. Test changes only replace removed internal constructor fields, property accesses, and one-shot test seams with the retained production owner; assertions and cleanup remain intact.
The conflict-only rebase preserves main's canonical configuration repair #166510 within the shared validator. Its new regression assertions remain unchanged. The rebased head passes native app/test compilation (333.63s), full locale parity, formatting, lint, both zero-cycle checks, suppression tests, and two fresh independent review passes.
Landing and CI attribution
Merged by coordinator-authorized admin squash as
cb04039f21de4a3183fa3c2af8bd2f567478e327, verified onorigin/main. Reviewed/tested head:d8528ffd5496bc67d7723feb539b76882743fb32. Landed reduction remains 1,399 net production LOC.Complete landing evidence records the concrete native-source path independence, both targeted reruns, every failing job and independent match, all 33 historical failed check-run IDs, and the historical cancelled-context replacement.
Doctor's single authorized rerun passed the exact Doctor-progress case and the complete job (169 passed, 12 existing platform skips). UI's single authorized rerun passed both desktop carriers and all 19 real-Gateway tests in 15 files. Neither job builds or loads a changed Swift/Objective-C file, macOS app, or shared Swift package. The native-protocol step emits ignored Swift text from unchanged TypeScript inputs; it does not compile native code.
Final main-tier attempt 3: 136 successful, 10 failed, 12 skipped jobs. The remaining failures are nine independently matched, unchanged Node/UI roots plus their aggregate. The exhaustive all-attempt census has zero pending checks and no effective cancellation gap; one historical cancelled context job has a verified successful replacement. The original failures remain recorded, and passing reruns are not claimed as source fixes.
No unrelated main-red sources, assertions, timeouts, retries, skips, or suppressions changed in this PR.