fix(host): keep the host's reason and exit code in HOST_COMMAND_FAILED - #17
Merged
Merged
Conversation
slock#8609: an upgrade rolled back with only "experiment probe failed:
HOST_COMMAND_FAILED: probe". The installer had written its reason to stdout
({ok:false,error}), but CommandHost::call dropped it and the exit status.
Now: "HOST_COMMAND_FAILED: probe (exit 3): <reason>", with the reason
reduced to one printable line of at most 240 chars (control characters
removed). stderr stays null (a resident child could hold a pipe open).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: archer <archer@mail.build>
The reason in HOST_COMMAND_FAILED reaches the terminal and the receipt. Replace any line that names a credential or carries URL userinfo, and the value line after a credential key ending in ':' or '=', before the 240-character cut. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: archer <archer@mail.build>
… output A non-zero exit whose stdout is not JSON used to surface only the JSON parse error. Report HOST_COMMAND_FAILED with the exit code instead, and cover it plus the credential redaction end to end through the fixture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: archer <archer@mail.build>
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.
What
botiverse/slock#8609: an in-place Computer upgrade rolled back with only
experiment probe failed: HOST_COMMAND_FAILED: probe. The installer controller had written its reason to stdout ({"protocolVersion":1,"ok":false,"uncertain":false,"error":"…"}) and exited non-zero, butCommandHost::callthrew away both theerrortext and the exit status.Now the failure reads
HOST_COMMAND_FAILED: probe (exit 3): <reason>:operation.reasonand the receipt.Tests
native_controller_failure_keeps_the_hosts_reason_and_exit_code: the fixture controller fails with an escape sequence and a 600-char tail. The test asserts the exit code and reason are present, no control characters remain, the message is bounded, and the error is still definite (not uncertain).cargo test: 46 passed.cargo clippy --all-targets -D warningsandcargo fmtare clean.Release
This needs a k-carrier 0.3.3 release plus an installer bump to reach users. The installer-side diagnostics (swallowed start error, product stderr tail kept privately) are separate, in slock task #896 (Wug).
🤖 Generated with Claude Code