Repository navigation
fix(cli): show the usage for lobster help run, resume, doctor and version - #218
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 Summary: ✅ CompletedThis 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 changesMake help for run, resume, doctor, version, and help print the existing top-level usage. Example: Run lobster help run.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current help-routing bug with a small, focused change; the supplied CLI evidence is sufficient, and no actionable defects were found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe CLI receives command-line arguments, routes help topics to existing renderers or registry commands, and writes help or errors with an exit status. flowchart TD
A[CLI arguments] --> B[Help dispatcher]
B --> C[Built-in usage topics]
B --> D[Graph help]
B --> E[Command registry]
C --> F[Standard output]
D --> F
E --> F
Technical reviewBest possible solution: Land the focused routing fix using the existing usage renderer and CLI regression coverage. Do we have a high-confidence way to reproduce the issue? Current-main dispatch and registry contents establish the failure, corroborated by the contributor's before/after CLI output; no target code was executed during review. Is this the best way to solve the issue? Reusing the existing renderer in the existing help dispatcher is the smallest complete fix and preserves specialized graph and registry help. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c19d3cf481e9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
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 November 10, 2026, 3:59 AM ET / 08:59 UTC. |
|
Merged in d296ac2. Reproduced the baseline built CLI reporting Unknown command for help run; the corrected built CLI prints usage successfully. Regression cases cover run, resume, doctor, version, help, and preservation of unknown-topic errors. Validation: Linux Node 24 build, CLI smoke, lint, typecheck, and all 752 tests passed. Refreshed Node 22 and Node 24 CI passed at 558e11e: https://github.com/openclaw/lobster/actions/runs/43575592730. Independent review found no actionable P0–P2 findings. Thanks @KrasimirKralev. |
What Problem This Solves
lobster help run,lobster help resume,lobster help doctorandlobster help versionfail withUnknown command: <name>(exit code 2), althoughlobster --helplistslobster run …,lobster resume …,lobster doctorandlobster versionin its Usage block, directly above thelobster help <command>hint.lobster help <topic>resolvesgraph(since fix(cli): show graph help for lobster help graph #212) and then only the pipeline command registry.run,resume,doctor,versionandhelpare top-level CLI commands dispatched before the registry, sohelpreports them as unknown, which reads as if the command did not exist.lobster run --help(andresume --help,doctor --help,version --help) already prints the top-level usage, which is where they are documented.helpbranch insrc/cli.tsnow prints that same top-level usage for these five topics. Registry commands,help graph, unknown topics (stillUnknown command: <topic>, exit 2) and every--helppath are unchanged.User Impact
Someone who sees
lobster run …in the usage and follows thelobster help <command>hint for it now gets the usage that documentsrun(its--mode,--file,--args-jsonand--dry-runforms) with exit 0, instead of an error saying the command is unknown. Scripts that calllobster help runno longer get exit code 2.Why This Change Was Made
USAGE_TOPICSset (run,resume,doctor,version,help) checked in thehelpbranch aftergraphand before the registry lookup; it writes the existinghelpText(), sohelp <topic>and<topic> --helpprint identical text.argv[0]before the registry, so they have no registry entry, but the help branch only consulted the registry (plusgraph).help graphonly. New cases intest/cli_run_errors.test.tsrunbin/lobster.js help <topic>for each of the five topics and check exit 0, an empty stderr, thelobster <topic>usage line, and that stdout equalsbin/lobster.js <topic> --help; one more case pins thathelp nopestill exits 2 withUnknown command: nope.## Unreleased.Evidence
lobster help <top-level command>output and exit code.pnpm build) onupstream/mainc19d3cf and on this branch.node bin/lobster.js help run|resume|doctor|version|nopeandnode bin/lobster.js run --help, before and after, pluspnpm lint,pnpm typecheck,pnpm test.helpfor each top-level command prints the same usage as<command> --helpand exits 0; an unknown topic still printsUnknown commandand exits 2.pnpm lintandpnpm typecheckare clean.--helpalready does.