fix(ci): stabilize platform vitest main workflow#4715
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
📝 WalkthroughWalkthroughThis PR hardens sandbox startup security by adding explicit root/non-root branching to the config hash refresh function, ensuring root-mode operations step-down with proper permission handling. Corresponding test updates comprehensively verify step-down behavior, handle CI edge cases where uid-0 processes may bypass restrictions, isolate Docker installer tests to a minimal harness, and enhance GPU preflight tests with kernel version context. ChangesSandbox Step-Down Security and Test Coverage
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
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 |
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: Dispatch required scenario E2E:
Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 1 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
This is an automated advisory review. A human maintainer must make the final merge decision. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/install-docker-group-reexec.test.ts (1)
37-52: 💤 Low valueConsider clarifying the macOS comment.
The comment on lines 41-42 mentions "macOS platform tests" but the suite is now Linux-only via
describeLinux(line 24), so these tests won't run on macOS. The comment is explaining the design rationale (avoiding Bash 3 compatibility issues discovered during development), but it reads as if macOS might still execute these tests. Consider rephrasing to: "Keep the harness focused on ensure_docker to avoid Bash 3 compatibility issues (originally discovered on macOS) and isolate test behavior from the installer's full top-level state."🤖 Prompt for 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. In `@test/install-docker-group-reexec.test.ts` around lines 37 - 52, Update the inline comment above the test harness creation to clarify that the harness is focused on ensure_docker to avoid Bash 3 compatibility issues (originally discovered on macOS) and to isolate test behavior from the installer's top-level Bash state; change the existing macOS-focused wording to the suggested phrasing and keep references around harnessDir, installHarness, installer_non_interactive, and ENSURE_DOCKER_FUNCTION intact so only the comment text is modified.
🤖 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.
Nitpick comments:
In `@test/install-docker-group-reexec.test.ts`:
- Around line 37-52: Update the inline comment above the test harness creation
to clarify that the harness is focused on ensure_docker to avoid Bash 3
compatibility issues (originally discovered on macOS) and to isolate test
behavior from the installer's top-level Bash state; change the existing
macOS-focused wording to the suggested phrasing and keep references around
harnessDir, installHarness, installer_non_interactive, and
ENSURE_DOCKER_FUNCTION intact so only the comment text is modified.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2302a212-1900-4390-9b62-0130c79cb2f0
📒 Files selected for processing (4)
scripts/nemoclaw-start.shsrc/lib/onboard/sandbox-gpu-preflight.test.tstest/install-docker-group-reexec.test.tstest/nemoclaw-start.test.ts
Selective E2E Results — ✅ All requested jobs passedRun: 26895200572
|
Summary
Stabilizes the Platform Vitest Main Watch workflow by making platform-sensitive tests hermetic across macOS and WSL. The fix addresses Bash 3 empty-array behavior on macOS, WSL root permission behavior, and WSL host detection leaking into generic Linux GPU preflight tests.
Changes
scripts/nemoclaw-start.shwhen refreshing the OpenClaw config hash as non-root.test/nemoclaw-start.test.tsfixtures tolerate macOS Bash 3 and WSL root runners.ensure_dockerharness.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Tests
Chores