From ba6173340eee7e78d250fe800ebf2eda8e6d2820 Mon Sep 17 00:00:00 2001 From: phall Date: Sun, 16 Aug 2026 17:52:35 -0400 Subject: [PATCH] fix(agent-stack): track Blackbird 0.4.x in the health checks The Go companions blackbird-claude and blackbird-pi stopped shipping in Blackbird v0.3.0 when harness delivery moved into native plugins, so checks/00-binaries.sh and checks/pi.sh have been asserting two binaries that no release contains. Both were hard failures. checks/pi.sh no longer repeats the expected version either. It reads BLACKBIRD_VERSION out of scripts/install-agent-stack.sh, which is the pin that actually governs the install; the two had already drifted, the check expecting 0.2.0 while the installer pinned 0.3.0. The per-binary probes are replaced by `blackbird doctor`, added in 0.4.0. It verifies the service definition, a real daemon handshake rather than the supervisor's opinion, and the database, and it exits 5 when a check fails and 0 otherwise, so warnings stay advisory. Pins move to Blackbird 0.4.1 and blackbird-pi 0.1.1, both published. Co-Authored-By: Claude Opus 5 (1M context) --- checks/00-binaries.sh | 2 -- checks/pi.sh | 22 ++++++++++++++++++---- scripts/install-agent-stack.sh | 4 ++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/checks/00-binaries.sh b/checks/00-binaries.sh index f1a75a3..8fccfed 100644 --- a/checks/00-binaries.sh +++ b/checks/00-binaries.sh @@ -24,8 +24,6 @@ want_bin sesh "tmux session picker" want_bin claude "Claude Code CLI" want_bin pi "Pi coding agent" want_bin blackbird "durable agent coordination" -want_bin blackbird-claude "durable Claude Code delivery" -want_bin blackbird-pi "durable Pi delivery" want_bin open-websearch "harness-neutral web research" want_bin lstags "ls + Finder tags (cargo install via run_onchange)" diff --git a/checks/pi.sh b/checks/pi.sh index fb4a680..55c589f 100644 --- a/checks/pi.sh +++ b/checks/pi.sh @@ -57,11 +57,25 @@ for skill in blackbird web-research; do done if command -v blackbird >/dev/null 2>&1; then + # The expected version is read from the installer rather than repeated here; + # the two drifted apart once already. bb_version="$(blackbird --version 2>/dev/null | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' | head -1 || true)" - [[ "$bb_version" == "0.2.0" ]] && ok "Blackbird version pinned ($bb_version)" || warn "Blackbird version is ${bb_version:-unknown}; expected 0.2.0" - command -v blackbird-claude >/dev/null 2>&1 && ok "Blackbird Claude companion installed" || fail "blackbird-claude missing" - command -v blackbird-pi >/dev/null 2>&1 && ok "Blackbird Pi companion installed" || fail "blackbird-pi missing" - blackbird status >/dev/null 2>&1 && ok "Blackbird service reachable" || warn "Blackbird service not reachable — run scripts/install-agent-stack.sh" + bb_pin="$(sed -n 's/^BLACKBIRD_VERSION=//p' "$DOTFILES/scripts/install-agent-stack.sh" | head -1)" + if [[ -n "$bb_pin" && "$bb_version" == "$bb_pin" ]]; then + ok "Blackbird matches the installer pin ($bb_version)" + else + warn "Blackbird is ${bb_version:-unknown}; scripts/install-agent-stack.sh pins ${bb_pin:-unknown}" + fi + # blackbird doctor supersedes the per-binary probes: the Go companions stopped + # shipping in v0.3.0, and doctor checks the service definition, a real daemon + # handshake, and the database. It exits 5 when a check fails and 0 otherwise, + # so warnings stay advisory unless --strict is passed. + bb_rc=0; blackbird doctor >/dev/null 2>&1 || bb_rc=$? + if (( bb_rc == 0 )); then + ok "Blackbird doctor reports no failures" + else + fail "Blackbird doctor reports failures — run: blackbird doctor" + fi fi if [[ -d "$HOME/.pi/agent/npm/node_modules" ]]; then diff --git a/scripts/install-agent-stack.sh b/scripts/install-agent-stack.sh index 6e5d8da..57400b7 100755 --- a/scripts/install-agent-stack.sh +++ b/scripts/install-agent-stack.sh @@ -4,7 +4,7 @@ set -euo pipefail PI_VERSION=0.84.1 WEB_VERSION=2.1.11 -BLACKBIRD_VERSION=0.3.0 +BLACKBIRD_VERSION=0.4.1 NPM_PREFIX="${NPM_CONFIG_PREFIX:-$HOME/.npm-global}" if ! command -v npm >/dev/null 2>&1; then @@ -19,7 +19,7 @@ npm install --global --ignore-scripts --prefix "$NPM_PREFIX" \ pi_bin="$NPM_PREFIX/bin/pi" for package in \ - npm:blackbird-pi@0.1.0 \ + npm:blackbird-pi@0.1.1 \ npm:pi-subagents@0.47.1 \ npm:@juicesharp/rpiv-ask-user-question@2.4.0 \ npm:@narumitw/pi-goal@0.51.0 \