fix(cli): fail sandbox exec when relay closes without exit status - #2957
fix(cli): fail sandbox exec when relay closes without exit status#2957rootkiller6788 wants to merge 1 commit into
Conversation
`sandbox exec` seeded its exit code to 0 and only overwrote it on an `Exit` event, so a stream that ended early, was cancelled, or was truncated reported a successful run. The gateway already treats the same condition as a relay failure (`Status::unavailable`); mirror that on the CLI side so exit 0 always means an observed exit status of 0. Fixes NVIDIA#2732 Signed-off-by: rootkiller6788 <rootkiller6788@users.noreply.github.com>
|
@rootkiller6788 please trim the title down |
PR Review StatusThe initial code review found no blocking findings: both sandbox-exec paths now distinguish a missing Action required: @rootkiller6788, please trim the PR title as @johntmyers requested. The authorized E2E dispatch can proceed for this head while that metadata fix is pending. Blocking findings:
Carried findings:
Non-blocking suggestions:
Gator metadata
|
|
/ok to test 8b645ee |
|
Label |
Author Follow-Up NudgeThis PR has been in @rootkiller6788, please trim the PR title to the concise subject line requested by @johntmyers. If this is no longer planned, please say so and a maintainer can close it out. |
|
Hit this same bug from the NemoClaw side — had to work around it there, so glad to see it fixed. Approach matches the gateway's |
|
Thanks for the confirmation! Great to hear this aligns with what you've seen on NemoClaw. |
|
Thanks for the review and for dispatching the E2E run. I've trimmed the PR title to the concise subject line ( On the code: both exec paths now track whether an Thanks @natedemoss for the confirmation — glad to hear it aligns with what you saw on the NemoClaw side. Could you please take another look when you get a chance? |
sandbox exec seeded its exit code to 0 and only overwrote it on an
Exit event, so a stream that ended early, was cancelled, or was truncated
reported a successful run. The gateway already treats the same condition as
a relay failure (Status::unavailable); mirror that on the CLI side so exit
0 always means an observed exit status of 0.
Fixes #2732
Summary
sandbox execseeded its exit code to0and only ever overwrote it when anExitevent arrived, so an event stream that closed early, was cancelled, orwas truncated reported a successful (exit 0) run even though the command's
outcome was never observed. This makes "the command ran and returned 0" and
"we never saw what the command did" indistinguishable to callers.
Related Issue
Closes #2732
Changes
Exitevent was observed in both exec paths(
sandbox_exec_grpcandsandbox_exec_interactive_grpc).Exitevent, return a diagnostic errorinstead of
Ok(0), mirroring the gateway's existingexec_loop_resulthandling (
Status::unavailable: "exec relay closed before the commandreported an exit status").
Testing
cargo check -p openshell-clicargo test -p openshell-cli)Checklist
main