diff --git a/tests/deployment_scoping.bats b/tests/deployment_scoping.bats index b8fea0f..7028dbc 100644 --- a/tests/deployment_scoping.bats +++ b/tests/deployment_scoping.bats @@ -198,12 +198,18 @@ REMOTE_DEPLOY="$REPO_ROOT/scripts/deploy-remote.sh" } @test "remote runner recognizes a pending service at the same revision" { + # Contract superseded 2026-09-17: recognition used to mean "retry and + # hard-fail at the dispatcher" (exit 2), which let a retired service's + # stale pending entry (frank-default-sightsound) block every deploy + # before the e2e gate. Recognition now means: name the entry, prune it + # to the trash, and keep the run going. local state_dir="$(mktemp -d)" printf 'revision=%s\nstatus=pending\n' "$(git rev-parse HEAD)" > "$state_dir/unknown-service" - run env DEPLOY_STATE_DIR="$state_dir" REMOTE_DIR="$REPO_ROOT" \ + run env DEPLOY_STATE_DIR="$state_dir" REMOTE_DIR="$REPO_ROOT" HOME="$(mktemp -d)" \ bash "$REMOTE_DEPLOY" dankclaw "$(git rev-parse HEAD)" --pending - [ "$status" -eq 2 ] - [[ "$output" == *"unknown-service"* || "$output" == *"not deployed"* ]] + [ "$status" -eq 0 ] + [[ "$output" == *"unknown-service"* ]] + [ ! -e "$state_dir/unknown-service" ] } @test "top-level deployer delegates to the service-scoped remote runner" {