From 1fd98cab3f44ad6d7026072ada3c33bcd4daf48d Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 21 Oct 2026 14:59:44 -0700 Subject: [PATCH] fix(deploy): blackbox-exporter was gated out of its own deploy path PR #69 wired the copier, planner entry and health gate but missed the three dispatch gates: the client valid_service, the remote service_is_allowed, and deploy_service's case list. The client gate rejected --service blackbox-exporter outright; even past it the dispatcher's catch-all hard-fails on dankclaw (no compose since 2026-09-16). New seam pins the class: every dankclaw service the remote gate allows must carry a deploy_service case - proven red by planting a gated, undispatched name. --- scripts/deploy-remote.sh | 4 ++-- scripts/deploy.sh | 2 +- tests/deployment_flow.bats | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/scripts/deploy-remote.sh b/scripts/deploy-remote.sh index 560b765..24ca136 100755 --- a/scripts/deploy-remote.sh +++ b/scripts/deploy-remote.sh @@ -86,7 +86,7 @@ service_is_allowed() { dankclaw:open-webui|dankclaw:gitea-postgres|dankclaw:gitea-server|\ dankclaw:comfyui|dankclaw:hermes|\ dankclaw:hermes-dashboard|dankclaw:hermes-webui|dankclaw:prometheus|dankclaw:grafana|\ - dankclaw:loki|dankclaw:alloy|dankclaw:node-exporter|dankclaw:cadvisor|dankclaw:gpu-exporter|dankclaw:alertmanager|\ + dankclaw:loki|dankclaw:alloy|dankclaw:node-exporter|dankclaw:cadvisor|dankclaw:gpu-exporter|dankclaw:alertmanager|dankclaw:blackbox-exporter|\ dankclaw:authentik-postgres|dankclaw:authentik-server|\ dankclaw:authentik-worker|dankclaw:authentik-outpost|dankclaw:authentik-outpost-ldap|dankclaw:anubis|\ dankclaw:caddy|dankclaw:homepage|dankclaw:seerr|dankclaw:marreta|\ @@ -2086,7 +2086,7 @@ deploy_service() { plex) deploy_plex ;; tautulli) deploy_tautulli ;; alloy) deploy_alloy ;; - prometheus|grafana|loki|node-exporter|cadvisor|alertmanager) deploy_observability "$service" ;; + prometheus|grafana|loki|node-exporter|cadvisor|alertmanager|blackbox-exporter) deploy_observability "$service" ;; gpu-exporter) deploy_gpu_exporter ;; comfyui) deploy_comfyui ;; *) deploy_compose_service "$service" ;; diff --git a/scripts/deploy.sh b/scripts/deploy.sh index b9f77db..1ed4775 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -140,7 +140,7 @@ valid_service() { dankclaw:gitea-server|dankclaw:homepage|\ dankclaw:comfyui|dankclaw:hermes|dankclaw:hermes-dashboard|\ dankclaw:hermes-webui|dankclaw:prometheus|dankclaw:grafana|dankclaw:loki|dankclaw:alloy|\ - dankclaw:alertmanager|\ + dankclaw:alertmanager|dankclaw:blackbox-exporter|\ dankclaw:node-exporter|dankclaw:cadvisor|dankclaw:gpu-exporter|dankclaw:authentik-postgres|dankclaw:authentik-server|\ dankclaw:authentik-worker|dankclaw:authentik-outpost|dankclaw:authentik-outpost-ldap|dankclaw:anubis|dankclaw:seerr|\ dankclaw:open-notebook|\ diff --git a/tests/deployment_flow.bats b/tests/deployment_flow.bats index 0caf284..3e8f319 100644 --- a/tests/deployment_flow.bats +++ b/tests/deployment_flow.bats @@ -150,3 +150,23 @@ load helpers grep -q "$pair" "$BATS_TEST_TMPDIR/cli" || { echo "client gate missing $pair"; return 1; } done } + +@test "every gated dankclaw service is dispatched" { + # A service can clear both allowlists and still die inside the deployer: + # dankclaw has no compose file, and deploy_compose_service (the case + # catch-all) hard-fails with "no quadlet handler" since 2026-09-16. So + # every name the remote gate allows for dankclaw MUST be named by a + # deploy_service pattern — blackbox-exporter (2026-10-21) shipped with + # both gates and the health gate wired but no dispatch case, and only + # the deploy attempt found it. + run env OUT="$BATS_TEST_TMPDIR" bash -c ' + grep -oE "dankclaw:[a-z0-9-]+" \ + <(sed -n "/^service_is_allowed()/,/^}/p" "$1/scripts/deploy-remote.sh") \ + | cut -d: -f2 | sort -u > "$OUT/gated" + sed -n "/^deploy_service()/,/^}/p" "$1/scripts/deploy-remote.sh" \ + | grep -oE "^ +[a-z][a-z0-9|-]*\)" | tr -d " )" | tr "|" "\n" \ + | sort -u > "$OUT/dispatched" + comm -23 "$OUT/gated" "$OUT/dispatched" + ' _ "$REPO_ROOT" + [ -z "$output" ] || { echo "gated dankclaw services with no deploy_service case:"; echo "$output"; return 1; } +} -- 2.54.0