From 844320dec29dc16a28bc95c9f5de8ff9883776b1 Mon Sep 17 00:00:00 2001 From: Noah Gift Date: Wed, 21 Oct 2026 15:21:18 +0200 Subject: [PATCH] fix(ci): remove check_harness_server_cleanup.sh + its 817 explicit command; keep #5806's launcher fixes (Refs #5806) Operator 2026-10-21 13:20Z: partial revert of #5806. The guard needs python3, which the sovereign-ci container lacks (#5844 shard 5), and its apr-stub row races (#5854). Re-land: bash (bashrs) or Rust, no python3, no skip-if-missing. Co-Authored-By: Claude Sonnet 5.5 --- .../817-harness-server-cleanup.cmd | 1 - scripts/check_harness_server_cleanup.sh | 104 ------------------ 2 files changed, 105 deletions(-) delete mode 100644 ci/explicit-test-commands.d/817-harness-server-cleanup.cmd delete mode 100755 scripts/check_harness_server_cleanup.sh diff --git a/ci/explicit-test-commands.d/817-harness-server-cleanup.cmd b/ci/explicit-test-commands.d/817-harness-server-cleanup.cmd deleted file mode 100644 index 18ede22b41..0000000000 --- a/ci/explicit-test-commands.d/817-harness-server-cleanup.cmd +++ /dev/null @@ -1 +0,0 @@ -bash scripts/check_harness_server_cleanup.sh diff --git a/scripts/check_harness_server_cleanup.sh b/scripts/check_harness_server_cleanup.sh deleted file mode 100755 index b219c29624..0000000000 --- a/scripts/check_harness_server_cleanup.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env bash -# check_harness_server_cleanup.sh: a CRUX harness that dies leaves no fixture server behind. -# infra-66 found stub_server.py and crux_fake_serve.py servers 2-3 days old (ppid 1) on the intel -# clean-room runners. bash runs its EXIT trap on TERM but nothing runs on SIGKILL (a cancelled job), so -# each launcher starts a watcher per server (guard_server). Behavioural rows; every mutant strips the -# mechanism from a copy of the launcher and must leak (a mutant that changes nothing is a BROKE). -# F guard_server itself, extracted from each of the 3 launchers: harness KILLed -> server gone -# S the call sites: each launcher calls guard_server on every server it starts (mutant: call removed) -# R the real harness run, KILLed: check_crux_serve_code (fake serve) and check_crux_ollama_in_lock -# (ollama stub, and the apr stub that dogfood execs inside a child) -# TERM is not a row: bash runs the EXIT trap on TERM with no trap of ours, so there is no code to prove. -# INT is not driven: a background job of a non-interactive shell starts with SIGINT ignored. -# Exit: 0 every row behaved · 1 a row broke · 2 ENV. -set -uo pipefail -case "${1:-}" in -h|--help) printf 'usage: bash scripts/check_harness_server_cleanup.sh (no arguments)\n'; exit 0 ;; esac -ROOT=$(cd "$(dirname "$0")/.." && pwd) || exit 2 -for t in python3 flock curl pgrep; do command -v "$t" > /dev/null 2>&1 || { printf 'check_harness_server_cleanup: ENV - %s missing\n' "$t" >&2; exit 2; }; done -T=$(mktemp -d) || exit 2 -trap 'rm -rf -- "${T:?}"' EXIT -FAIL=0 -LAUNCHERS="check_crux_serve_code check_crux_ollama_in_lock crux_inference_dogfood" -ok() { printf ' ok %s\n' "$1"; } -broke() { printf ' BROKE %s\n' "$1"; FAIL=$((FAIL + 1)); } -# mutant : a copy of that must differ; ROOT is pinned to the real tree -mutant() { - local src="$1" out="$2"; shift 2 - sed -e "$@" -e "s|^ROOT=.*|ROOT=\"$ROOT\"|" "$src" > "$out" - if cmp -s "$src" "$out"; then broke "mutant of $(basename "$src") changed nothing (vacuous)"; return 1; fi -} -# gone : wait up to 20 s for it to exit; prints gone|leaked and reaps a leak -# descendants : every live descendant, so a row never picks another session's server -descendants() { local c; for c in $(pgrep -P "$1" 2> /dev/null); do echo "$c"; descendants "$c"; done; } -# cmdl : the cmdline with NULs as spaces (read into a variable, so no pipe feeds a grep -q) -cmdl() { { tr "\0" " " < "/proc/$1/cmdline"; } 2> /dev/null; } -# reap : KILL what is left of a row's own fixture servers (checked by cmdline, so a recycled pid is spared) -reap() { local p c; for p in "$@"; do c=$(cmdl "$p"); grep -aqE "stub_server.py|crux_fake_serve|^sleep 300" <<< "$c" && kill -KILL "$p" 2> /dev/null; done; return 0; } -gone() { local i; for i in $(seq 1 100); do kill -0 "$1" 2> /dev/null || { echo gone; return; }; sleep 0.2; done; kill -KILL "$1" 2> /dev/null; echo leaked; } -verdict() { #