fix: add binaries to pypi/npm policy presets to prevent 403 - #418
Conversation
📝 WalkthroughWalkthroughThis PR adds Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment Tip You can customize the tone of the review comments and chat replies.Configure the |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
nemoclaw-blueprint/policies/presets/npm.yaml (1)
27-30: Consider adding/usr/bin/paths for broader compatibility.The pypi preset includes both
/usr/local/bin/and/usr/bin/paths, but npm only uses/usr/local/bin/. On many Linux systems (Debian/Ubuntu packages, some container images), Node.js is installed at/usr/bin/node. This could leave some users still encountering 403 errors.♻️ Proposed fix to add common system paths
binaries: - { path: /usr/local/bin/node } - { path: /usr/local/bin/npm } - { path: /usr/local/bin/yarn } + - { path: /usr/bin/node } + - { path: /usr/bin/npm } + - { path: /usr/bin/yarn }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@nemoclaw-blueprint/policies/presets/npm.yaml` around lines 27 - 30, The binaries list currently only includes /usr/local/bin/* which misses common system installs; update the binaries block (the entries under "binaries") to also include /usr/bin/node, /usr/bin/npm, and /usr/bin/yarn so Node/npm/Yarn installed in /usr/bin are recognized; keep the existing /usr/local/bin entries and append the three /usr/bin/* entries to the list.nemoclaw-blueprint/policies/presets/pypi.yaml (1)
28-33: Consider addingpip3paths.Many systems use
pip3as the primary pip executable (especially where Python 2 and 3 coexist). Adding these paths would improve coverage:♻️ Proposed addition for pip3
binaries: - { path: /usr/local/bin/python } - { path: /usr/local/bin/python3 } - { path: /usr/local/bin/pip } + - { path: /usr/local/bin/pip3 } - { path: /usr/bin/python3 } - { path: /usr/bin/pip } + - { path: /usr/bin/pip3 }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@nemoclaw-blueprint/policies/presets/pypi.yaml` around lines 28 - 33, The binaries list currently includes pip and python paths but omits common pip3 executables; update the binaries section (the "binaries" list) to also include entries for pip3 (for example paths like /usr/local/bin/pip3 and /usr/bin/pip3) so systems that expose pip as pip3 are covered—add those new path entries alongside the existing { path: /usr/local/bin/pip } and { path: /usr/bin/pip } entries.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@nemoclaw-blueprint/policies/presets/npm.yaml`:
- Around line 27-30: The binaries list currently only includes /usr/local/bin/*
which misses common system installs; update the binaries block (the entries
under "binaries") to also include /usr/bin/node, /usr/bin/npm, and /usr/bin/yarn
so Node/npm/Yarn installed in /usr/bin are recognized; keep the existing
/usr/local/bin entries and append the three /usr/bin/* entries to the list.
In `@nemoclaw-blueprint/policies/presets/pypi.yaml`:
- Around line 28-33: The binaries list currently includes pip and python paths
but omits common pip3 executables; update the binaries section (the "binaries"
list) to also include entries for pip3 (for example paths like
/usr/local/bin/pip3 and /usr/bin/pip3) so systems that expose pip as pip3 are
covered—add those new path entries alongside the existing { path:
/usr/local/bin/pip } and { path: /usr/bin/pip } entries.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: df9c1410-0571-4b30-9a7d-c46c6b7fd4df
📒 Files selected for processing (3)
nemoclaw-blueprint/policies/presets/npm.yamlnemoclaw-blueprint/policies/presets/pypi.yamltest/policies.test.js
|
Closing — fully covered by #356 (merged to main) which restructured npm/pypi presets with |
…NVIDIA#418) The trigger-wheel-publish job was downloading the wheel artifact onto a persistent self-hosted runner just to glob the filenames. Since download-artifact does not clean the destination directory, stale .whl files from every previous run accumulated in release/ and were all sent to GitLab as WHEEL_FILENAMES. Confirmed on the runner: /home/ubuntu/actions-runner/_work/OpenShell/ OpenShell/release/ contained 120+ wheels spanning versions 0.0.5 through 0.0.10. Fix: capture wheel filenames as a job output in build-python-wheels and pass them directly to trigger-wheel-publish. The trigger job no longer downloads the artifact at all — it only needs the filenames to construct GitHub release asset URLs for GitLab/Kitmaker.
Summary
binariestopypiandnpmpolicy presets so OpenShell can match the requesting executable for those endpoints.pypi/npmpresets always includebinaries, preventing the same regression.Fixes Fix broken
pypiandnpmpolicy presets so package managers work inside the sandbox #19Test plan
Docs
Summary by CodeRabbit
Release Notes
New Features
Tests