From 820bcc8e4e937560d42b2f9402b229832e54b800 Mon Sep 17 00:00:00 2001 From: "Dolon (Agent)" Date: Fri, 18 Sep 2026 20:10:39 +0000 Subject: [PATCH] checks: cover residency, and prove a short-keep_alive caller is overridden MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 24 asserts forge's runner is permanently resident, not merely loaded at the moment of the check — a cold load is 21-66 s and lands in front of the caller, so "loaded right now" is not the property that matters. 25 is the regression that would otherwise be silent: an explicit finite keep_alive from a caller BEATS forge's OLLAMA_KEEP_ALIVE default, so the router override is the only thing stopping one such caller evicting the 64 GB model for everyone else. The check sends keep_alive:"30s" natively and asserts residency survives it. Both pass on lounge and nidavellir, 25/25. Co-Authored-By: Claude Opus 5 --- scripts/checks.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/checks.sh b/scripts/checks.sh index 8867c01..b2f5d20 100755 --- a/scripts/checks.sh +++ b/scripts/checks.sh @@ -51,3 +51,15 @@ echo "22 ollama /api/pull guard (expect 400) HTTP $(j -XPOST $GOOD/local-strict # Every forge-bound request carries the pinned num_ctx; the runner forge reports # must match it, or callers are thrashing the 64 GB model on every alternation. echo "23 num_ctx pin == runner context ....... HTTP $(j $GOOD/status) $(sed -n 's/.*"num_ctx_pin": *\([0-9null]*\).*"runner_context": *\([0-9null]*\).*/pin=\1 runner=\2/p' /tmp/b)" + +# ---- residency --------------------------------------------------------------- +# A cold load is 21-66 s and lands in front of the caller, so the model must be +# permanently resident, not merely loaded right now. runner_resident=true means +# forge reports "forever"; false means the next idle spell costs a cold load. +echo "24 model is permanently resident ....... HTTP $(j $GOOD/status) $(sed -n 's/.*"keep_alive_pin": *\(-\{0,1\}[0-9null]*\).*"runner_resident": *\([a-z]*\).*/pin=\1 resident=\2/p' /tmp/b)" + +# A caller that sends its own SHORT keep_alive must not be able to evict the model +# for everyone else: the router overrides it. Send 30s natively, then re-read. +j -XPOST $GOOD/local-strict/api/chat -H 'Content-Type: application/json' \ + -d '{"model":"gpt-oss:120b","messages":[{"role":"user","content":"hi"}],"stream":false,"think":false,"keep_alive":"30s"}' >/dev/null +echo "25 short keep_alive caller overridden .. HTTP $(j $GOOD/status) $(sed -n 's/.*"runner_resident": *\([a-z]*\).*/resident=\1 (want true)/p' /tmp/b)"