fix(cli): add early-exit fast paths for --version/--help before hea...#27973
fix(cli): add early-exit fast paths for --version/--help before hea...#27973lupuletic wants to merge 3 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryImplemented early-exit fast paths for Key changes:
Testing: Confidence Score: 5/5
Last reviewed commit: 884e00f |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 884e00fe5b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (arg.startsWith("-")) { | ||
| continue; |
There was a problem hiding this comment.
Validate root options before taking help fast path
The isRootHelpRequest scanner currently treats any unknown --prefixed token as ignorable (arg.startsWith("-")), so openclaw --bogus --help is classified as a root-help fast path. In entry.ts, that path calls buildProgram().outputHelp() directly and exits, which bypasses normal argv parsing/validation and turns invalid invocations into successful help output. This hides typos and changes CLI error behavior for malformed root options compared to the regular parse flow.
Useful? React with 👍 / 👎.
|
Superseeded by #30940 which had more changes, credit given for your contributions and support. |
CLI eagerly loads config, plugins, and channel registry for trivial operations (--help, --version), causing 17+ second startup on low-powered devices.
Closes #5871
Changes:
Testing:
AI-assisted (Claude + Codex committee consensus, fully tested).