Repository navigation
refactor(cli): return typed debug parse results - #2920
Conversation
This reverts commit 4ebeae4.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe debug command argument parsing workflow was refactored into distinct layers. A new structured result type separates success/help/error cases, help text generation was centralized, and option handling was decoupled into dedicated functions. Existing entry points now delegate to these new components. ChangesDebug Command Parsing Refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Automated PR review summaryReviewed PR #2920: refactor(cli): return typed debug parse results Recommendation
Installation and setup findings
What was validated
Failing tests and unresolved impact
Passing tests and why they matteredPassing test 1: Typed debug parser returns failures without exiting
Passing test 2: Compatibility wrapper preserves exit behavior and suppresses execution on parse failure
Passing test 3: Installed CLI keeps process-exit boundary for debug parse failures/help
Passing test 4: Valid debug invocation still collects diagnostics from real OpenShell sandbox
Bottom line
|
## Summary Make oclif command metadata the enforced source for public command help basics. This adds a metadata guard and fills the remaining missing example on the deprecated deploy adapter. ## Stack Navigation - Position: 26 of 60 - Previous PR: [#2918 — refactor(cli): normalize policy command ids](#2918) - Next PR: [#2920 — refactor(cli): return typed debug parse results](#2920) ## Changes - Added a command metadata test for registered public oclif commands. - Required each public command class to provide summary, description, usage, and examples. - Added a deploy command example to satisfy the metadata contract. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [x] `npx prek run --all-files` passes - [x] `npm test` passes - [x] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed - [ ] Docs updated for user-facing behavior changes - [ ] `make docs` builds without warnings (doc changes only) - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Carlos Villela <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added sandbox diagnostic command for health checks and troubleshooting * Enhanced log viewing with tail count, duration filtering, and follow options * Improved command structure with new dedicated commands for share, skill, and snapshot operations * **Documentation** * Updated CLI reference with additional flag options across multiple commands, including shorthand variants (`-y`, `-q`, `-v`) and new parameters * **Improvements** * Enhanced error handling and validation for CLI arguments * Expanded command examples throughout the interface <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <[email protected]>
Signed-off-by: Carlos Villela <[email protected]>
## Summary Introduce explicit public-display-to-oclif command IDs in the command registry. This prepares root help and docs tooling to combine NemoClaw's public syntax with oclif command metadata without changing runtime behavior. ## Stack Navigation - Position: 28 of 60 - Previous PR: [#2920 — refactor(cli): return typed debug parse results](#2920) - Next PR: [#2922 — refactor(cli): use oclif summaries in root help](#2922) ## Changes - Added `commandId` to command display metadata entries. - Mapped every public and hidden display entry to the oclif command that handles it. - Added metadata coverage to ensure display entries point at registered oclif commands. ## Type of Change - [x] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [ ] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Verification - [x] `npx prek run --all-files` passes - [x] `npm test` passes - [x] Tests added or updated for new or changed behavior - [x] No secrets, API keys, or credentials committed - [ ] Docs updated for user-facing behavior changes - [ ] `make docs` builds without warnings (doc changes only) - [ ] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: Carlos Villela <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit # Release Notes * **New Features** * Added `sandbox doctor` command for sandbox health diagnostics and troubleshooting * Added short flags across CLI commands (`-y` for yes, `-q` for quick, `-o` for output) * Enhanced `logs` command with `--tail/-n` and `--since` filtering options * Restructured `share` functionality into dedicated subcommands (`mount`, `unmount`, `status`) * **Documentation** * Updated command reference with expanded flag support and usage examples across all subcommands <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Carlos Villela <[email protected]>
Summary
Start moving process-exit behavior toward CLI boundaries by adding a typed parse result path for debug arguments. Existing command helpers keep their compatibility wrapper, but callers can now inspect debug parse failures without triggering
process.exit().Stack Navigation
Changes
DebugParseResultandparseDebugArgsResult.parseDebugArgsto map typed parse outcomes to output and exit behavior.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela [email protected]
Summary by CodeRabbit
Bug Fixes
--outputwithout a path now returns proper error message).Tests