Repository navigation
Fix probe wrapper: raven-drop runs commands, it doesn't log piped output - #103
Merged
Merged
Conversation
/usr/local/bin/probe was doing `bash "$script" | raven-drop "probe-<name>"` -- piping the probe script's already-rendered plain-text output INTO raven-drop. But raven-drop (per its own skill docs) takes a heredoc of commands on stdin and runs them itself; it does not just log stdin verbatim. Feeding it rendered output made it try to execute every line of that output as shell, which failed line by line (confirmed live via the run_probe MCP tool on the actual box) and buried the script's real SUMMARY line under raven-drop's own commands/output/footer wrapper. Now raven-drop gets the script's SOURCE (to run and archive to the vault, in the background, best-effort) and the script is separately exec'd directly so the wrapper's own stdout/exit code are exactly the script's -- nothing else appended after the SUMMARY line.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
Found while Jason tested the deployed probe rack (#88): every probe came back with the right diagnostic data buried under a wall of
command not founderrors, and noSUMMARY:line ever reached the caller.Root cause, confirmed live against the box:
armory/bin/probedid— piping the probe script's already-rendered plain-text output into
raven-drop. But per raven-drop's own docs, it takes a heredoc of commands on stdin and runs them itself; it is not a passive "log this text" pipe. Fed the script's rendered output, it tried to execute every line as shell (== sitrep ==→==: command not found, etc.), exited 2, and appended its own commands/output/footer wrapper after whatever the script had printed — so the script's realSUMMARY: OK|WARN|FAILline never survived as the last line of output.Fix
armory/bin/probenow:raven-drop "probe-${name}" < "$script") in a backgrounded, best-effort subshell with its own output silenced — this is what actually archives a run to the vault, matching raven-drop's real contract, and a raven-drop hiccup can no longer take down the actual result.exec bash "$script"so the wrapper's own stdout/exit code are exactly the probe script's — nothing appended after theSUMMARYline.No TypeScript changed, so this doesn't touch
runProbe/executeProbeinui-v2/src/lib/keep/probes.ts— same allowlist, sameexecFile-only invocation, same shape. Only the box-side wrapper script's own internals change.Verification
Run from
ui-v2/(confirming this didn't regress anything, since nothing inui-v2/changed):npm run typecheck✅npm test✅ (34 pass)bash -n armory/bin/probe✅ (syntax)Not yet verified against a live re-run on the box (needs redeploying this one file) — see the PR comment for the redeploy command Jason will run.
No services restarted, nothing merged.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PESvczRwpL58x1u2fepPFM
Generated by Claude Code