Repository navigation
fix(onboard): normalise nemoclaw plugin build context permissions - #4183
Conversation
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
📝 WalkthroughWalkthroughThis pull request fixes a Docker build failure where the sandbox user cannot read plugin files in ChangesNemoClaw plugin permission normalization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
PR Review AdvisorFindings: 0 needs attention, 2 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Auto-dispatched E2E: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: None Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Selective E2E Results — ✅ All requested jobs passedRun: 26395476445
|
Selective E2E Results — ✅ All requested jobs passedRun: 26395652774
|
Summary
/opt/nemoclaw/package.jsonends uproot:root 440in the sandbox image when the host checkout (~/.nemoclaw/source/nemoclaw/) has restrictive modes, becausestage{Legacy,Optimized}SandboxBuildContextonly normalise thenemoclaw-blueprint/subtree beforedocker build.USER sandboxthen can't read it andopenclaw plugins install /opt/nemoclawfails withJsonFileReadError: Failed to read JSON file: /opt/nemoclaw/package.json. Mirror the existing blueprint normalisation onto the stagednemoclaw/subtree, and add a defence-in-depthchmod -R a+rX /opt/nemoclawto the in-image RUN that already normalises/opt/nemoclaw-blueprint/.Related Issue
Fixes #4177
Changes
src/lib/sandbox/build-context.ts— callnormalizeReadModesForDockerCopy(stagedNemoclawDir)in bothstageLegacySandboxBuildContextandstageOptimizedSandboxBuildContext, mirroring the existing blueprint handling.Dockerfile— extendchmod -R a+rXto cover/opt/nemoclawas well as/opt/nemoclaw-blueprint/, so custom build-contexts that bypass the staging code still recover.test/sandbox-build-context.test.ts— new fixtures with restrictive (0o600files,0o700dirs)nemoclaw/modes, plus optimised + legacy staging assertions that the copy ends up world-readable.test/sandbox-provisioning.test.ts— extend the existingchmodregression test to also stage a restrictive/opt/nemoclaw/package.jsonand assert it ends up444.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: Tinson Lai tinsonl@nvidia.com
Summary by CodeRabbit
Bug Fixes
Tests