test(macos): cover root CLI command parsing#93188
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 15, 2026, 3:31 PM ET / 19:31 UTC. Summary PR surface: Source -1, Other +99. Total +98 across 7 files. Reproducibility: yes. Source inspection on current main shows parseRootCommand is still private and root dispatch lacks focused parser/action coverage, while the PR adds a narrow helper and tests for those branches. Review metrics: 2 noteworthy metrics.
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: Land a rebased branch that keeps the root parser coverage and COPYFILE_DATA migration fix, preserves current-main protocol/Telegram implementations, and reruns the macOS Swift/protocol checks after conflict resolution. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows parseRootCommand is still private and root dispatch lacks focused parser/action coverage, while the PR adds a narrow helper and tests for those branches. Is this the best way to solve the issue? Yes after rebase. The parser seam is the narrow maintainable test boundary and COPYFILE_DATA matches the copyfile contract, but the already-main protocol and Telegram hunks should not be reintroduced during conflict resolution. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b3128ba93def. Label changesLabel justifications:
Evidence reviewedPR surface: Source -1, Other +99. Total +98 across 7 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
|
3b97a7e to
9e388ce
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Superseded by #93880, which preserves the approvals migration data fix as an attribution-preserving single-purpose PR. The remaining commits in this mixed PR are already on |
Closes #83879.
Adds a small root-command parser/dispatch helper for the macOS CLI and covers usage/help, known-command argument forwarding, and unknown-command dispatch.
Also refreshes the Swift protocol generator so current literal-union schemas emit the Swift enums required by the macOS package, fixes the exec approvals legacy migration copy path exposed by the macOS IPC shard, and carries the current-main Telegram unused-parameter cleanup needed for
check-prod-typeswhile #93185 is still open.Real behavior proof
Behavior addressed: the macOS root CLI parser and help dispatch path are covered and still produce the expected root usage output.
Real environment tested: local OpenClaw source checkout on macOS, running the Swift package CLI, macOS IPC test shard, protocol guard, and production typecheck.
Exact steps or command run after this patch: ran
swift run --package-path apps/macos openclaw-mac --help, focused parser tests, the macOS IPC filter that includes the parser and approvals migration tests, the native protocol guard, andpnpm tsgo:prod.Evidence after fix:
Observed result after fix: root help dispatch prints the macOS CLI usage, the new parser tests pass, the broader macOS IPC shard passes with the generated protocol and approvals migration fixes in place, and production TypeScript typechecking is green.
What was not tested: packaged app notarization or installer flows were not run.