Repository navigation
refactor(cli): keep private operations with their command owners - #178567
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR moves private CLI operations into their existing command owners and removes superseded helpers and exports. Example: Run openclaw models --json accounts list --port 19002.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is a useful maintainer-directed consolidation, and the reviewed diff introduces no actionable correctness or security defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe CLI parses arguments, selects startup policy, lazily registers command implementations, and dispatches operations that produce terminal output or invoke existing runtime owners. flowchart TD
A[CLI arguments] --> B[Argument and startup policy]
B --> C[Command descriptors]
C --> D[Command registration]
D --> E[Existing runtime owners]
E --> F[Output and cleanup]
Technical reviewBest possible solution: Keep the consolidation within existing command owners while preserving command contracts, lazy loading, scope checks, and resource disposal. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor rather than a reported product bug; source comparison supports its premise, and no target code was executed during this read-only review. Is this the best way to solve the issue? The patch follows existing ownership boundaries, removes the replaced paths, and retains shared helpers where multiple callers still need them. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5c1432f10bba. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -82, Tests +30, Other -1. Total -53 across 24 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 20, 2026, 1:07 PM ET / 17:07 UTC. |
e3e36ac to
56c91f4
Compare
|
Exact-head inherited-failure evidence for
The checkout log attests merge The automatic table says new relative to older passing scheduled-main shards and does not compare scopes. The coordinator flake ledger and latest six completed scheduled runs were checked; no matching-signature attribution or passing local replay is claimed. Both exact UI cases also fail on the independent provider head Proceeding through the authorized native inherited-only exception, subject to its pinned-head artifact, authority, review and security verification. This is not green CI. No rerun, synthetic push, timeout increase, skip, or hunk drop was used. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Several internal CLI operations have a separate exported module or forwarding function despite having only one production consumer.
User Impact
No user-visible change. CLI commands, options, output, authorization checks, lazy imports, and temporary-resource cleanup remain unchanged.
What Changed
Keep capability registration, Claw preview preparation/output, personal model-account registration, private-QA loading, DNS setup, telemetry output, and metadata projections with their existing callers. Use the canonical Gateway path resolver instead of its one-use alias. Migrate affected tests through registration and public command owners rather than retaining test-only production exports.
This is the CLI area of an 83-path owner-consolidation family, split by area to keep CI attribution bounded. Strict production delta: 314 additions / 396 deletions, 82 net lines removed. Test and baseline changes are excluded from that count.
Best-effort tradeoffs accepted
None: no defensive guard or supported behavior is removed. Dynamic runtime/domain imports, personal-account scope refusal, option inheritance, sanitization, and disposal-before-output/error handling are preserved.
Evidence
No local build, broad suite, whole-graph typecheck, or live operator-state command was run.
Inherited CI exception
Exact-head CI39465970388 attempt1 fails the unrelated UI widget-scroll and cold-load-anchor assertions plus their downstream ci-gate; all other selected jobs and security-fast pass. Automatic rows say new against older passing scheduled-main shards, not matching signatures. The actual tested merge's3687-module runtime closure (both tests plus served UI) has zero unresolved local imports, reaches none of the24 changed PR paths, and is unchanged from the actual main parent. Both exact cases also fail on independent provider head20b4 in CI39466733944. The coordinator flake ledger and last six completed scheduled runs were checked. No local E2E replay is claimed. Landing uses the campaign-authorized native inherited-only exception under rule8, with the complete failure table and actual-checkout/source evidence in the landing comment; failed CI is not described as green.