Skip to content

Fix probe wrapper: raven-drop runs commands, it doesn't log piped output - #103

Merged
jasandroidx merged 1 commit into
ravenstackfrom
fix-probe-raven-drop-piping
Sep 26, 2026
Merged

jasandroidx merged 1 commit into
ravenstackfrom
fix-probe-raven-drop-piping

Conversation

@jasandroidx

Copy link
Copy Markdown
Owner

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 found errors, and no SUMMARY: line ever reached the caller.

Root cause, confirmed live against the box: armory/bin/probe did

bash "$script" | raven-drop "probe-${name}"

— 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 real SUMMARY: OK|WARN|FAIL line never survived as the last line of output.

Fix

armory/bin/probe now:

  1. Hands raven-drop the probe script's source (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.
  2. Separately exec bash "$script" so the wrapper's own stdout/exit code are exactly the probe script's — nothing appended after the SUMMARY line.

No TypeScript changed, so this doesn't touch runProbe/executeProbe in ui-v2/src/lib/keep/probes.ts — same allowlist, same execFile-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 in ui-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

/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.
@vercel

vercel Bot commented Sep 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ravenstack-keep Ready Ready Preview Sep 26, 2026 6:12am UTC

Request Review

@jasandroidx
jasandroidx merged commit 62db8fb into ravenstack Sep 26, 2026
4 checks passed
@jasandroidx
jasandroidx deleted the fix-probe-raven-drop-piping branch September 26, 2026 06:12

This branch was successfully deployed

1 active deployment
Preview — 1ffd1dbe Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants