Skip to content

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

Closed
pandas-studio wants to merge 2 commits into
NVIDIA:mainfrom
pandas-studio:codex/pypi-uv-binary
Closed

fix(policy): allow uv in pypi preset#3368
pandas-studio wants to merge 2 commits into
NVIDIA:mainfrom
pandas-studio:codex/pypi-uv-binary

Conversation

@pandas-studio

@pandas-studio pandas-studio commented May 11, 2026

Copy link
Copy Markdown

Summary

  • Add /usr/local/bin/uv to the pypi preset's allowed binaries so sandboxes using the pypi network preset can run uv directly.
  • Mirrors the existing entries for python3/pip under /usr/bin and /usr/local/bin and complements the /sandbox/.uv/... paths already present.

Motivation

The pypi preset already allows python3 and pip from /usr/local/bin, and references /sandbox/.uv/python/**/python*, but uv itself was missing. Sandboxes that install uv to /usr/local/bin/uv (per the uv_install operational note: symlinks into /root/ are unreachable, so the binary is copied to /usr/local/bin) were blocked from invoking it under this preset.

Test plan

  • make check passes (policy YAML lint)
  • Manual: enable the pypi preset in a sandbox, run uv --version and a uv pip install — both should be permitted

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Improvements
    • Updated PyPI network preset to support the uv package manager alongside existing Python tooling.

Review Change Stack

@copy-pr-bot

copy-pr-bot Bot commented May 11, 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.

@coderabbitai

coderabbitai Bot commented May 11, 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: 07af7b53-0c6d-488c-be15-4dbe7f1a94bf

📥 Commits

Reviewing files that changed from the base of the PR and between 2a83b53 and 0428737.

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

📝 Walkthrough

Walkthrough

The PyPI network preset configuration is updated to authorize the uv binary (/usr/local/bin/uv) as an allowed binary path, extending the preset's policy to support the uv package manager alongside existing Python, pip, and virtualenv tooling.

Changes

PyPI Preset Update

Layer / File(s) Summary
Binary Path Configuration
nemoclaw-blueprint/policies/presets/pypi.yaml
/usr/local/bin/uv is added to the binaries allowlist in the PyPI preset configuration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through configs neat,
Adding uv to paths so sweet,
The preset now knows where to find,
A package manager, perfectly aligned. 🐰✨

🚥 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 clearly and specifically describes the main change: allowing the uv binary in the PyPI network preset configuration.
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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@cv cv added the v0.0.51 Release target label May 23, 2026
@cv

cv commented May 23, 2026

Copy link
Copy Markdown
Collaborator

@pandas-studio can you add a DCO, please?

@cv cv added v0.0.52 Release target v0.0.53 Release target and removed v0.0.51 Release target v0.0.52 Release target labels May 26, 2026
@ericksoa ericksoa added v0.0.55 and removed v0.0.53 Release target labels May 27, 2026
@cv cv added v0.0.56 Release target and removed v0.0.55 labels May 29, 2026
@cv cv mentioned this pull request May 30, 2026
12 tasks
@cv

cv commented May 30, 2026

Copy link
Copy Markdown
Collaborator

Opened signed-off replacement PR #4569 with the same one-line policy change. This avoids rewriting the contributor branch to satisfy DCO.

@cv cv added status: superseded and removed v0.0.56 Release target labels May 30, 2026
cv added a commit that referenced this pull request Jun 1, 2026
## 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
- [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
- [ ] `npx prek run --all-files` passes
- [ ] `npm test` passes
- [ ] Tests added or updated for new or changed behavior
- [x] 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](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(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.

---
<!-- DCO sign-off required by CI. Run: git config user.name && git
config user.email -->
Signed-off-by: Carlos Villela <cvillela@nvidia.com>

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

## Summary by CodeRabbit

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

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/NVIDIA/NemoClaw/pull/4569?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Co-authored-by: cjagwani <cjagwani@nvidia.com>
@wscurran wscurran added area: policy Network policy, egress rules, presets, or sandbox policy bug-fix PR fixes a bug or regression feature PR adds or expands user-visible functionality and removed fix labels Jun 3, 2026
@cv cv added the v0.0.59 Release target label Jun 4, 2026
@cv

cv commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Closing this because the same one-line policy change was salvaged in signed-off replacement PR #4569, which merged on 2026-06-01 with DCO passing. Thanks again for the original contribution.

@cv cv closed this Jun 4, 2026
@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.59 Release target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants