fix(cli): stabilize platform vitest on macOS and WSL#5209
Conversation
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
|
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 (3)
📝 WalkthroughWalkthroughOverrides process.argv to a native layout while running oclif commands (restoring it after), centralizes gateway cmdline matching with token/path checks, adds ChangesProcess Argv Management, Gateway Detection, and Test Reliability
Sequence Diagram(s): sequenceDiagram
participant Runner as runOclifCommandById
participant Process as process
participant OclifConfig as OclifConfig
Runner->>Process: save original argv
Runner->>Process: set argv [execPath, CLI_NAME, ...nativeArgs]
Runner->>OclifConfig: config.runCommand(commandId, args)
OclifConfig-->>Runner: result or throw
Runner->>Process: restore original argv (finally)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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 |
PR Review AdvisorFindings: 0 needs attention, 0 worth checking, 0 nice ideas Consider writing more tests for
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
|
Vitest E2E Scenario RecommendationRequired Vitest E2E scenarios: Dispatch required Vitest E2E scenarios:
Full Vitest E2E advisor summaryVitest E2E Scenario AdvisorBase: Required Vitest E2E scenarios
Optional Vitest E2E scenarios
Relevant changed files
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Selective E2E Results — ✅ All requested jobs passedRun: 27333702326
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Selective E2E Results — ✅ All requested jobs passedRun: 27334726578
|
Selective E2E Results — ✅ All requested jobs passedRun: 27334899286
|
Signed-off-by: Carlos Villela <cvillela@nvidia.com>
Selective E2E Results — ✅ All requested jobs passedRun: 27336922398
|
Summary
This PR stabilizes the platform Vitest main-watch workflow across macOS and WSL. It fixes the Docker-driver gateway identity false positive, makes the gateway marker regression portable to macOS Bash, keeps direct oclif command execution aligned with translated argv, and prevents oclif from filling missing CLI positionals from stray stdin on WSL.
Changes
openshell-gatewayprocess identity by command token or exact executable path instead of substring checks.process.argvaround direct oclif command-id execution so parse/error helpers see translated native argv.credentials reset <provider>andpolicy-add [preset]positionals asignoreStdinso WSL probe output cannot become a provider or preset argument.Type of Change
Verification
npx vitest run src/lib/onboard/docker-driver-gateway-runtime.test.ts test/nemoclaw-start-gateway-marker.test.ts src/lib/cli/oclif-runner.test.ts test/cli/credentials-command.test.ts test/cli/sandbox-mutations.test.ts test/cli-oclif-compatibility.test.ts test/e2e-scenario/support-tests/e2e-fixture-context.test.ts test/e2e-scenario/support-tests/e2e-shell-supervisor.test.ts --testTimeout 60000passesnpm test -- --testTimeout 60000passesnpx prek run --all-filespassesnpm run typecheck:clipassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com
Summary by CodeRabbit
Bug Fixes
New Features
Tests
Behavior