Issue #26 reported a 27B engine dying about once a day with "CUDA error:
operation not permitted", systemd starting it again 17 s later, and the
fear that the restart lands in the window sglang#40948 blames for a DGX
Spark frozen 9.5 h. Measured on the reference box: a crashed engine's
memory is back 2 to 5 s after it dies, about 15 s before the restart.
engine-preflight.sh runs before every engine (27B, flash, image, video)
and refuses a start while what is left of an engine holds GPU memory,
while the driver holds more than 16 GiB that no process accounts for,
or while nvidia-smi does not answer; systemd tries again every 15 s.
The proxy (v6.28) holds a request while its engine comes back, through
a restart's stop half too, up to 1200 s: a streamed one gets its 200
and the keepalives at once. On a 503, opencode gave up after 151 s and
Claude Code after 325 s; both wait on a held stream (900 s measured).
An engine's mid-stream cut is passed on as a cut: the error event sent
in its place made Claude Code retry without a stream, give up on it
after about 330 s, and end with no answer.
The cockpit restarts an SGLang server left without its scheduler, once
it has been so for 2 min (COCKPIT_ZOMBIE_RESTART), tells one crash of a
serving lane from a boot that keeps dying, and says why a start waits
or was refused.
Tested end to end on the reference box: the flash lane's server sent
SIGQUIT under the real opencode and Claude Code, twice. The runs found
four faults the unit tests could not (a zombie probe docker refused, a
watched boot read as a boot again, a restart that ended the waits, the
cut's error event), each fixed with a test that fails without the fix.
After 632 to 1,068 s held, both clients got their whole answers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The run after every first install restarted the engine: "why:
qwen38-sglang.service changed after qwen38-sglang.service started". The
installer writes the unit, then restarts the engine in the same second,
and systemd gives the start in whole seconds; compared with the file's
fraction (22:42:23.162 against 22:42:23), the write read as a change made
after the start. On the reference box, emptied and installed from nothing
on 2026-09-30, that second run cost an 8-minute boot, a new pool, new
opencode limits and a restart of opencode-web, all for nothing.
Both sides are whole seconds now, as install.sh's own stale_since compares
them for the proxy, the cockpit and opencode-web. A test pins the second of
the start (fails on the previous revision) and one the second after.
The last three strings that called the Agent view a tab (oc-fit-limits.py,
the relay's sign-in page, the cockpit's autofit event) say view.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- I18: the proxy, the cockpit and opencode-web restart only when they are not
running, when the run changed what they run, or when they started before a
file they read changed (stale_since); units, the proxy copy and the
generated opencode config are written only when their content changes.
The proxy still follows an engine restart. On 1m, step 7 keeps a fitted
pair under the table's bounds (oc-merge-limits.py --keep-lower, and the
generator), instead of writing the bounds for the end fit to undo: 49
opencode-web and 36 cockpit starts on 2026-09-23, 79 config backups
- I13: engine-inputs.py resolves a branch revision through refs/ and counts
the ref, and reads the image wherever it is named (a moving tag); the flash
draft vocabulary is built for MODEL_REV=main
- I14: an explicit CONTEXT_MODE=native writes the native opencode limits
- I15: an oc at ~/.local/bin/oc that is not ours is left alone; the command
offered instead carries OPENCODE_CONFIG (I35)
- I16/I17: the summary sends clients to the proxy; --no-service names what
./uninstall.sh --list shows, the key-reading provider included
- tests: the smoke extraction ends at its own last check; the abort test's
fake engine registers a request before its headers, as SGLang does (an
abort landed in that gap once in a CI run)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every ./install.sh restarted the engine, a full boot per update (7 to 8 min
on the 27B, 12 on flash) even when the update touched only the cockpit, the
proxy or opencode. engine-inputs.py finds what the engine reads at start from
its unit (unit, drop-ins, the flash launcher, config files named directly or
through /out, checkpoint configs, image IDs) and tells whether the running
engine already has it. Step 9 keeps the engine when it does, the run changed
none of it by content, and it answers /health; the real smoke test still
runs. RESTART_ENGINE=1 forces a restart, and every restart says why.
The unit, the flash launcher and the patched template are now written only
when their content changes: an identical rewrite dated them after the
engine's start and made every second run restart it.
Reference box: a plain ./install.sh on the serving 27B, 28 s twice in a row,
engine start time unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>