From 5f6de762e8af358b684ec9655b6cf0e362968c6f Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Sun, 16 Aug 2026 01:50:21 -0500 Subject: [PATCH] justfile: recipe waits require 'state live', covering the seam recipe's own loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit seam-handoff's wait loop had a different byte-shape than the seven already patched, so the sweep missed it; all eight now poll /status for 'state live' — the strongest correct target for these pre-seeded steady-state recipes, closing both the starting window and the storage_ready->serving flip for suites that subscribe immediately. Co-Authored-By: Claude Fable 5 --- justfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/justfile b/justfile index bc05f6c..ad634d5 100644 --- a/justfile +++ b/justfile @@ -66,7 +66,7 @@ process-metrics-contract: --retry-interval=0 --no-verify >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -95,7 +95,7 @@ http-metrics-contract: --retry-interval=0 --segment-cache-max-age=1500ms --no-verify >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -125,7 +125,7 @@ archive-contract: --retry-interval=0 --no-verify >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -160,7 +160,7 @@ plan-config-contract: --retry-interval=0 --no-verify "$@" >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -202,7 +202,7 @@ seam-handoff-contract: --retry-interval=0 --no-verify >"$LOG" 2>&1 & pid=$! for _ in $(seq 1 50); do - curl -sf "http://127.0.0.1:$PORT/healthz" >/dev/null 2>&1 && break + if body=$(curl -sf "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi sleep 0.2 done STREAM_SEAM_PORT=$PORT STREAM_SEAM_SIM_PORT=$SIMPORT \ @@ -233,7 +233,7 @@ cursor-lookback-contract: --retry-interval=0 --no-verify "$@" >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -357,7 +357,7 @@ subscribe-read-batch-contract: --subscribe-read-batch=17 >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done @@ -385,7 +385,7 @@ status-contract: --retry-interval=0 --no-verify >"$LOG" 2>&1 & pid=$! for _ in {1..100}; do - if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && ! grep -qF "state starting" <<<"$body"; then break; fi + if body=$(curl -fsS "http://127.0.0.1:$PORT/status" 2>/dev/null) && grep -qF "state live" <<<"$body"; then break; fi if ! kill -0 "$pid" 2>/dev/null; then cat "$LOG" >&2; exit 1; fi sleep 0.1 done -- 2.51.2