fix(cli): close non-terminal exec stdin by default - #6393
Conversation
Fixes #6319 Signed-off-by: Chengjie Wang <chengjiew@nvidia.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughAdds explicit ChangesSandbox exec stdin handling
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant SandboxExecCommand
participant execSandbox
participant runSandboxExecChild
participant defaultSandboxExecSpawner
participant buildSandboxExecStdio
SandboxExecCommand->>execSandbox: run(options incl. stdin flag)
execSandbox->>runSandboxExecChild: options
runSandboxExecChild->>defaultSandboxExecSpawner: binary, args, options
defaultSandboxExecSpawner->>buildSandboxExecStdio: options
buildSandboxExecStdio-->>defaultSandboxExecSpawner: "inherit" or ["ignore","inherit","inherit"]
defaultSandboxExecSpawner-->>runSandboxExecChild: spawned child process
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Code Coverage OverviewLanguages: TypeScript TypeScript / code-coverage/pluginThe overall coverage in the Show a code coverage summary of the most covered files.
TypeScript / code-coverage/cliThe overall coverage in the Show a code coverage summary of the most covered files.
Updated |
|
🌿 Preview your docs: https://nvidia-preview-pr-6393.docs.buildwithfern.com/nemoclaw |
|
Superseded by #6394, which carries the same fix on a GitHub-verified signed commit. |
PR Review Advisor — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
PR Review Advisor (Nemotron Ultra) — No blocking findingsMerge posture: No blocking advisor findings Action checklist
Test follow-ups to resolve or justifyIf these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.
This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision. |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Target RecommendationRequired E2E targets: Dispatch required E2E targets:
Full E2E target advisor summaryE2E Target AdvisorBase: Required E2E targets
Optional E2E targets
Relevant changed files
|
Summary
nemoclaw <sandbox> exec, preventing live pipes/SSH stdin from hanging one-shot commands.--stdin/--no-stdincontrols so intentional piped scripts still work.Related Issue
Fixes #6319
Verification
npx vitest run --project cli src/commands/sandbox/exec.test.ts src/lib/actions/sandbox/exec-stdio.test.ts src/lib/actions/sandbox/exec.multiline-guard.test.ts src/lib/actions/sandbox/exec-openclaw-permission-cleanup.test.ts— 4 files / 47 tests passed.npm run build:cli— passed.npm run typecheck:cli— passed.npm run docs:check-agent-variants— passed.git diff --cached --check— passed before commit.Linux Reproduction
Validated on
aits@aits-log-worker-6with Ready sandboxrepro-6182-live.Baseline
nemoclaw v0.0.74-13-gf0d25491c:Fixed PR head
nemoclaw v0.0.74-37-gd73686641:Signed-off-by: Chengjie Wang chengjiew@nvidia.com
Summary by CodeRabbit
New Features
--stdinand--no-stdinoptions for sandbox/exec commands to control stdin forwarding.Bug Fixes