Skip to content

fix(sandbox): allow group-writable homes for launch readiness - #13133

Merged
ericksoa merged 6 commits into
mainfrom
codex/fix-6906916
Oct 14, 2026
Merged

ericksoa merged 6 commits into
mainfrom
codex/fix-6906916

Conversation

@ericksoa

@ericksoa ericksoa commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Outcome

Launch-readiness publication and reuse accept a current-user home with group-write permission, including 0775 with umask 0002. NemoClaw keeps its existing private state locations and leaves the home permissions unchanged.

Reason

The readiness store applied the application-state permission rule to the containing home directory. A private NemoClaw state tree was rejected solely because the home was group-writable. This change follows OpenClaw's native handling of private application state more closely.

Related issues

Refs #10638 for the group-writable-home reproduction. Other causes of unsafe readiness state remain outside this proved repair.

Changes

  • Permit group write only on the current user's home during inspection, parent-directory sync, and revalidation. Retain directory ownership and identity, symlink rejection, other-write rejection, private-state modes, and runtime-authority checks.
  • Keep permission evidence accurate when other-write access causes a home rejection.
  • Bind directory creation, receipt reads, staging writes, publication renames, and cleanup to retained Linux directory handles. A replaced home path is rejected without redirecting an operation into the replacement.
  • Cover publication and reload on default and custom gateway ports under umask 0002, with unsafe-state and world-writable-home denials.
  • Exercise the boundary in the existing full-e2e launch scenario on disposable GitHub runners. A fixture removes only the test sandbox's readiness receipt, runs the existing producer and two PTY sessions under a 0775 home, and requires the resulting lease to be valid. It restores the original home mode and umask on success, launch failure, and invalid-lease rejection. Local and preinstalled Launchable execution retain their original permission handling.
  • Refresh the nine existing curl package pins to Debian 8.14.1-2+deb13u7 and update the existing version assertion. This resolves the separate curl/libcurl APT mismatch without adding library pins or changing other package versions. The Dockerfile values match the repair merged in fix(images): align curl with current Debian security libraries #13158.

Verification

  • Core readiness, launch, and connect-flow regression selection: 220 passed after the previously failing default/custom-port cases were repaired. Six Linux-only cases are skipped on macOS.
  • Pinned Linux Node image as an unprivileged UID with read-only source and dependencies: 57 passed, with one unrelated platform-specific case skipped. This includes state-root and descendant creation swaps, fence staging and cleanup, publication rename, direct receipt read, and restrictive-umask coverage.
  • Fixture and gateway support tests: 25 passed. The invalid-lease regression failed before the fixture guard and passes with it. The existing Linux-only PTY helper test remains owned by Linux CI.
  • Exact committed-ref live/fast parity, assertion-budget check, CLI typecheck, growth guardrails, signed commit hooks, and normal publication hooks passed. No assertion budget or existing live deadline was changed.
  • Curl image-contract selection: 71 tests passed. Current Debian security metadata publishes matching curl/libcurl 8.14.1-2+deb13u7 packages for AMD64 and ARM64.
  • Current commit f5435ac29b7a5242d1431a1f95b268ebc09ed2dd is GitHub Verified. Main PR CI passed on attempt 1, including all twelve CLI shards and pinned-v1 compatibility. Rootless Linux validation passed on attempt 1; its digest-authenticated receipts bind the exact candidate to successful lifecycle recovery, authenticated routes, receipt-owned transaction, and cleanup.
  • The complete managed-image workflow passed on attempt 1: both Pi architectures, Deep Agents staging, all three direct image startup jobs, and exact all-agent activation on Docker and rootless Podman.
  • Trusted Docker qualification passed on attempt 1 for full-e2e, onboard-repair, both resume scenarios, rebuild-openclaw, and rebuild-hermes. Its authenticated full-E2E artifact binds candidate f5435ac29b7a5242d1431a1f95b268ebc09ed2dd, workflow 45a898e2b70839a5a728fd5dedaa450110da075c, and Docker execution. The live log records mode=775 umask=2 receipt=absent before the real producer and two PTY sessions, then mode=775 lease=valid sessions=2; all eleven scenario phases and five registered cleanup operations passed. The fixture restoration path returned without error. Exact post-restoration mode and umask values are asserted by the focused tests but are not separately retained in the live artifact.
  • Self-hosted PR qualification passed after the PR became ready: AMD64 and ARM64 image builds, Hermes root-entrypoint behavior, the managed OpenClaw boundary, port override, and non-root sandbox startup all passed. The unselected GPU lane was skipped.
  • The previous curl/libcurl APT conflict is resolved by the approved curl-only update. No library pins, other dependency upgrades, workflow changes, or base integration were added.
  • The diff contains no secrets, API keys, or credentials.

Review notes

The final exact-head Advisor reevaluation has all nine findings ledgers clear, zero E2E recommendations, and a passing blocker gate. Earlier reviews identified the parent-path replacement case repaired by f5435ac29b7a5242d1431a1f95b268ebc09ed2dd, requested the combined live evidence supplied above, and once missed the existing Linux-only caller gate. Those reviews were resolved with the repair and exact evidence; no finding is waived.

CodeRabbit full review covered all thirteen files through exact head f5435ac29b7a5242d1431a1f95b268ebc09ed2dd and produced no actionable comments. Its docstring warning is advisory.

The curl-only repair was self-reviewed against the retained failing log, Debian metadata, all nine install locations, and the same package versions already merged in #13158. The production readiness code and its live fixture are unchanged by that dependency repair. Two independent source reviews found no remaining issue in the retained-directory repair.


Signed-off-by: Aaron Erickson [email protected]

@ericksoa ericksoa self-assigned this Oct 14, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/NemoClaw/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 8bfe24a5-2a63-4c95-bc14-4abd55e1056e
📥 Commits

Reviewing files that changed from the base of the PR and between abf42f1 and f5435ac.

📒 Files selected for processing: 13
  • Dockerfile
  • Dockerfile.base
  • agents/hermes/Dockerfile.base
  • agents/langchain-deepagents-code/Dockerfile.base
  • agents/pi/Dockerfile.base
  • src/lib/state/launch-readiness-lease.test.ts
  • src/lib/state/launch-readiness-lease.ts
  • test/e2e/README.md
  • test/e2e/fixtures/launch-readiness-home.ts
  • test/e2e/live/full-e2e.test.ts
  • test/e2e/live/launch-agent-turn.ts
  • test/e2e/support/full-e2e-gateway.test.ts
  • test/platform/images/node-tar-dockerfile-contract.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Walkthrough

The readiness lease now validates directories through retained descriptors. It permits group-write on the home directory while rejecting other-write. Tests cover permission cases, path swaps, and end-to-end qualification. Dockerfiles and a contract test update the pinned curl version.

Changes: Readiness lease and qualification

Layer / File(s) Summary
Descriptor-backed directory access
src/lib/state/launch-readiness-lease.ts
Directory traversal retains and validates ancestor descriptors. Secure reads, writes, and renames use descriptor-backed paths.
Home permission rules and lease tests
src/lib/state/launch-readiness-lease.ts, src/lib/state/launch-readiness-lease.test.ts
The validator permits group-write on the home directory and rejects other-write. Other directories continue to reject group- and other-write. Tests cover valid leases, unsafe permissions, path swaps, and private directory modes.
End-to-end home qualification
test/e2e/fixtures/launch-readiness-home.ts, test/e2e/live/launch-agent-turn.ts, test/e2e/live/full-e2e.test.ts, test/e2e/support/full-e2e-gateway.test.ts, test/e2e/README.md
A conditional fixture changes home permissions and umask, removes the prior receipt, and requires a valid lease after launch. The full-e2e test enables qualification only for GitHub Actions source-install runs. Tests cover cleanup and disabled behavior; the README documents the setup.

Curl package pin updates

Layer / File(s) Summary
Docker image curl package pins
Dockerfile, Dockerfile.base, agents/*/Dockerfile.base, test/platform/images/node-tar-dockerfile-contract.test.ts
Dockerfiles now pin curl to 8.14.1-2+deb13u7 instead of 8.14.1-2+deb13u5. The contract test searches for the updated version.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix

Suggested reviewers: senthilr-nv, jyaunches, cjagwani

Merge Risk: ⚪ Minimal · up to f5435

This change lets launch readiness accept a group-writable home directory while keeping private state locations locked down. It also updates the curl version pins. No outstanding defects were found. Fresh CI and the live 0775 qualification are still pending and should pass as normal before merge.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 4.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 7 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
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.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the primary change: allowing group-writable home directories for launch-readiness validation.
Full details: Docstring Coverage

Explanation

Docstring coverage is 4.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 25 functions across 7 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-code-quality

github-code-quality Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/plugin

main 63002cd codex/fix-6906916 f5435ac +/-
96% 97% +1%
View coverage of the 8 most impacted files.
File main 63002cd codex/fix-6906916 f5435ac +/-
nemoclaw/src/onboard/config.ts 98% 96% -2%
nemoclaw/src/index.ts 94% 93% -1%
nemoclaw/src/bl...print/runner.ts 95% 95% 0%
nemoclaw/src/bl...ime-identity.ts 97% 97% 0%
nemoclaw/src/bl...t-management.ts 100% 100% 0%
nemoclaw/src/co.../config-show.ts 100% 100% 0%
nemoclaw/src/commands/slash.ts 100% 100% 0%
nemoclaw/src/on...native-route.ts 0% 100% +100%

TypeScript / code-coverage/cli

main 63002cd codex/fix-6906916 f5435ac +/-
84% 86% +2%
View coverage of the 10 most impacted files.
File main 63002cd codex/fix-6906916 f5435ac +/-
src/lib/onboard.ts 62% 47% -15%
src/lib/actions...ess-recovery.ts 65% 78% +13%
src/lib/state/l...diness-lease.ts 66% 83% +17%
src/lib/inferen...ollama/proxy.ts 41% 61% +20%
src/lib/onboard.../application.ts 55% 84% +29%
src/lib/domain/...y/dimensions.ts 0% 71% +71%
src/lib/actions...ry/operation.ts 0% 76% +76%
src/lib/actions...try/snapshot.ts 0% 78% +78%
src/lib/inferen...ovider/index.ts 0% 88% +88%
src/lib/onboard...ternal-image.ts 0% 91% +91%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 14, 2026 17:07 UTC

@ericksoa

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@ericksoa

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@ericksoa

Copy link
Copy Markdown
Member Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Full review finished.

@github-actions

Copy link
Copy Markdown
Contributor

PR Review Advisor finished for commit f5435ac. Include the Advisor findings in the complete PR feedback collection. Verify and group valid findings before repair.

Request review only when Require no Advisor blockers is green.

All previous runs

@ericksoa
ericksoa marked this pull request as ready for review October 14, 2026 18:39
@ericksoa
ericksoa merged commit 38b5411 into main Oct 14, 2026
@ericksoa
ericksoa deleted the codex/fix-6906916 branch October 14, 2026 21:51
@wscurran wscurran added area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression platform: linux Affects non-Ubuntu Linux environments labels Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: sandbox OpenShell sandbox lifecycle, runtime, config, or recovery area: security Security controls, permissions, secrets, or hardening bug-fix PR fixes a bug or regression platform: linux Affects non-Ubuntu Linux environments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants