Repository navigation
fix: verify reads only the CLI's stdout as the status document - #12
Merged
Merged
Conversation
`verify` merged stderr into the `status --probe --json` output it hands to jq. Varlatch 0.19.0's CLI warns on stderr when it runs on a Node.js release without its line's security fixes (varlatch/varlatch#62); with that line first, jq fails, and under `set -euo pipefail` the action exits without a notification. stderr now goes to a temporary file and is shown only when the command fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review round 1: a SIGTERM during the probe left the temporary file behind. An EXIT trap now removes it, and HUP, INT and TERM become exits so that trap runs (bash skips it when a signal kills the shell). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Verify passed the CLI's stderr to
jqtogether with thestatus --probe --jsondocument. It now reads only stdout as the document, and shows stderr only when the command fails.Why
From Varlatch 0.19.0, the CLI prints a one-line warning on stderr when it runs on a Node.js release without its line's security fixes (varlatch/varlatch#62, CVE-2026-111497). With that line first,
jqfails to parse. Becausebin/varlatch-menuruns underset -euo pipefail, the action then exits without any notification: clicking Verify does nothing.The widget itself already reads stdout and stderr separately (
BarWidget.qml). Inbin/varlatch-menu, the other places that merge stderr only show it as text:status-notify, failedlogout, the login log and--help. There, the warning just shows up as an extra line.Tests
tests/run.shhas a new verify section, andtests/fake-varlatchgainsFAKE_STDERR(a line written to stderr on every call) andFAKE_STATUS_FAIL. The tests cover:mainwithjq: parse error;7f24099: an EXIT trap now removes the file, and HUP/INT/TERM become exits so it runs.All 82 tests pass locally. shellcheck is not installed on this machine, so CI runs it.
No CHANGELOG entry: entries are written at release time here.
🤖 Generated with Claude Code