From 993b8fb05f11e5738811524693bbf7fd263c3022 Mon Sep 17 00:00:00 2001 From: t Date: Sun, 15 Nov 2026 02:20:50 -0400 Subject: [PATCH 1/2] window-run: the restart probe reads readiness, not the model list /v1/models is a static registry listing (app/serve.cpp:1909): it answers 200 from the moment the process binds, so a window reported ':8090=200 rc=0' while the weights were still loading and every PR-agent check still failed. /v1/health is 503 until ready and 503 when a child is dead (app/serve.cpp:1892); measured 2026-11-15, /v1/health went 503 -> 200 across a real restart while /v1/models was already 200. The engine's own child poll uses /health first for the same reason (app/serve.cpp:694). Self-test gains two arms that read the shipped script, because no offline arm can reach a device: the probe must be /v1/health and must not be /v1/models. The patterns carry cu[r]l so the arm's own text cannot satisfy them. --- scripts/window-run.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/window-run.sh b/scripts/window-run.sh index 82af417ee..95fcc127d 100755 --- a/scripts/window-run.sh +++ b/scripts/window-run.sh @@ -69,6 +69,15 @@ self_test() { local fail=0 chk() { local label=$1 got=$2 want=$3; if [ "$got" = "$want" ]; then echo "ok $label"; else echo "FAIL $label (got $got, want $want)"; fail=$((fail+1)); fi; } mkdir -p "${WR_TMPDIR:-$HOME/.cache}"; tmp=$(mktemp -d "${WR_TMPDIR:-$HOME/.cache}/window-run-test.XXXXXX"); trap 'rm -rf "$tmp"' RETURN + # 0. THE RESTART PROBE READS READINESS, NOT THE MODEL LIST. No device is touched here, so this arm reads the + # artifact the gate ships: /v1/models is a static registry listing that answers 200 while the weights load + # (app/serve.cpp:1909), so a window would self-report a live LLM that cannot answer yet (measured 2026-11-15: + # /v1/health went 503 -> 200 across a real restart while /v1/models was already 200). + local me; me=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/${BASH_SOURCE[0]##*/} # WR_SELF is exported later, not yet here + # The patterns carry cu[r]l rather than curl so that this arm's OWN text cannot satisfy them: a"/v1/health" count + # that includes the line asserting it is an arm that can pass for the wrong reason. + chk "the restart probe is /v1/health" "$(grep -c 'cu[r]l.*8090/v1/health' "$me")" 1 + chk " ... and never the static model list" "$(grep -c 'cu[r]l.*8090/v1/models' "$me")" 0 # 1. a duration outside 1..15 is refused, with the reason out=$(WINDOWS_LOG=$tmp/w.log "$0" --dry-run -m 0 -l x -c true 2>&1); rc=$? chk "a zero-minute window is refused" "$rc" 2 @@ -251,7 +260,13 @@ restore() { if [ -e "$WR_STOPPED" ]; then systemctl --user start coder-llm 2>/dev/null for i in $(seq 1 40); do - code=$(curl -s -m 2 -o /dev/null -w '%{http_code}' http://127.0.0.1:8090/v1/models 2>/dev/null || true) + # /v1/health, NOT /v1/models: /v1/models is a static registry listing (app/serve.cpp:1909) that + # answers 200 from the moment the process binds, so it reports success while the weights are still + # loading and every PR-agent check is still failing. /v1/health is 503 until `ready` and 503 when a + # child is dead (app/serve.cpp:1892). Measured 2026-11-15: /v1/health went 503 -> 200 across a real + # restart while /v1/models was already 200. The engine's own child poll uses /health first for the + # same reason (app/serve.cpp:694). + code=$(curl -s -m 2 -o /dev/null -w '%{http_code}' http://127.0.0.1:8090/v1/health 2>/dev/null || true) [ "$code" = 200 ] && break; sleep 3 done rc=$(final_rc "$code" "$rc") From 37c0dedc2eaf9a9da288e43f3bcb7e257904b591 Mon Sep 17 00:00:00 2001 From: t Date: Sun, 15 Nov 2026 02:21:02 -0400 Subject: [PATCH 2/2] window-run: a missing space in the arm's comment --- scripts/window-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/window-run.sh b/scripts/window-run.sh index 95fcc127d..dcb7ab2df 100755 --- a/scripts/window-run.sh +++ b/scripts/window-run.sh @@ -74,7 +74,7 @@ self_test() { # (app/serve.cpp:1909), so a window would self-report a live LLM that cannot answer yet (measured 2026-11-15: # /v1/health went 503 -> 200 across a real restart while /v1/models was already 200). local me; me=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/${BASH_SOURCE[0]##*/} # WR_SELF is exported later, not yet here - # The patterns carry cu[r]l rather than curl so that this arm's OWN text cannot satisfy them: a"/v1/health" count + # The patterns carry cu[r]l rather than curl so that this arm's OWN text cannot satisfy them: a "/v1/health" count # that includes the line asserting it is an arm that can pass for the wrong reason. chk "the restart probe is /v1/health" "$(grep -c 'cu[r]l.*8090/v1/health' "$me")" 1 chk " ... and never the static model list" "$(grep -c 'cu[r]l.*8090/v1/models' "$me")" 0