fix(deploy): client allowlist was missing cadvisor, gpu-exporter, prowlarr
deploy.sh's valid_service and deploy-remote.sh's service_is_allowed are two gates for the same door, and they drifted: the remote gate gained cadvisor (2026-10-20) and gpu-exporter (2026-10-21) while the client gate never did, so `--service cadvisor|gpu-exporter` died with "is not deployed on <target>" at the client — the first-ever deploy of a new service is exactly the case that needs the client gate to know it. dankserver:prowlarr (planner can emit it for dankserver) was remote-only too. Adds the four missing pairs to the client gate and a deployment_flow contract test that diffs the two extracted lists per target — the test the cadvisor PR should have carried. searxng-network stays the one sanctioned client-only exception (network unit, no remote handler), documented inline.
This commit is contained in:
1 parent
656d9567d5
commit
0367244d2a
2 files changed
+30
-3
No files matched your search
@@ -125,3 +125,28 @@ load helpers
|
||||
[ ! -e "$sandbox/frank-default-sightsound" ]
|
||||
[ -e "$BATS_TEST_TMPDIR/.AGENTTRASH/$(date +%Y%m%d)-retired-deploy-state/frank-default-sightsound" ]
|
||||
}
|
||||
|
||||
@test "the client and remote allowlists agree per target" {
|
||||
# Two gates guard `deploy.sh --service X`: the client's valid_service and
|
||||
# the remote runner's service_is_allowed. When only one side gained a
|
||||
# service the other answered "is not deployed on <target>" and the only
|
||||
# repair path was a fleet-wide drain — cadvisor and gpu-exporter both fell
|
||||
# through this crack within a day of each other. The lists MUST agree;
|
||||
# searxng-network is the one sanctioned exception (client-only network
|
||||
# unit, no remote dispatch handler).
|
||||
run env OUT="$BATS_TEST_TMPDIR" bash -c '
|
||||
grep -oE "dank(claw|server):[a-z0-9-]+" \
|
||||
<(sed -n "/^valid_service()/,/^}/p" "$1/scripts/deploy.sh") \
|
||||
| grep -v "dankclaw:searxng-network" | sort -u > "$OUT/cli"
|
||||
grep -oE "dank(claw|server):[a-z0-9-]+" \
|
||||
<(sed -n "/^service_is_allowed()/,/^}/p" "$1/scripts/deploy-remote.sh") \
|
||||
| sort -u > "$OUT/rem"
|
||||
diff "$OUT/cli" "$OUT/rem"
|
||||
' _ "$REPO_ROOT"
|
||||
[ "$status" -eq 0 ] || { echo "deploy.sh vs deploy-remote.sh allowlist drift:"; echo "$output"; return 1; }
|
||||
# Drift aside, the gate must actually know the host-process exporters —
|
||||
# their first-ever deploy has to pass the client gate.
|
||||
for pair in dankclaw:cadvisor dankclaw:gpu-exporter dankserver:cadvisor dankserver:gpu-exporter; do
|
||||
grep -q "$pair" "$BATS_TEST_TMPDIR/cli" || { echo "client gate missing $pair"; return 1; }
|
||||
done
|
||||
}
|
||||
Reference in new issue
Block a user