fix: preserve miden wrapper child exit codes - #245
Open
omerbek wants to merge 1 commit into
Open
Conversation
omerbek
force-pushed
the
fix/preserve-wrapper-exit-code
branch
from
September 1, 2026 19:07
298d3c5 to
f4f61f7
Compare
Collaborator
|
Your commits need to be signed |
omerbek
force-pushed
the
fix/preserve-wrapper-exit-code
branch
from
September 5, 2026 10:24
f4f61f7 to
a4f9ad2
Compare
Contributor
Author
|
The commit is now SSH-signed and GitHub shows it as verified ( The remaining CI failure is separate from the signature check: |
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
Preserves the wrapped component process exit code when
midensuccessfully dispatches to a child command.Fixes #243.
Why
Config::execute_command()already returns the child processExitStatus, butmiden_wrapperconverted every non-zero child status into ananyhowerror. Sincemainreturnedanyhow::Result<()>, all child failures collapsed to process exit code1at the wrapper boundary.That makes CI callers unable to distinguish component-specific exit codes, usage errors, or panic exits from wrapped tools.
Changes
std::process::ExitCodethrough the top-level command execution path.128 + signalwhere available, with a failure fallback otherwise.miden-vmexiting42and verifiesmiden vmexits with42.Testing
cargo checkcargo clippy --lib --bins -- -D warningscargo test --test miden integration_miden_preserves_component_exit_code(Windows: test iscfg(unix), so it compiles and is filtered out locally; it exercises the shell-script fixture on Unix CI)cargo test --test operations --no-rungit diff --checkNotes from local Windows validation:
cargo test/cargo clippy --all-targets --all-featurescurrently compile unrelated Unix-only test code paths on Windows (std::os::unix::fs::symlinkin existing tests), so they do not complete locally.cargo fmt --checkreports repository-wide newline-style issues under this Windows checkout; the submitted diff was checked for whitespace withgit diff --checkand the PR compare was verified to avoid CRLF-only churn.