Repository navigation
fix(minimald): report 137 for a task whose container a SIGKILL ended - #3503
Conversation
hakoniwa reports a container that a SIGKILL ended as code 125 with no inner exit code, so a task exec the daemon killed reported 125, below 128, and the shutdown notice never printed for it. Map that one shape to 137, as a SIGKILLed command reports; a command that exits 125 itself and a sandbox failure keep 125. Refs #3062 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Approved: no findings at Nothing to do. Clobber: none seen. |
norrietaylor
left a comment
There was a problem hiding this comment.
Looks right. The mapping matches only hakoniwa's container-SIGKILL shape (125, no inner exit code, that exact reason), the same predicate sandbox_failure already excludes, so a command's own 125, a sandbox failure and the export-skipped 125 all keep their code. With 137 the shutdown notice in bridge.rs now holds for task execs, which makes the comment there true. The unit test covers the mapped case and the cases that must not move.
What
When the daemon ends a task's box with SIGKILL, the task now exits 137 (128 + 9), as it would under a shell. It used to exit 125.
Refs #3062 (its first item; the
minimald:prefix on client lines is a separate change).Why
A command killed by a signal inside the box already reports 128 plus the signal. A box ended by SIGKILL itself was the one case that did not: the daemon passed the sandbox's own status, 125, straight through. 125 is below the range the daemon treats as "killed", so the shutdown notice never printed for such a task, although a comment there says it does.
What does not change
Only one exact case is mapped: a box ended by SIGKILL with no exit code of its own. These keep 125:
min task run's own 125 for a command that succeeded with exports skipped.Other signals that end the box itself still report 125.
Testing
a_container_sigkill_reports_137checks the mapped case and the four that must stay as they are (a command's own 125, a sandbox failure, a signalled command at 143, a clean exit). It is a unit test of the mapping: driving it end to end needs a real sandbox child.Workspace lint, tests and the native end-to-end script pass on this commit.
🤖 Generated with Claude Code
Summary by CodeRabbit