test(e2e): add non-root sandbox smoke test#3166
Conversation
|
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. |
📝 WalkthroughWalkthroughThis PR introduces a new smoke test for non-root container execution. A new Bash script validates that the container entrypoint chain executes successfully and the kernel ChangesNon-Root Sandbox Smoke Test
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 docstrings
🧪 Generate unit tests (beta)
Comment |
|
This repository limits contributors to 10 open pull requests. Please close or merge existing PRs before opening new ones. |
|
Thanks @hunglp6d — option 1 is the right call. Land Tests 1–3 now; Test 4 ( Rationale matches yours: main currently has only the build-time clearing half of the gateway-token security refactor; the startup-time generator lives in #2485. Landing Test 4 as a PR gate before #2485 merges would deterministically red every PR in the repo — that's fail-with-future-fix, not all-pass. I've added a follow-up requirement to #2571 and left a note on #2485 so Test 4 lands as part of that PR's diff. I'll also close my stale #2711 in favor of this one. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pr-self-hosted.yaml:
- Line 165: Actionlint is flagging the custom self-hosted runner labels (e.g.,
linux-amd64-cpu4 and linux-arm64-cpu4) used in pr-self-hosted.yaml and
nightly-e2e.yaml; add a repository-root actionlint.yaml with a [runner-label]
section that whitelists those labels (include linux-amd64-cpu4 and
linux-arm64-cpu4) so actionlint accepts them, or alternatively change the
affected jobs in pr-self-hosted.yaml and nightly-e2e.yaml to use GitHub-hosted
runner labels instead if you no longer need self-hosted runners.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 5d4c90f5-a16b-46ee-b015-f7f5c15ceab3
📒 Files selected for processing (2)
.github/workflows/pr-self-hosted.yamltest/e2e-non-root-smoke.sh
## Summary - Bump the docs release metadata to `0.0.38`. - Document release-prep updates for status policy versions, Local Ollama validation and cleanup, blueprint policy additions, rebuild backup handling, and NemoHermes uninstall branding. - Refresh generated `nemoclaw-user-*` skills from the updated docs. ## Source summary - #3185 -> `docs/reference/commands.md`: Documents that `nemoclaw <name> status` displays the gateway active policy version when OpenShell reports one. - #3167 -> `docs/reference/commands.md`, `docs/inference/use-local-inference.md`: Documents uninstall cleanup for matching Local Ollama auth proxy processes. - #2737 -> `docs/inference/use-local-inference.md`, `docs/network-policy/customize-network-policy.md`, `docs/manage-sandboxes/lifecycle.md`, `docs/reference/commands.md`: Documents stricter Local Ollama tool-call validation, blueprint policy additions, and partial rebuild backup handling. - #3220 -> `docs/reference/commands.md`: Documents NemoHermes-specific uninstall progress and completion text. - #3158 -> `.agents/skills/nemoclaw-user-configure-inference/*`: Refreshes generated user skills from existing `docs/inference/switch-inference-providers.md` heartbeat documentation. - #3199 -> `.agents/skills/nemoclaw-user-get-started/SKILL.md`: Refreshes generated user skills from existing `docs/get-started/quickstart.md` Model Router wording. ## Skipped - #3272 and #3268 were already documented by their merged docs updates on `main`. - #3154, #3216, #3166, and #3195 have no additional user-facing docs impact for this release-prep pass. - No commits matched `docs/.docs-skip`. ## Test plan - `python3 scripts/docs-to-skills.py docs/ .agents/skills/ --prefix nemoclaw-user` - `make docs` - `npm run build:cli` - Commit and pre-push hooks: markdownlint, docs-to-skills verification, gitleaks, commitlint, skills YAML tests, CLI typecheck Made with [Cursor](https://cursor.com) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Behavior Changes** * Rebuild now safely handles partial backups, preserving successfully captured entries while reporting only unarchived paths * Uninstall for Local Ollama setups now stops proxy processes before cleanup * Local Ollama models require stricter tool-call response validation during onboarding * Blueprint policy additions enable custom network policy extensions via `components.policy.additions` * New `NEMOCLAW_AGENT_HEARTBEAT_EVERY` configuration controls agent periodic task frequency * Status display now shows active policy version when available <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
Adds the
test-non-root-sandbox-smoketest from #2571 — a PR-gate job that runs the production image under-security-opt no-new-privilegesto catch #2472 and #2482 regressions, without OpenShell, NVIDIA_API_KEY, or live inference.Related Issue
Part of #2571
Changes
test/e2e-non-root-smoke.sh(host-side bash, noopenshell/nemoclawCLI required):--security-opt no-new-privileges(regression guard for # 2472; passes atruecommand via the entrypoint'sNEMOCLAW_CMDexec path so the gateway-launch branch is bypassed and we don't need the OpenShell-managed runtime).NoNewPrivs=1inside the container (defends the test itself against silent typos in the docker flag).test-non-root-sandbox-smokein.github/workflows/pr-self-hosted.yaml—linux-amd64-cpu4,timeout-minutes: 5,needs: build-sandbox-images, reuses the existingisolation-imageartifact.openclaw tuidoes not error with "Missing gateway auth token" inside a login shell under the same constraint (regression guard for # 2482) after PR feat(security): runtime gateway token injection #2485 is mergedType of Change
Verification
npx prek run --all-filespassesnpm testpassesmake docsbuilds without warnings (doc changes only)Signed-off-by: Hung Le hple@nvidia.com