From 6e449b464c89ca85915d1e63ae10371c9d8980c7 Mon Sep 17 00:00:00 2001 From: Mathias Date: Wed, 16 Sep 2026 22:36:49 +0000 Subject: [PATCH] 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 (deleted c117634, 2026-05-12) or cmd/routing (iceboxed fb59c39, 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 Co-authored-by: Mathias --- Procfile | 1 - Taskfile.yml | 35 ++++++---------------- scripts/smoke-routing.sh | 64 ---------------------------------------- 3 files changed, 9 insertions(+), 91 deletions(-) delete mode 100755 scripts/smoke-routing.sh diff --git a/Procfile b/Procfile index 6f14c3e..3b051b5 100644 --- a/Procfile +++ b/Procfile @@ -1,2 +1 @@ ingestion: cd ingestion && INGEST_BRAIN_DIR=../brain INGEST_PORT=3300 INGEST_WATCH_INTERVAL=30 go run ./cmd/server/ -supervisor: SUPERVISOR_CONFIG_DIR=./config/supervisor SUPERVISOR_MODELS_FILE=./config/models.yaml SUPERVISOR_SESSIONS_DIR=./brain/sessions INGEST_BASE_URL=http://localhost:3300 INGEST_SVC_URL=http://localhost:3300 go run ./cmd/supervisor/ diff --git a/Taskfile.yml b/Taskfile.yml index a527acb..c83bd95 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -21,7 +21,7 @@ tasks: # ── Development ──────────────────────────────────────────────────────────── start: - desc: Start ingestion + supervisor (requires goreman — go install github.com/mattn/goreman@latest) + desc: Start ingestion (requires goreman — go install github.com/mattn/goreman@latest) cmds: - goreman start @@ -32,11 +32,6 @@ tasks: - lsof -ti:3200 | xargs kill -9 2>/dev/null || true - echo "hyperguild stopped" - supervisor:dev: - desc: Run supervisor MCP server (development) - cmds: - - go run ./cmd/supervisor - hyperguild:dev: desc: Run hyperguild CLI from source (e.g. task hyperguild:dev -- tier) cmds: @@ -67,14 +62,9 @@ tasks: build: desc: Build all binaries cmds: - - task: supervisor:build + - task: hyperguild:build - task: ingestion:build - supervisor:build: - desc: Build supervisor binary - cmds: - - go build -trimpath -ldflags="-s -w -X main.version={{.VERSION}}" -o bin/supervisor ./cmd/supervisor - ingestion:build: desc: Build ingestion server binary dir: ingestion @@ -84,7 +74,7 @@ tasks: # ── Quality ──────────────────────────────────────────────────────────────── check: - desc: Run all checks (context freshness + lint + test + vet) across all modules + desc: Run all checks (context freshness + lint + test + vet + build) across all modules cmds: # Context sync is skipped under CI, matching dma-cli, gitea-mcp, and the # rest of the estate. It is not a preference: context-sync.sh walks UP @@ -120,6 +110,12 @@ tasks: - task: lint - task: test - task: vet + # `build` is in the gate deliberately (hyperguild#120). vet and test walk + # ./... , which enumerates the packages that EXIST — so a build target + # naming a DELETED package is invisible to both. `task build` pointed at + # ./cmd/supervisor for months after that directory was removed, and CI + # stayed green the whole time because nothing in check ever built. + - task: build - task: security:gitleaks # ── Security ───────────────────────────────────────────── @@ -173,19 +169,6 @@ tasks: - govulncheck ./... || true - cd ingestion && go vet ./... - supervisor:test:smoke: - desc: Smoke test supervisor via MCP (requires start running) - cmds: - - | - curl -s -X POST http://localhost:${SUPERVISOR_PORT:-3200}/mcp \ - -H "Content-Type: application/json" \ - -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | jq . - - smoke:routing: - desc: Boot the routing pod against live LiteLLM + brain and verify _routing logs land - cmds: - - bash scripts/smoke-routing.sh - # ── Git / Release ────────────────────────────────────────────────────────── tag: diff --git a/scripts/smoke-routing.sh b/scripts/smoke-routing.sh deleted file mode 100755 index b610f18..0000000 --- a/scripts/smoke-routing.sh +++ /dev/null @@ -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"