docs(network-policy): fix incorrect CLI usage for presets and dynamic policy updates#1036
docs(network-policy): fix incorrect CLI usage for presets and dynamic policy updates#1036vl43den wants to merge 4 commits intoNVIDIA:mainfrom
Conversation
… policy updates Clarify commands for applying network policies and presets.
Clarified commands for applying policies and presets, added examples for better understanding.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughDocumentation updates: dynamic policy YAMLs must include a top-level Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.agents/skills/nemoclaw-manage-policy/SKILL.md:
- Around line 157-164: The docs incorrectly show "nemoclaw <name> policy-add
<preset>" as if a preset can be passed positionally; update the SKILL.md usage
for the policy-add command to reflect the actual behavior of the policy-add
handler (the interactive prompt ignores extra positional args). Either remove
"<preset>" from the usage string and show "nemoclaw <name> policy-add" or
explicitly document that the command is interactive and that any positional
arguments are ignored; reference the "policy-add" command in the doc text so
readers know which command's behavior was changed.
In `@docs/network-policy/customize-network-policy.md`:
- Around line 118-125: The documented `policy-add` usage incorrectly shows a
positional `<preset>` argument; update the example and syntax to reflect the
actual interactive CLI behavior by changing `nemoclaw <name> policy-add
<preset>` to `nemoclaw <name> policy-add` and add a short note that preset
selection is interactive (as implemented in the policy-add command in
bin/nemoclaw.js and its interactive prompt handlers). If non-interactive preset
selection is later added, update the docs to document the new flag or argument
and an example invocation; for now remove the misleading positional argument and
keep the example showing `nemoclaw my-assistant policy-add` as an interactive
command.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: febb5dbb-fed1-4339-ac1a-3ad581bc1228
📒 Files selected for processing (2)
.agents/skills/nemoclaw-manage-policy/SKILL.mddocs/network-policy/customize-network-policy.md
| $ nemoclaw <name> policy-add <preset> | ||
| ``` | ||
|
|
||
| For example, to add PyPI access to a running sandbox: | ||
|
|
||
| ```console | ||
| $ nemoclaw my-assistant policy-add pypi | ||
| ``` |
There was a problem hiding this comment.
policy-add syntax is documented with an unsupported positional argument.
The docs state nemoclaw <name> policy-add <preset>, but the CLI implementation for policy-add is interactive and does not consume <preset> as an argument (bin/nemoclaw.js:651-684, bin/nemoclaw.js:762-815). This can mislead users into thinking non-interactive preset selection is supported.
Suggested doc fix
-$ nemoclaw <name> policy-add <preset>
+$ nemoclaw <name> policy-add-For example, to add PyPI access to a running sandbox:
+For example, to add PyPI access to a running sandbox, run the command and select `pypi` at the prompt:🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/network-policy/customize-network-policy.md` around lines 118 - 125, The
documented `policy-add` usage incorrectly shows a positional `<preset>`
argument; update the example and syntax to reflect the actual interactive CLI
behavior by changing `nemoclaw <name> policy-add <preset>` to `nemoclaw <name>
policy-add` and add a short note that preset selection is interactive (as
implemented in the policy-add command in bin/nemoclaw.js and its interactive
prompt handlers). If non-interactive preset selection is later added, update the
docs to document the new flag or argument and an example invocation; for now
remove the misleading positional argument and keep the example showing `nemoclaw
my-assistant policy-add` as an interactive command.
remove unsupported positional arg from policy-add in skill Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
updated command syntax for adding a policy preset
Summary
The preset application instructions in
docs/network-policy/customize-network-policy.mdshow incorrect CLI commands for applying dynamic policy updates and presets.Following the current instructions produces parse errors from the OpenShell CLI.
This PR corrects the command syntax, adds the missing
versionfield requirement for custom policies, and replaces the broken preset workflow with the correctnemoclaw <name> policy-addcommand.Changes
openshell policy set --policy <policy-file> <name>(missing flag and positional argument).version: 1).nemoclaw <name> policy-add <preset>.Type of Change
Testing
npx prek run --all-filespasses (or equivalentlymake check).npm testpasses.make docsbuilds without warnings. (for doc-only changes)Reproduced on a live NemoClaw sandbox (Ubuntu 24.04, DigitalOcean s-4vcpu-8gb)
Checklist
General
Code Changes
npx prek run --all-filesauto-fixes formatting (ormake formatfor targeted runs).Doc Changes
update-docsagent skill to draft changes while complying with the style guide. For example, prompt your agent with "/update-docscatch up the docs for the new changes I made in this PR."Summary by CodeRabbit
versionfield in dynamic YAML policy files.openshell policy set --policy <file> <name>, adding an explicit sandbox/name parameter.nemoclaw <name> policy-add <preset>andnemoclaw <name> policy-list.preset:must be applied via NemoClaw commands (example:pypi).