Propagate post-process container exit code#105
Merged
moodmosaic merged 1 commit intoJun 8, 2026
Merged
Conversation
moodmosaic
approved these changes
Jun 8, 2026
moodmosaic
left a comment
Member
There was a problem hiding this comment.
| container exit | harvest exit | process exit | note |
|---|---|---|---|
| 0 | 0 | 0 | clean — unchanged |
| 2 | 0 | 2 | the PR's goal ✓ |
| 0 | 1 | 1 | harvest failure still propagates (not masked) ✓ |
| 3 | 1 | 1 | set -e aborts at the harvest line; harvest's code wins |
The only behavioral change vs. the old code is exactly the intended one (row 2: container fails + harvest succeeds now propagates the container's code). Everything else is unchanged. Good, tight change. Thank you! 👍
3 tasks
Member
|
Released as 0.21.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cmd_post_processnow propagates the post-process container's exit code instead of always returning success.Changes
launch.sh: Incmd_post_process, capturedocker inspect -f '{{.State.ExitCode}}' "$NAME"before harvest (falling back to1if inspect fails). Harvest still runs unconditionally; afterward, if the code is non-zero, log a warning to stderr andreturn "$exit_code". Previously the function swallowed the failure and returned success.tests/test_launch.sh: Add section "42. cmd_post_process propagates container exit code", asserting the function capturesState.ExitCodeand returns$exit_codeon failure. Documents the partial-output recovery contract (harvest runs, but the failure propagates).Self-review checklist
Test plan
./tests/test.sh --unit— 1357 tests pass, 0 failed (test_launch.sh: 223)../tests/test.sh --all— full integration matrix (Docker + API key); run in CI.cmd_post_processto harvest, warn on stderr, then return that exit code; a clean exit returns 0 as before.