fix(onboard): preserve root-owned config sync dirs#4199
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR updates NemoClaw's sandbox config-sync script to use ChangesNemoClaw Config Permission Safety
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
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 docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
PR Review AdvisorFindings: 0 needs attention, 0 worth checking, 0 nice ideas 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
|
Selective E2E Results — ✅ All requested jobs passedRun: 26422388069
|
Selective E2E Results — ✅ All requested jobs passedRun: 26422445180
|
Selective E2E Results — ❌ Some jobs failedRun: 26422654135
|
Selective E2E Results — ❌ Some jobs failedRun: 26430878242
|
Summary
~/.nemoclawdirectory hardening for user-owned config dirschmodwhen the config dir is owned by another UID, which preserves OpenClaw's root-owned/sandbox/.nemoclawlayoutconfig.jsonrestricted to0600Root Cause
PR #4054 changed the step-7 sandbox config sync script from writing
~/.nemoclaw/config.jsonto unconditionally runningchmod 700 ~/.nemoclawfirst. In the OpenClaw sandbox image,/sandbox/.nemoclawis intentionally root-owned with mode1755, while/sandbox/.nemoclaw/config.jsonis sandbox-owned and writable. The directory chmod fails underset -euo pipefail, soopenshell sandbox connect <sandbox>exits 1 during:[7/8] Setting up OpenClaw inside sandboxThis restores compatibility with that image contract without reverting the file-permission hardening from #4054.
Evidence
26413471038, installed ref8ed9a2c04c80627deed519a7c5ffe8f95ebb5ddd,cloud-onboard-e2ereached✓ OpenClaw gateway launched inside sandbox.26414889786, installed ref94fefa6fd08e33d48eede651e33770a0712da854,cloud-onboard-e2efailed atopenshell sandbox connect e2e-cloud-onboard.Validation
npm ci --include=dev --ignore-scriptsnpx vitest run src/lib/onboard/config-sync.test.ts --reporter=verbosenpx @biomejs/biome check src/lib/onboard/config-sync.ts src/lib/onboard/config-sync.test.tsgit diff --checknpm run build:clinpm run typecheck:cliSummary by CodeRabbit
Refactor
Tests