mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-26 21:26:39 +00:00
* fix(opensandbox): report the command deadline as Exit Code: 124 `execute_command` had no timeout branch, so a command that hit its deadline was reported as whatever the SDK happened to surface. OpenSandbox is the last provider without the `Exit Code: 124` marker that Local/AIO/Tenki/E2B/BoxLite emit, and which #6847 established the evidence chain parses to recover the real shell status. The deadline is enforced by execd, not by the client: the timeout travels to the server in `RunCommandOpts`, the SSE read timeout is disabled, and the process group is reaped with SIGKILL. So a timed-out command does not raise -- it comes back as a `CommandExecError` result with the signal death reported as exit code -1, which the adapter rendered as `Exit Code: -1`. Normalize that pairing to the 124 marker, keeping the partial output the command produced before the kill. The guard is deliberately narrow: a command that exits non-zero on its own never carries the error event, and a failed launch shares the same error event with no usable code, so neither is relabelled a timeout. Tests: three cases pin the deadline paths (client-side TimeoutError from a bridge, the server-side -1 kill with output, and the free-text shape that must stay on the existing missing-exit-code path as a start failure), plus a case pinning that ordinary exits keep their own code. RED/GREEN: the deadline cases fail on the unmodified source and pass with it; test_opensandbox_provider.py 114 passed (110 pre-existing unchanged); the four sandbox provider suites 601 passed; ruff check and format clean. * fix(opensandbox): recognize explicit deadline results Signed-off-by: yetuge <2219677952@qq.com> --------- Signed-off-by: yetuge <2219677952@qq.com>