From 63d9b12b22edaef1bca08c4ce9560c2e69ec93d8 Mon Sep 17 00:00:00 2001 From: pewdiepie-archdaemon Date: Fri, 19 Jun 2026 00:33:48 +0000 Subject: [PATCH] Cookbook Running: short-circuit polls for Ollama sidecar tasks so status stays running Three different background loops (_reconnectTask reachability poll, _checkServeReachability, _pollBackgroundStatus) each independently flipped Ollama sidecar tasks between running and stopped because the `docker exec ollama-rocm ollama show ` cmd exits cleanly after its verification print, which the loops misread as the serve dying. Added _isOllamaSidecarTask(task) and an early-bail in each of the three loops so the task stays pinned to running once the show-cmd exits 0. Also the tmux-graceful-kill path prepends a `docker exec ollama-rocm ollama stop ` before tearing down the tmux session, so the Ollama-side model load gets unloaded too (was leaving the model resident in the daemon after Stop). --- static/js/cookbookRunning.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/static/js/cookbookRunning.js b/static/js/cookbookRunning.js index 28365d49e..a390e11ad 100644 --- a/static/js/cookbookRunning.js +++ b/static/js/cookbookRunning.js @@ -141,6 +141,13 @@ async function _openDownloadForGgufTask(task) { function _terminalServeDiagnosis(task, outputText) { const out = String(outputText || task?.output || ''); if (!task || task.type !== 'serve' || !['stopped', 'error', 'crashed', 'failed'].includes(task.status) || !out.trim()) return null; + // Suppress the crash diagnosis when the output proves the server + // actually became reachable — e.g. an early `exit 127` from a failed + // build attempt was followed by the shim/Python fallback successfully + // starting Uvicorn. Without this, the user sees a confusing "build + // stopped before the server became reachable" toast while the server + // is right there serving requests. + if (_serveOutputLooksReady(task)) return null; // Pip tasks (Reinstall vLLM, Upgrade torch, etc.) ride on the serve task // type so they get a tmux session + show up in Running tab — but they are // NOT serve invocations. Their output is pip's own; the generic