fix(taskfile): remove build targets for binaries deleted months ago, and make check build (#121)
Removes supervisor:dev, supervisor:build, supervisor:test:smoke, smoke:routing and scripts/smoke-routing.sh -- all pointed at cmd/supervisor (deletedc117634, 2026-05-12) or cmd/routing (iceboxedfb59c39, 2026-07-01). Repoints `build` at hyperguild:build + ingestion:build and adds `build` to `check`, so a task target naming a deleted package fails the gate instead of staying invisible to lint/test/vet. Refs #120. Item 2 of #120 (internal/config has no non-test callers) is deliberately NOT addressed -- #120 stays open for it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Mathias <mthbqv@gmail.com>
This commit was merged in pull request #121.
This commit is contained in:
@@ -1,64 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Boot the routing binary and exercise its four tools against live deps.
|
||||
# Skipped when LITELLM_BASE_URL or BRAIN_URL is unreachable.
|
||||
|
||||
LITELLM_BASE_URL="${LITELLM_BASE_URL:-https://llm-api.d-ma.be}"
|
||||
BRAIN_URL="${BRAIN_URL:-http://koala:30330}"
|
||||
|
||||
if ! curl -sS --max-time 2 "${LITELLM_BASE_URL}/v1/models" >/dev/null 2>&1; then
|
||||
echo "SKIP: LITELLM at ${LITELLM_BASE_URL} unreachable"
|
||||
exit 0
|
||||
fi
|
||||
if ! curl -sS --max-time 2 "${BRAIN_URL}/query" -X POST -d '{"query":"x","k":1}' -H 'Content-Type: application/json' >/dev/null 2>&1; then
|
||||
echo "SKIP: BRAIN at ${BRAIN_URL} unreachable"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PORT=33310
|
||||
BIN=$(mktemp)
|
||||
trap 'rm -f $BIN; pkill -P $$ -f "$BIN" 2>/dev/null || true' EXIT
|
||||
|
||||
go build -o "$BIN" ./cmd/routing
|
||||
|
||||
LITELLM_BASE_URL="$LITELLM_BASE_URL" BRAIN_URL="$BRAIN_URL" \
|
||||
ROUTING_PORT="$PORT" SUPERVISOR_CONFIG_DIR="$(pwd)/config/supervisor" \
|
||||
"$BIN" &
|
||||
|
||||
# Wait for the binary to bind.
|
||||
for _ in $(seq 1 50); do
|
||||
curl -sS "http://127.0.0.1:${PORT}/healthz" >/dev/null 2>&1 && break
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
call_tool() {
|
||||
local tool="$1"
|
||||
local args="$2"
|
||||
curl -sS -X POST "http://127.0.0.1:${PORT}/mcp" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"${tool}\",\"arguments\":${args}}}" \
|
||||
| jq -e '.result // .error' > /dev/null
|
||||
}
|
||||
|
||||
echo "calling tools/list..."
|
||||
curl -sS -X POST "http://127.0.0.1:${PORT}/mcp" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
|
||||
| jq -r '.result.tools | map(.name) | sort | .[]'
|
||||
|
||||
echo "calling each tool..."
|
||||
call_tool review '{"project_root":"/tmp","files":["README.md"],"session_id":"smoke-1"}'
|
||||
call_tool debug '{"project_root":"/tmp","error":"smoke test","session_id":"smoke-1"}'
|
||||
call_tool retrospective '{"session_id":"smoke-1"}'
|
||||
call_tool trainer '{"session_id":"smoke-1"}'
|
||||
|
||||
echo "checking brain has _routing entries..."
|
||||
sleep 2
|
||||
COUNT=$(curl -sS "${BRAIN_URL}/pass-rate?skill=_routing&window=1h" | jq -r '.total // 0')
|
||||
if [ "${COUNT}" -lt 4 ]; then
|
||||
echo "FAIL: expected >=4 _routing entries in last 1h, got ${COUNT}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "PASS: smoke:routing"
|
||||
Reference in New Issue
Block a user