Repository navigation
refactor(cli): consolidate repeated command registration - #119434
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 11:23 PM ET / August 5, 2026, 03:23 UTC. ClawSweeper reviewWhat this changesThis PR replaces repeated Commander CLI registrations for TTS, model fallbacks, node lifecycle actions, and heartbeat controls with local command tables while preserving their public commands and output. Merge readinessKeep open for maintainer merge judgment. The exact-head refactor preserves the inspected CLI registration and dispatch contracts, and the updated terminal proof addresses the prior proof request; no actionable patch defect was found. Priority: P3 Review scores
Verification
How this fits togetherOpenClaw’s CLI lazily registers operator commands, parses options with Commander, and sends normalized requests to local runtime, gateway, or node-service handlers. This change affects the registration layer before those existing dispatch owners run. flowchart LR
Operator[CLI operator] --> Registry[CLI command registration]
Registry --> Parser[Commander parser]
Parser --> Options[Parsed options]
Options --> Dispatch[Runtime gateway or node dispatch]
Dispatch --> Result[CLI output]
Decision needed
Why: The patch is behavior-preserving by the inspected source and proof, but the protected Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -105. Total -105 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk options
Maintainer options:
Technical reviewBest possible solution: Keep one owner-local registration table per repeated command family and merge it only after an exact-current-main validation refresh confirms the preserved CLI contract. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a behavior-preserving refactor, and the exact-head terminal transcript plus focused existing tests exercise the retained registration-to-dispatch paths. Is this the best way to solve the issue? Yes. Local tables remove structurally repeated registration while keeping command-specific transport, validation, formatting, lazy loading, and dispatch ownership in their existing modules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0ef191119290. 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)
|
|
Merged via squash.
|
What Problem This Solves
Model fallback, node lifecycle, system heartbeat, and TTS commands repeated structurally identical Commander registration and dispatch. This is part of a maintainer-requested project-wide production LOC reduction campaign.
Why This Change Was Made
Use focused owner-local command registration tables while preserving command order, help text, flags, defaults, lazy loading, and errors.
User Impact
All documented CLI commands and output remain unchanged; removes 105 production lines.
Evidence
gpt-5.6-solwithxhighreasoning; no accepted or actionable findings.git diff --check, scoped formatting, and direct before/after behavioral equivalence checks passed.Exact-head Commander registration and dispatch proof
The four exact committed production modules were checked against their Git blob IDs, TypeScript-transpiled in memory, and executed with the real installed Commander 15 parser. Runtime, gateway, and native service operations were safely replaced only at their external dispatch boundaries; no operator gateway, service, account, or network was touched.
All ten actual production registration/dispatch assertions passed at the unchanged exact reviewed head, fulfilling the requested TTS, model fallback, node, and heartbeat evidence.
Base-refresh disposition: The exact reviewed CLI head already passed 182 focused tests, the full remote changed gate, exact-head hosted required CI, and the production Commander dispatch transcript above. Rebasing solely because unrelated mainline commits advanced is intentionally skipped: no conflict exists, a rebase would invalidate the reviewed exact SHA and its proof, and the canonical maintainer merge workflow revalidates current-main drift and all required checks immediately before landing.