Skip to content

fix(policy): allow uv in pypi preset#4569

Merged
cv merged 3 commits into
mainfrom
codex/salvage-pypi-uv
Jun 1, 2026
Merged

fix(policy): allow uv in pypi preset#4569
cv merged 3 commits into
mainfrom
codex/salvage-pypi-uv

Conversation

@cv

@cv cv commented May 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds /usr/local/bin/uv to the PyPI network preset binary allowlist so sandboxes using the pypi preset can run the uv package manager directly. This is a clean signed-off replacement for the blocked contributor PR #3368, whose code change was sound but whose branch cannot pass DCO without rewriting existing commits.

Related Issue

Supersedes #3368.

Changes

  • Updates nemoclaw-blueprint/policies/presets/pypi.yaml to allow /usr/local/bin/uv alongside the existing Python and pip binaries.

Type of Change

  • 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

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Targeted validation run: npm test -- test/policies.test.ts test/policy-tiers.test.ts test/validate-blueprint.test.ts. The relevant policy YAML checks passed, while test/policies.test.ts currently has unrelated failures on current origin/main around missing policy helper exports and openshell resolution behavior.


Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • Chores
    • Updated PyPI preset policy configuration to allow an additional binary tool in the allowlist.

Review Change Stack

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv added fix v0.0.56 Release target labels May 30, 2026
@cv cv self-assigned this May 30, 2026
@copy-pr-bot

copy-pr-bot Bot commented May 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cv cv mentioned this pull request May 30, 2026
2 tasks
@coderabbitai

coderabbitai Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1fa618ce-7e29-4bc4-8ced-c2ef70e68e3a

📥 Commits

Reviewing files that changed from the base of the PR and between 7da4960 and 686eb8a.

📒 Files selected for processing (1)
  • nemoclaw-blueprint/policies/presets/pypi.yaml

📝 Walkthrough

Walkthrough

The PyPI preset policy configuration is updated to include /usr/local/bin/uv in the network policies binary allowlist, enabling the uv package manager alongside existing Python and pip binary patterns.

Changes

PyPI Preset Configuration

Layer / File(s) Summary
PyPI binary allowlist
nemoclaw-blueprint/policies/presets/pypi.yaml
/usr/local/bin/uv is added to the network_policies.pypi.binaries allowlist alongside the existing Python and pip binary patterns.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 The uv binary hops into the allowlist today,
Joining Python and pip in their Python way,
One little line in the preset so neat,
Makes package management swift and complete! 📦✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(policy): allow uv in pypi preset' directly and specifically describes the main change: adding the uv binary to the PyPI preset policy allowlist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/salvage-pypi-uv

Comment @coderabbitai help to get the list of available commands and usage tips.

@cv cv requested a review from ericksoa May 30, 2026 18:31
@cv cv requested review from cjagwani, jyaunches and prekshivyas May 30, 2026 18:31
@github-actions

github-actions Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: network-policy-e2e
Optional E2E: cloud-onboard-e2e, rebuild-openclaw-e2e

Dispatch hint: network-policy-e2e

Auto-dispatched E2E: network-policy-e2e via nightly-e2e.yaml at 4d33687a9663eddbe1e3440de3eeda0d2558ce73nightly run

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • network-policy-e2e (high): This is the focused existing E2E for network policy enforcement. It applies the pypi preset and verifies PyPI reachability under restricted policy mode, covering the policy path most directly affected by the preset change.

Optional E2E

  • cloud-onboard-e2e (high): Useful adjacent confidence because this onboarding flow installs with custom policy presets including npm,pypi, validating that the changed preset still loads during real installer/onboarding.
  • rebuild-openclaw-e2e (high): Optional confidence for persistence of npm,pypi policy presets across rebuilds; relevant to preset serialization/restore but not specifically to the new uv binary allowance.

New E2E recommendations

  • network-policy (high): Existing network-policy-e2e verifies PyPI access via pip but does not appear to exercise /usr/local/bin/uv specifically, so this PR's new allowed binary path can pass without proving uv package-manager traffic works under the pypi preset.
    • Suggested test: Extend test/e2e/test-network-policy.sh TC-NET-02, or add a dedicated uv PyPI policy E2E, to run /usr/local/bin/uv from inside a restricted sandbox after applying the pypi preset and verify it can fetch a package from PyPI while unrelated binaries remain blocked.

Dispatch hint

  • Workflow: nightly-e2e.yaml
  • jobs input: network-policy-e2e

@github-actions

github-actions Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor

Findings: 0 needs attention, 3 worth checking, 0 nice ideas
Since last review: 0 prior items resolved, 2 still apply, 0 new items found

Review findings

🛠️ Needs attention

  • None.

🔎 Worth checking

  • Source-of-truth review needed: PyPI preset uv binary allowlist: The advisor marked localized patch analysis as needs_followup.
    • Recommendation: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
    • Evidence: `pypi.yaml` adds `/usr/local/bin/uv`; `Dockerfile.base` does not install uv; existing e2e PyPI validation uses pip, not uv.
  • Source-of-truth review needed for uv PyPI allowlist path (nemoclaw-blueprint/policies/presets/pypi.yaml:31): The PR adds `/usr/local/bin/uv` as a new executable principal for the PyPI sandbox policy, but repository inspection did not establish that this is the supported sandbox uv install path. The path appears only in the changed preset, and `Dockerfile.base` installs Python and pip but not uv. That leaves this as a localized policy exception without a clear source invariant.
    • Recommendation: Document or encode the source of this path before merging: identify where uv is installed, why that source cannot be fixed or asserted in this PR, and what invariant should keep the allowlist correct. If uv is part of another image or runtime layer, add a nearby comment/test or link to that source so future changes do not leave a stale or unintended policy grant.
    • Evidence: `nemoclaw-blueprint/policies/presets/pypi.yaml:31` adds `- { path: /usr/local/bin/uv }`; repository search found `/usr/local/bin/uv` only in this changed preset; `Dockerfile.base` installs `python3`, `python3-pip`, and `python3-venv` but no uv binary.
  • Add targeted validation for the uv PyPI preset allowlist (nemoclaw-blueprint/policies/presets/pypi.yaml:31): This sandbox network-policy change broadens PyPI egress authorization to an additional binary, but no direct test or runtime proof was found for the new behavior. Existing coverage checks PyPI REST/read-only rules, HEAD support, generic package-manager binary sections, and pip-based PyPI access; it does not assert `/usr/local/bin/uv`, prove uv can fetch through the preset, or verify an unlisted binary/path remains denied.
    • Recommendation: Add a focused preset test that parses `pypi.yaml` and asserts `/usr/local/bin/uv` is included while PyPI hosts and GET/HEAD-only rules remain unchanged. Preferably also add or identify runtime/integration validation that applying the `pypi` preset lets `/usr/local/bin/uv` fetch from PyPI and that an unlisted binary/path is still denied.
    • Evidence: `test/policies.test.ts` includes PyPI REST/read-only and HEAD checks, and `test/e2e/test-network-policy.sh` validates PyPI via `pip download`; no uv-specific assertion or runtime validation was found. Deterministic test-depth context marks this file as `runtime_validation_recommended`.

🌱 Nice ideas

  • None.
Since last review details

Current findings:

  • Source-of-truth review needed: PyPI preset uv binary allowlist: The advisor marked localized patch analysis as needs_followup.
    • Recommendation: Identify the invalid state, source boundary, source-fix constraint, regression test, and removal condition before merging the localized behavior.
    • Evidence: `pypi.yaml` adds `/usr/local/bin/uv`; `Dockerfile.base` does not install uv; existing e2e PyPI validation uses pip, not uv.
  • Source-of-truth review needed for uv PyPI allowlist path (nemoclaw-blueprint/policies/presets/pypi.yaml:31): The PR adds `/usr/local/bin/uv` as a new executable principal for the PyPI sandbox policy, but repository inspection did not establish that this is the supported sandbox uv install path. The path appears only in the changed preset, and `Dockerfile.base` installs Python and pip but not uv. That leaves this as a localized policy exception without a clear source invariant.
    • Recommendation: Document or encode the source of this path before merging: identify where uv is installed, why that source cannot be fixed or asserted in this PR, and what invariant should keep the allowlist correct. If uv is part of another image or runtime layer, add a nearby comment/test or link to that source so future changes do not leave a stale or unintended policy grant.
    • Evidence: `nemoclaw-blueprint/policies/presets/pypi.yaml:31` adds `- { path: /usr/local/bin/uv }`; repository search found `/usr/local/bin/uv` only in this changed preset; `Dockerfile.base` installs `python3`, `python3-pip`, and `python3-venv` but no uv binary.
  • Add targeted validation for the uv PyPI preset allowlist (nemoclaw-blueprint/policies/presets/pypi.yaml:31): This sandbox network-policy change broadens PyPI egress authorization to an additional binary, but no direct test or runtime proof was found for the new behavior. Existing coverage checks PyPI REST/read-only rules, HEAD support, generic package-manager binary sections, and pip-based PyPI access; it does not assert `/usr/local/bin/uv`, prove uv can fetch through the preset, or verify an unlisted binary/path remains denied.
    • Recommendation: Add a focused preset test that parses `pypi.yaml` and asserts `/usr/local/bin/uv` is included while PyPI hosts and GET/HEAD-only rules remain unchanged. Preferably also add or identify runtime/integration validation that applying the `pypi` preset lets `/usr/local/bin/uv` fetch from PyPI and that an unlisted binary/path is still denied.
    • Evidence: `test/policies.test.ts` includes PyPI REST/read-only and HEAD checks, and `test/e2e/test-network-policy.sh` validates PyPI via `pip download`; no uv-specific assertion or runtime validation was found. Deterministic test-depth context marks this file as `runtime_validation_recommended`.

Workflow run details

This is an automated advisory review. A human maintainer must make the final merge decision.

@github-actions

github-actions Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

E2E Scenario Advisor Recommendation

Required scenario E2E: ubuntu-repo-cloud-openclaw
Optional scenario E2E: None

Dispatch required scenario E2E:

  • gh workflow run e2e-scenarios.yaml --ref <pr-head-ref> --field scenarios=ubuntu-repo-cloud-openclaw

Workflow run

Full scenario advisor summary

E2E Scenario Advisor

Base: origin/main
Head: HEAD
Confidence: medium

Required scenario E2E

  • ubuntu-repo-cloud-openclaw: The PR changes the built-in PyPI policy preset by allowing /usr/local/bin/uv. The smallest dispatchable scenario in the ROUTES table that exercises repo-current OpenClaw onboarding with the default balanced policy set, which includes PyPI, is ubuntu-repo-cloud-openclaw.
    • Dispatch: gh workflow run e2e-scenarios.yaml --ref <pr-head-ref> --field scenarios=ubuntu-repo-cloud-openclaw

Optional scenario E2E

  • None.

Relevant changed files

  • nemoclaw-blueprint/policies/presets/pypi.yaml

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26691654469
Target ref: 686eb8a4aa19b668c0ff92f6b57d68ab7a307edb
Workflow ref: main
Requested jobs: network-policy-e2e
Summary: 0 passed, 0 failed, 0 skipped

Job Result
network-policy-e2e ⚠️ cancelled

@github-actions

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26691740044
Target ref: 5eab6da6d337ac1300f87f678ce99b61da6e0ad5
Workflow ref: main
Requested jobs: network-policy-e2e
Summary: 1 passed, 0 failed, 0 skipped

Job Result
network-policy-e2e ✅ success

@cv cv added v0.0.57 Release target and removed v0.0.56 Release target labels Jun 1, 2026

@cjagwani cjagwani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving — 1-line policy preset addition is well-scoped, and uv belongs in the pypi allowlist alongside python/pip. network-policy-e2e passed twice via advisor dispatch.

Non-blocking nit: consider adding a 2-line unit test in test/policies.test.ts asserting /usr/local/bin/uv is in the pypi binaries list — mirror the pypi preset lets curl verify… pattern from #4176. Fine as a follow-up or fold into the next rebase.

@cv cv merged commit 55adb90 into main Jun 1, 2026
16 checks passed
@cv cv deleted the codex/salvage-pypi-uv branch June 1, 2026 18:55
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Selective E2E Results — ✅ All requested jobs passed

Run: 26774764243
Target ref: 4d33687a9663eddbe1e3440de3eeda0d2558ce73
Workflow ref: main
Requested jobs: network-policy-e2e
Summary: 1 passed, 0 failed, 0 skipped

Job Result
network-policy-e2e ✅ success

miyoungc added a commit that referenced this pull request Jun 1, 2026
## Summary

- Adds the v0.0.56 release notes section with links to the deeper docs
pages for installer, status, inference, messaging, policy, and lifecycle
changes.
- Updates source docs for the remaining release-prep gaps around `uv` in
the PyPI preset, compact WhatsApp pairing guidance, and `nemoclaw
inference set` command boundaries.
- Refreshes generated `nemoclaw-user-*` skills and removes skipped
experimental command terms from generated skill surfaces.

## Source summary

- #4613 -> `docs/manage-sandboxes/lifecycle.mdx`,
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Documents
that public installs and `nemoclaw update` follow the maintained `lkg`
tag by default.
- #4419 -> `docs/about/release-notes.mdx`: Notes that non-interactive
Linux installs can reactivate Docker group membership and continue in
one installer run when `sg docker` is available.
- #4550 -> `docs/reference/commands.mdx`,
`docs/about/release-notes.mdx`: Captures live sandbox agent-version
probing for status, connect, and upgrade checks.
- #4609 -> `docs/inference/use-local-inference.mdx`,
`docs/about/release-notes.mdx`: Captures the GPU Docker-driver
host-network local-inference reachability gate.
- #4607 -> `docs/manage-sandboxes/messaging-channels.mdx`,
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Documents
compact WhatsApp QR pairing guidance and gateway/session diagnostics.
- #4582 -> `docs/manage-sandboxes/messaging-channels.mdx`,
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Reflects
Slack credential validation before enabling the channel.
- #4554 -> `docs/manage-sandboxes/messaging-channels.mdx`,
`docs/reference/troubleshooting.mdx`, `docs/about/release-notes.mdx`:
Keeps Telegram allowlist alias guidance in the generated user skills and
release notes.
- #4563 -> `docs/reference/commands.mdx`,
`docs/about/release-notes.mdx`: Includes the new `nemoclaw <name> skill
remove <skill>` command in command docs and release notes.
- #4566 -> `docs/reference/commands.mdx`,
`docs/about/release-notes.mdx`: Documents the `nemoclaw inference set`
redirect boundary when `--provider` or `--model` is missing.
- #4323 -> `docs/reference/commands.mdx`,
`docs/about/release-notes.mdx`: Captures per-sandbox status JSON
support.
- #4506 -> `docs/reference/commands.mdx`,
`docs/about/release-notes.mdx`: Captures debug command sandbox-name
validation and safer tarball writing.
- #4569 -> `docs/network-policy/integration-policy-examples.mdx`,
`docs/about/release-notes.mdx`: Documents that the `pypi` preset allows
`/usr/local/bin/uv`.
- #4579 -> `docs/network-policy/integration-policy-examples.mdx`,
`docs/about/release-notes.mdx`: Captures observable Jira preset
validation guidance.
- #4229 -> `docs/manage-sandboxes/lifecycle.mdx`,
`docs/reference/commands.mdx`, `docs/about/release-notes.mdx`: Documents
user-data preservation defaults for uninstall.
- #4399 -> `docs/reference/commands.mdx`,
`docs/about/release-notes.mdx`: Captures CPU-only sandbox intent
preservation across rebuilds.
- #4058 -> `docs/reference/commands.mdx`,
`docs/about/release-notes.mdx`: Captures safer snapshot restore behavior
around existing destinations.
- #4155 and #4460 -> skipped by `docs/.docs-skip`: Removed skipped
experimental command terms from source docs and generated skill evals
instead of documenting those features.

## Verification

- `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix
nemoclaw-user --doc-platform fern-mdx`
- `npm run docs` (passes; Fern reports the pre-existing light-mode
accent contrast warning)
- `rg "permissive mode|shields down|shields up|shields status|config
rotate-token|rotate-token" .agents/skills` (no matches)
- `npm run build:cli` (run to refresh local CLI artifacts for the
pre-push TypeScript hook)
- Commit hooks passed, including `NEMOCLAW_* env-var documentation
gate`, `Verify docs-to-skills output`, `markdownlint-cli2`, `gitleaks`,
and `Test (skills YAML)`.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Expanded Model Router setup with YAML examples, flow diagrams, and
credential handling; strengthened agent-config immutability and
integrity guidance; messaging channels updated (Telegram aliases,
WhatsApp pairing/diagnostics); CLI docs revised (GPU detection,
inference set behavior, uninstall/rebuild preservation); overview
rebranded to NemoClaw and added v0.0.56 release notes.

* **New Features**
* Added `nemoclaw <name> channels status` (messaging diagnostics, JSON);
added `nemoclaw <name> skill remove`; Hermes no longer marked
experimental; DGX Spark quickstart sandbox-name note.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@wscurran wscurran added area: policy Network policy, egress rules, presets, or sandbox policy bug-fix PR fixes a bug or regression labels Jun 3, 2026
@wscurran wscurran added feature PR adds or expands user-visible functionality and removed fix labels Jun 3, 2026
cv pushed a commit that referenced this pull request Jun 3, 2026
## Summary
- Add the missing `v0.0.57` release-notes section with links to the
detailed docs pages for command, inference, onboarding, messaging,
status, installer, and policy changes.
- Remove public references to docs-skip terms from source docs and
regenerate the NemoClaw user skills from the current Fern MDX docs.
- Carry forward generated references for the per-agent documentation
split, including Hermes-specific reference files.

## Source summary
- #4615 and #4653 -> `docs/about/release-notes.mdx`,
`docs/reference/commands.mdx`: Release notes now cover host-side
`sessions` and `agents` commands plus `NEMOCLAW_EXTRA_AGENTS_JSON`
secondary-agent baking.
- #4163, #4204, #4611, #4619, and #4676 ->
`docs/about/release-notes.mdx`,
`docs/inference/use-local-inference.mdx`: Release notes now cover
managed vLLM progress/readiness, DGX Spark model default changes, local
Ollama streaming usage, and inference route divergence warnings.
- #4267, #4601, #4609, #4642, #4645, and #4661 ->
`docs/about/release-notes.mdx`, `docs/reference/commands.mdx`: Release
notes now cover UFW auto-remediation, local-inference reachability
gates, gateway reuse/binding, cancel rollback, and policy selection
persistence.
- #4577, #4582, #4607, and #4660 -> `docs/about/release-notes.mdx`,
`docs/manage-sandboxes/messaging-channels.mdx`: Release notes now cover
Slack validation, atomic `channels add`, WhatsApp QR diagnostics, and
Slack placeholder normalization.
- #4388, #4600, #4646, and #4647 -> `docs/about/release-notes.mdx`,
`docs/reference/commands.mdx`: Release notes now cover status failure
layers, paused-container hints, Docker-driver doctor behavior, and
non-destructive stale-registry recovery.
- #4569, #4579, and #4678 -> `docs/about/release-notes.mdx`,
`docs/manage-sandboxes/lifecycle.mdx`,
`docs/network-policy/integration-policy-examples.mdx`: Release notes now
cover installer tag pinning, PyPI `uv` policy access, and observable
Jira validation.
- #4632 -> `.agents/skills/`: Regenerated user skills from the current
per-agent docs source, including newly generated Hermes reference files.

## Verification
- `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix
nemoclaw-user --doc-platform fern-mdx`
- `rg "permissive mode|shields down|shields up|shields status|config
rotate-token|rotate-token" docs --glob "*.mdx"`
- `rg "permissive mode|shields down|shields up|shields status|config
rotate-token|rotate-token" .agents/skills --glob "*.md"`
- `npm run docs`
- `npm run build:cli`
- Commit hooks: markdownlint, docs-to-skills verification, gitleaks,
skills YAML, commitlint

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Restructured documentation to clearly distinguish OpenClaw and Hermes
agent variants throughout user guides.
* Enhanced security, credential storage, and deployment guidance with
clearer setup flows.
  * Added Hermes plugin installation and ecosystem documentation.
* Improved workspace, messaging, and policy management references with
variant-specific command examples.
  * Refined troubleshooting and CLI reference sections for clarity.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@wscurran wscurran removed the feature PR adds or expands user-visible functionality label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: policy Network policy, egress rules, presets, or sandbox policy bug-fix PR fixes a bug or regression v0.0.57 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants