--api-key "$(cat .../api-key)" put the key in the argv of the docker client and of the server, readable by any local user in /proc. The units, the flash launcher and run.sh pass --config /out/engine-secrets.yaml instead (the parse checked in both serving images), written from the api-key file by engine-secrets.sh before every start (ExecStartPre, the launcher, run.sh) and only when its content changes, so a hand-changed key still reaches the next start and an unchanged one restarts nothing. install.sh installs the helper at step 6; the CI flash gate, SECURITY.md and the uninstall listing follow. Also: a test's fake subprocess.run leaked into every later test of the process; it is put back. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
247 KiB
Changelog
v1.18.7 (2026-09-24): a full review of v1.18.6, and the defects it found fixed with a test each
A line-by-line review of the whole repo at v1.18.6 (code, templates, tests, CI and docs) found these, and each fix below comes with a test that fails on v1.18.6 and passes here, checked by running it against both.
The cockpit read an unlimited request body before any login. Content-Length: -1 passed
the size cap (-1 > cap is false) and rfile.read(-1) read until the client hung up: 256 MiB
sent with no session took the process from 22 to 281 MiB on the reference box, which serves
the cockpit on 0.0.0.0, and running out of unified memory is a power cycle there. A length
that is not plain digits is now a 400 before anything is read, and a value int() refused
no longer drops the connection without an answer.
Proxy v6.24: the per-client identity wall covers every route. It looked at POST requests
under /v1/ only, while the proxy attached the engine's own key to everything it relayed, so
with no key at all GET /server_info (which carries the engine key in clear), /generate,
/flush_cache and /abort_request reached the engine as the engine. Every route and method
but /health now needs a listed key, a path still escaped after one decode is refused (SGLang
decodes again before it routes), relayed /server_info answers lose the key fields in both
modes, and an unreadable keys file says so. docs/clients.md installed that file owned by
root, which the proxy (it runs as the user) cannot read, and put the engine key on an
Environment= line systemctl show prints to anyone: both commands are fixed.
One engine at a time, for real. The image unit had Conflicts= and no After=, and
Conflicts= orders nothing: the box's journal shows the image lane and the 27B running side by
side for 5, 6.7 and 60 s on 2026-09-23. With the text units in After=, systemd finishes the
stop before the start, both ways (measured with two throwaway units on the box's systemd 255:
3.0 s of overlap without, 0.02 s after the stop with). The two text units had no Conflicts=
at all, not even with each other: both enabled meant both started at boot, and only the scripts
kept a switch from starting one beside the other. Each now conflicts with every other lane and
is ordered after it. And a text unit that is failed or inactive while its container still runs (a stop past its timeout) is now an orphan, busy for
the gate that refuses a second engine, instead of a "failed" that let the other lane start.
The cockpit's generation canary never ran. Its own /health probe, a one-token
generation every 30 s in these builds, counted as client activity, and the canary waits for a
quiet minute: 0 canaries in the reference box's audit log. The probe's prefill line is now
recognised and ignored, which also stops it writing its idle 0.00 over the pool guard's last
real reading.
A fresh one-liner died at step 8 on DGX OS. sudo -n never prompts, and nothing before
step 8 called sudo, so a box where sudo wants a password stopped there after the downloads.
sudo is now asked for at the end of step 1, before any pull, and renewed at step 8 with a
prompt when the ticket expired meanwhile; without a terminal both fail at once and name the fix.
Two installer conversions went wrong on a flash box. CONTEXT_MODE=1m ./install.sh got
past its refusal (it read the lane before the convergence moved it to flash) and patched YaRN
into the flash checkpoint's config; it is refused once the lane is final. And a plain re-run
printed "UNIT_PATH: unbound variable" and put the engine back on 127.0.0.1 over the box's own
bind, which lives in the flash launcher: it is read from there.
switch-model.sh downloads into the cache the engine mounts. It took HF_CACHE from the
environment or the default, so on a box installed with HF_CACHE=/data/hf the cockpit's
Switch fetched and patched into ~/.cache/huggingface while the unit kept mounting
/data/hf, and the next start found no checkpoint. It reads the mount back, as install.sh does.
Removing the image lane removes only the image lane. Both uninstall paths ran rm -rf on
the whole IMAGE_LANE_DIR; a lane installed at IMAGE_LANE_DIR=/mnt/data took everything else
in /mnt/data with it. They remove venv/ and sglang/, and the directory once it is empty.
opencode's limits fit the engine's window, not just its pool. SGLang refuses any request
whose input + max_tokens passes its window, opencode asks for max_tokens = limit.output, and
the prompt it sends reaches its compaction point plus one agent step (read in the 1.18.32
binary and checked live). On a 262,144 window the flash pair 225,000/32,000 and the native pair
194,048/64,000 fitted a prompt of exactly context and not that one, and oc-fit-limits.py,
which only knew the pool, wrote 225,000/116,000 on a big flash pool, refused from a 146,144-token
prompt on. The table is now 205,000/32,000 (flash) and 173,000/64,000 (27B native), the fit
holds the window and on a native window never goes past the lane's pair, and the cockpit's
verdict and autofit use the same rule. A flash install on an FP8 box also gave its 27B entry the
NVFP4 1M pair: that entry is read from the table now. The collector that reports all this had
lost its @guard to a function inserted above it, so one malformed opencode.json stopped a
whole tier of the cockpit's sampler: it is back where it belongs.
Setup's "Fit the limits to this engine" button had no click handler since 5d08667, while
the banner sent people to it. A test now asks app.js for a handler of every action button
outside the action bar.
bench-agent.py printed its TTFT slope 1,000 times too small (seconds per 1k shown as ms),
so a cache that is never hit read as one reused. It also prints, next to it, the bound the
loop's own TTFT spread sets on that figure: on the reference box a 4-turn run grew by 98 tokens
and read -115 ms, all of it jitter, and the default 8-turn run read -2,704 ms because one turn
took 1.68 s against 0.23 s for the others. The figures published from it are replaced by the
bound the measured TTFT ranges set.
A caller that leaves a non-streamed answer stops its generation (proxy v6.25). The proxy waited inside the upstream call for the whole answer, so it never saw that caller go and kept the upstream open: the engine worked to the end for nobody, then got an abort that found nothing left to abort. Measured on the reference box, a 69k-token prompt whose caller left after 5 s was prefilled and decoded for 53.6 s more. The caller's socket is watched during that wait now, and when it goes the upstream is ended: SGLang checks its own HTTP client every 4 s for a non-streamed request and drops it, and the same prefill stopped 4.0 s after the caller left. A request that asks for a stream is left to the relay, which aborts before it closes. A non-streamed body the engine ended early was also relayed as complete (the proxy re-frames it as chunked and wrote the final chunk anyway): the client now sees the cut.
A Claude Code session with screenshots is no longer refused as too long. The proxy
counted an Anthropic body by flattening it into OpenAI messages for /tokenize, which sent
no tools and turned every tool_result into JSON text, base64 included, and Claude Code puts
the screenshots it reads in tool_result blocks. On the reference box, five screenshots
(2.85 MB) were counted 2,044,251 tokens and refused with "the prompt is too long for this
lane", and so was every later request carrying them; the engine serves the same request as
28,463. The proxy now asks the
engine's own /v1/messages/count_tokens, which converts the body the way a generation does,
tools included (8 tools: 2,709 counted, 2,709 served, 422 before), and it still prices each
image from its header, wherever it sits, since that route counts an image as its placeholder.
Three smaller proxy defects. A raw control or non-ASCII byte in a query string reached
http.client, which raised, and the caller got an empty reply while the journal said it had
vanished: it is a 400 now. The proxy logged each dropped tool pattern and each moved
reasoning_effort once, by remembering the values themselves for the life of the process,
and printed the effort whole: five 20 MB values took it from 22 to 346 MiB, with a
20-million-character journal line each. It remembers a digest now, in bounded memory, and
prints 40 characters. And with the identity wall on, the label a client is known by was
added after the line that opens its request, so the cockpit's feed left every such request
"in flight", then "no end logged": the first line carries it too, as one word, and the feed
reads it.
The Zombie guard panel shows the proxy that runs. It looked for a banner of the shape
v6.14 on :30001, and the banner names its address since the proxy learned PROXY_BIND
(v6.24 on 0.0.0.0:30001): on the reference box it showed v6.20, the last banner of the old
shape, while v6.24 ran, and a box installed since would show "no banner". Its warning for a
proxy too old to abort also compared versions as floats, so v6.2 to v6.9 passed for v6.14 or
later; the versions are compared part by part now.
The cockpit's panels no longer freeze. Each tier of its sampler is one thread, and it
ended at the first exception of any of its collectors; the jobs collector could raise
whenever a job started or ended under it (22 times in 1.3 s under a churn test), and the
tier it sits in, every second, is the one that carries the memory floor's abort. That tier
then stayed frozen until the cockpit restarted. A collector's exception is now its own
panel's error, and the jobs table is read and changed under one lock. And /api/state
wrote its answer to the socket while holding the lock every sampler publishes under, so a
reader that stopped mid-answer (a phone losing its network) held them all as long as TCP
retries, about 15 minutes: the answer is serialised under the lock and written outside it,
as the event stream already did.
A job that overruns its timeout is stopped, children included. The deadline was checked
only when the job printed a line, so a silent job never timed out and kept the one job lock;
and at the deadline only the job's own process was killed, so a switch's download container
went on under a job that said "failed", with the lock free for a second switch. Jobs run in
their own process group, the deadline no longer waits for output, and the group gets a TERM,
then a KILL. switch-model.sh runs its download container with --init: without it,
measured on the reference box, the container outlived the TERM and a KILL of its docker
client, since python3 as PID 1 ignores a TERM it has no handler for.
Two defects of the Agent tab. An answer opencode cut short (a restart mid-answer) left
the browser waiting for the rest on one of its six connections to the relay, which had
forwarded the length and kept the connection: it is closed now, and a cut HTML document is
a 502 rather than a page that looks whole. And install.sh re-runs
dashboard/install-agent.sh at every update, which put opencode's port and the relay's
port and address back on their defaults and gave the service the caller's PATH: a relay on
its own address went dark after an update on a box without tailscale. What is installed is
read back, and the environment still wins.
The installer's disk check counts what is left to download, on the disk it lands on.
huggingface_hub creates a checkpoint's snapshot folder before the first byte of its first
file, and install.sh took the folder for a cached checkpoint: its need dropped from 180 GB
to 10, so a flash download interrupted at 74 GB of 124 was resumed against 10. A checkpoint
counts as cached when every shard its index names is in its snapshot (a file appears there
only once it is whole), and otherwise what the cache already holds comes off the need. The
flash lane's PLE table (47.7 GiB, written at every boot) is checked against the disk of
PLE_DIR when that is not the disk of HF_CACHE.
A context-mode change can no longer leave the engine unable to start. A 27B unit on
checkpoint configs of the other mode crashes at load. install.sh patched YaRN into those
configs, or restored them, at step 6, and wrote the unit at step 8: a run that died in
between (the opencode download of step 7, a sudo that could no longer ask at step 8) left
the unit of the old mode on the configs of the new one, and the engine died the next time
systemd started it. The configs are now written right before the unit that reads them, or
at the end of step 7 on --no-service, which writes no unit.
Three things an update got wrong. A box serving a custom --model-path could
not be updated: the opencode limits table had no row for it, and the refusal meant to say so
could not fire (read <<<"$(cmd)" returns 0 whatever the command returned), so step 7 died
under "returned no limits"; the table now gives a custom model the pair of the smaller pool,
which the fit at the end of the install corrects to the real one. --no-service on a box
whose installed unit serves 1m was refused under "CONTEXT_MODE=1m needs the systemd path", a
variable nobody had set: the refusal now names the installed unit and both ways out. And a box
updated from before v1.9 keeps the BF16 draft it was installed with, as the documented rollback
requires, since the two cannot be told apart: it is now told so, with the command that moves it
to v1.9's draft.
The installer's first and last checks say what they found. A driver that is not loaded
made nvidia-smi fail inside a bare $(...) under set -e, and the install ended with
"Install failed at line N", nvidia-smi's own explanation captured and never printed: it is
now quoted, with the likely cause. The smoke generation at the end was a curl | python3
pipe with the same fault, so a curl that timed out never reached the message that points at
the journal; it does now. It also gave a kept engine, which may be in the middle of someone's
long prefill, the same 300 s as a freshly booted one, and failed updates that had nothing
wrong with them: a kept engine gets 30 minutes. And it accepted any non-empty text, so a wall
of ! (token 0, the decode corruption this hardware is known for) ended in "Installed,
verified": it is refused, with what to do about it.
An update that changes nothing restarts nothing. v1.18.5 kept the engine when nothing it
reads had changed, and everything around it went on restarting at every run: the proxy,
cutting every request in flight through it; opencode-web up to three times, ending the turn
the Agent tab was in; the cockpit twice. The reference box's journal counts 49 starts of
opencode-web and 36 of the cockpit on 2026-09-23. Each is now restarted when it is not
running, when the run changed what it runs, or when it started before the last change of a
file it reads, and those files are written only when their content changes. On a 1m box,
step 7 also wrote the table's bounds over the pair the end-of-install fit had set, and the
fit wrote it back: two writes and two backups per run, 79 of them in ~/.config/opencode
by 2026-09-24. A fitted pair under the bounds is kept now.
The engine is restarted when a branch or a moving tag has moved. With MODEL_REV=main
the checkpoint's config was looked for under snapshots/main, which never exists, and the
ref that names the commit was not an input either; an image named by a tag
(IMAGE=lmsysorg/sglang:v0.5.19) matched neither pattern of the engine's inputs. Either way
the installer kept an engine running the old checkpoint or image under "nothing it reads
changed", and with main the flash lane's draft vocabulary was never built. Both are
resolved now. And an explicit CONTEXT_MODE=native on a 1m box kept the 1M limits in the
user's opencode config under a note advising CONTEXT_MODE=1m, while step 8 installed the
native unit: they follow the mode that was asked for.
Two things the installer said or did about the rest of the box. Its closing summary gave
OpenAI and Anthropic clients the engine's own port, on loopback since v1.17 and without the
proxy's guards: it names the proxy. The --no-service summary said the install lived in two
folders, to delete; it names what ./uninstall.sh --list shows, including the provider in
your opencode config that reads the key, without which opencode refuses to start. And an
oc command at ~/.local/bin/oc that is not this repo's launcher, OpenShift's CLI for one,
was overwritten: it is left alone, and the command offered instead carries OPENCODE_CONFIG.
The flash lane's prompt ceiling follows the lane that serves, and a switch cuts nothing.
The 250,000-token ceiling that keeps a long flash prefill off the memory edge was the proxy
unit's PROMPT_CEILING_TOKENS, moved by switch-model.sh at switch time with a proxy
restart, while the old lane still served: a switch to flash queued behind a 27B serving 1M
refused every prompt past 250,000 until the next boot, and every switch cut the streams in
flight through :30001. The proxy (v6.25) now applies FLASH_PROMPT_CEILING_TOKENS while the
served model is the flash lane's, the unit carries it whatever lane was installed, and the
cockpit and oc-fit-limits.py read the same rule. A switch leaves such a proxy alone, and
restarts opencode-web only when the limits it reads change, which a switch between two 27B
targets never does; it used to restart it every time, ending the Agent tab's turn. The
switch's own description, the README and ARCHITECTURE.md said it restarted nothing and
rewrote only --model-path: they say what it does now. PROMPT_CEILING_TOKENS remains, as a
ceiling on any lane.
Switching, the image lane and uninstalling, on boxes that are not the reference one.
- A switch on a native 27B box restores the target's config when it still carries YaRN: a target served while the box was in 1m kept its patch in the cache, and a native engine crashes at load on it. The restore refuses, before the unit is touched, when the backup is gone.
- A switch checks for room before it downloads (a cockpit button can start one, and 126 GB can fill a disk under a serving engine), says when a failed download is a full disk rather than blaming HF_TOKEN, and the cockpit gives the job two hours instead of the 30 minutes a flash download nearly takes on its own.
- The lean level's default is kept: a box installed with
LEAN_DEFAULT=0went back to lean at its next./install.shor Switch, and the refusal of an unknown level named "lean (default)" whatever the default was. run.shoffered--no-service --no-startto restore native configs, a pairinstall.shrefuses.install-image.shreads the cache its unit serves from (an update on a box whose lane lived on another disk downloaded 31 GB again into~/.cacheand rewroteHF_HOME), and a first install beside a text lane on a custom cache uses that cache; it measures space where the checkpoint and the runtime land, not under$HOME, and counts what is cached by bytes; and--uninstallon a box whose boot lane was the image enables the text lane it had replaced again, instead of leaving no engine at all.uninstall.shlists and reclaims the weights and PLE file of every cache the lanes use, not only the environment's. It asks for sudo only when there is something of root's to remove: a box without sudo rights, the one--no-serviceis for, died at its first sudo call before it removed anything of the user's. When sudo is refused the services are left running and whole, the key they read included. It also exited 1 on a box without a PLE folder, after a clean run.
A timed-out image call keeps the lane busy. After its 30-minute read timeout the cockpit gave the image lock back while the runtime, which has no abort, went on generating, so a second image could start beside the first, the pair that held 90.5 GB and wedged the engine. It answers 504, "still generating", and holds the lane until the run's journal shows the request ended, the lane restarts (Cancel), or another 30 minutes pass.
The image pixel budget reads a size the way the lane does. It read size only when both
axes were missing, and case-sensitively, so a width alone or "2048X2048" went through
unbudgeted. It follows the lane's own order now (explicit width/height first, then size
lower-cased, then 1024), refuses what the lane would refuse or fail on, and
num_inference_steps is 1 to 100.
An engine in a crash loop reads as one. Restart=always with RestartSec=15 never
reaches systemd's start limit, so a unit dying at load sits in "activating" between attempts:
install.sh printed "still loading... be patient" for 20 minutes with the journal unread, and
the cockpit showed a boot in progress. The installer now stops at the first relaunch after
its own restart (NRestarts, which a manual restart does not zero on systemd 255) and prints
the journal; the cockpit reads the unit as failed and restarting, says it keeps crashing, and
offers Stop.
A wedged engine no longer holds a switch back, since it never settles, and it reads as degraded when it also loses its health. The warning for a flash stop mid-boot said the next boot would rebuild the PLE table, as if that were the cost: every flash boot writes it from scratch, so what the stop loses is the boot under way.
The opencode config is edited the way opencode reads it, and only where it has to be.
opencode parses its config as JSONC (comments anywhere, /* */ blocks, trailing commas:
jsonc-parser with allowTrailingComma, read in the 1.18.32 binary), and the merge helper
knew whole-line // comments only. Any other form made every edit refuse behind || true:
the limits stayed where they were, and at uninstall the provider reading the deleted key
file stayed too, after which opencode does not start; the same happened when the box's
provider was the last one under a comment line. The default-model helper rewrote the whole
file with json.dump at every install and switch: non-ASCII came back as \u escapes, one
comment made it give up, a default pointed at another provider was replaced, and there was
no backup. Both now find each member by walking the document, change only what they must,
keep comments, line endings and symlinks, and write in one step after a backup, so a full
disk leaves the file whole. Each backup has its own name: five edits within one second
kept one, which was no longer the original. The default model follows the lane only when
it is unset or already one of this box's. And the generated config is written once per
run, not twice: the generator now gives the served entry the name the helper applies next.
The cockpit and the Agent relay bound what a client can hold before it signs in. Both
started a thread per connection with no timeout and no limit, so a request sent in part
held a thread and a descriptor for good: 100 of them held 100 threads, in the process
whose 1,024 descriptors the collectors and the memory floor need. A client silent for 30 s
is now let go (the event stream, which writes every 2 s, is not cut), and each server takes
96 connections, 24 per address. A POST is refused before its body is read unless it carries
a session (a login's body is capped at 4 KiB), and the relay's one public path,
/site.webmanifest, no longer takes a body to opencode with the Basic credentials. The
session cookie was read with http.cookies.SimpleCookie, which gives up at the first pair
it has no grammar for: another app's cookie on the same host with a JSON value or a space
hid the session (401 in a loop, in the cockpit and in the Agent tab), and a name like a/b
raised and dropped the connection unanswered. The header is split the way browsers send it.
run.sh serves the engine on loopback. It passed --host 0.0.0.0 with no proxy in
front, so the engine, without the guards against the fields it dies on, was on the network
for anyone holding the key, while SECURITY.md said it was not on the network at all. It
follows ENGINE_BIND as the units do, 127.0.0.1 by default.
The cockpit's installers refuse root, as install.sh and install-image.sh do: under
sudo, install-dashboard.sh rendered User=root with root's sudoers allowlist and kept a
0.0.0.0 bind, and install-agent.sh ran opencode, and so every tool call of the Agent tab,
as root. SECURITY.md also said the cockpit reached root "through exactly one surface", its
sudoers lines. Its user is in the docker group, which install.sh requires and which is
root by itself, and two of those lines install a file that user writes into
/etc/systemd/system, beside daemon-reload and restart. A root wrapper checking that
file would guard nothing the docker group does not already open, so the page says it as
it is: the cockpit's user, key and session are root on this machine, and the defences that
count are the ones in front of it.
Five smaller proxy defects (v6.25).
- A client's own token count was refused as too long.
/v1/messages/count_tokensgenerates nothing, yet the size guard answered a conversation past the lane's limit with "the prompt is too long for this lane", and one sent while the pool was unmeasured with a 503: the route a client uses to learn that its conversation no longer fits could not say so. It is relayed now. - The pool that guard needs was read with a 4 s timeout, while
/server_infowaits on the scheduler, which answers between two steps of someone else's long prefill: a big prompt sent then got a 503 "not measured yet". The read waits up to 20 s for the measure; a stale pool would be the worse mistake, since the engine behind it may have restarted smaller. - A refusal sent before a body was read (the 413 past
MAX_BODY_BYTES, the identity wall's 401) was lost: the socket closed with the upload still coming, and the kernel's reset destroyed the answer on its way (a client sending 20 MB past a 1 MB cap saw a broken pipe five times in five). The proxy now ends its side and drains before closing, and a client that asks first (Expect: 100-continue) is refused before it sends anything. - One log call is one journal line. A tool schema's pattern, logged whole, could hold
\n[proxy] ...and write lines of the proxy's own shape, which the cockpit's feed counted as traffic. - A System One answer whose engine gave no model name named the caller's alias
(
jev-latest) instead of the model the alias resolved to.
Pin watch could not see a deleted repo. Hugging Face answers an anonymous request with
401 for a gated repo and for one that does not exist, and check-pins.sh filed every 401 or
403 under "gated", which it never counted: a deleted pinned repo kept the daily watch green.
It reads x-error-code now (a gated repo, which a fresh install cannot download without a
token, fails under its own name; anything else is a dead pin), sends HF_TOKEN as its advice
promised (on stdin, never on the command line), and an image it could not ask about fails
instead of counting in "all resolve".
The auto-continue plugin no longer relaunches what a relaunch cannot fix. A relaunch resends the whole history plus its own reminder, so after a prompt past what the lane serves, or an image the engine cannot decode, it could only fail again, longer: the reference box's log shows 210,159, then 210,210, then 210,261 tokens refused against a 200,000 ceiling on 2026-09-09. opencode compacts on an overflow by itself, and a compaction that does not resume is the plugin's other path.
The System One bench scores a target on all its rows, from one model, or not at all. The
public report scored whatever rows were there, although the bench and BENCHMARKS.md say a
target with missing rows is refused; and a run resumed after a lane switch appended the
other lane's answers to the same file, each row naming its model and nothing reading it
back. The reports refuse a partial or mixed target, and a resume stops at the first answer
from another model. systemone-check.py also graded an ordinary streamed completion clean
as soon as it held "data:", which the proxy's keepalive frames, a cut stream and the
corrupted-output abort all do: it wants text, a finish_reason, [DONE] and no error event now.
mirror-pins.sh could not have mirrored anything correctly. Its images lost the
mirror's host (MIRROR_REGISTRY=registry.example.com pushed to Docker Hub), and a pull and a
push carry one platform of the pinned multi-platform index under another digest; they are
copied whole with docker buildx imagetools and the mirror is asked for the pinned digest
afterwards. Its model path called upload_folder positionally (keyword-only), asked the
mirror for a commit id it cannot have, ignored the runbook's venv, listed 6 checkpoints of 9
and 1 image of 3, gave two owners' checkpoints one name, mirrored repos MIRROR.md calls
unchecked, and executed on any mode but an exact --dry-run. Each pin gets owner__name
and an upstream-<revision> tag compared file for file, a checkpoint needs a dated license
conclusion in MIRROR.md, and the runbook gives the measured 513 GB.
OVERLAY_FLASH=1 is retired. The flash lane's documented rollback served the v1.5 to
v1.7 overlay image with the launcher of v1.8, which does not fit it: the overlay keeps the
47.7 GiB PLE table in pinned host RAM unless SGLANG_QWEN4_PLE_MMAP_DIR is set, and the
launcher sets none and passes --ple-offload-backend file (sglang#37068) instead. Nothing
had booted the pair since v1.8, and the CI checked the pins only. The switch is refused with
the rollback that holds together, v1.7.2, which shipped the overlay with its own launcher
and pins; flash-sglang/ stays as the record of what upstream replaced.
Smaller installer defects.
- Each drafter pin follows the installed unit unless it is passed: with any one
DRAFT2_*given, the other three fell back to the defaults, soDRAFT2_TOKENS=8on a box serving the BF16 draft moved it to the NVFP4 one without a word. The flash lane'sSPEC_TOKEN_MAP_SIZE=0andFLASH_REPLAYSSM_SPEC=0are read back the same way, and no longer come back on at the next run. - The
qwen38-pinnedtag of a pin a release replaced is removed once the new pin is here and tagged (unless a container uses its image): it kept 30 to 39 GB out of every prune. HOME,HF_CACHEandPLE_DIRwith a space, a colon, a quote, a$or a%, which broke the unit they were written into, are refused before step 1;ENGINE_BINDandPROXY_BINDtake 127.0.0.1 or 0.0.0.0 only (300.1.1.1 passed, and any other address leaves out the loopback the box reaches both ports on); a busyPROXY_PORTis taken for the proxy's own only when the running proxy's unit names it.- An
OPENCODE_VERSIONwithout its sha256 is refused before step 1, not at step 7; adfthat fails says "found unknown GB" instead of ending the install on its own line; a badFLASH_REPLAYSSM_SPECexits cleanly;--with-image --no-imageis refused; a lane kept by--no-imageis not reported "not installed"; an opencode binary that could not be written is a failure, not "installed"; the download hint namesDRAFT2_REV, not the retiredDRAFT_REV;--helpgives the FP8 pool as measured.
Smaller defects of the other scripts. ./switch-model.sh with no target switched the
box to stock, re-enabling the 27B lane; it prints its usage. get.sh under FORCE_UPDATE=1
switched to main before stashing, so a change that conflicted with main ended the run
(git's rc 128) and a commit made on a detached HEAD was left on no branch: it stashes
first and keeps such a commit on a backup branch, and its advice no longer includes
git clean -fd, which deleted the untracked files it keeps on purpose.
install-image.sh checked import venv, which works without python3-venv, and then took a
venv with no pip for a finished one; it asks for ensurepip, and makes such a venv again. A
smoke generation that failed at the transport ended it before its message and the
journal. The image unit's TimeoutStartSec, which a Type=simple unit never applies, is
gone.
Tests that could not fail now fail on the defect they are named for. A mutant run
against each claim a test makes left these green: the uninstall inventory read the last
assignment of each pin (the help text's moving tag, a later $CUR_DRAFT), so the served
drafter and the 27B digest were never checked, and it matched images by substring and units
and containers by their presence anywhere in the file; the fake systemctl printed an epoch
whatever it was asked, so a dropped --timestamp=unix, which makes every install restart
the engine on real systemd, went unseen; the native-restore guard's fixture carried a
--context-length no native unit has, and its exit code was thrown away; the opencode
block's 27B numbers were the table's own, so which pair was used could not be seen;
needle.sh's 1/1 pass tolerated exit 1; the System One cancel was set before the call, so a
check placed above the slot wait passed; the image lane's root refusal and the cockpit step's
wiring were substrings; job pruning was called under a name that did not exist; the audit
test never read the argv it is named for; "importing binds nothing" looked for a name
nothing defines; the collectors' hostile-output test asserted only the type of the answer;
and the state snapshot test ran no product code at all. Each now runs what it names and
fails on the mutant that used to pass.
The cockpit's static files stay in their directory. /static/ is served before the
session check, and containment was a string prefix, so a neighbour such as
dashboard/static.bak/ passed for the static directory and /static/../static.bak/x was
served to anyone. Path components are compared now.
More CI gates that could not see what they are for. A placeholder with a digit in its
name (the shape __DRAFT2_REPO__ already has) passed every render gate and the installers'
own last checks, and would have reached /etc verbatim. The declared-against-ran counts took
a skipped test for a run one, so a skip decorator on a whole class stayed green, and so did
the TypeSafe SDK round trip whenever its install failed: a skip now passes only for a reason
the step lists as the runner's. The relay simulation accepted an empty read as a whole
stream, never checked that an abort reached the engine, compared aborted ids against a set
that contained them, and ran under a floor that let one of its checks disappear. And "the
offline suite touches nothing" compared listening sockets only, which cannot see a
connection to a port that was already listening, the engine's on the box that runs
ci-local.sh: every python the suite starts now records a connect() to a serving port, with
the test line that made it.
The documents say what binds where. DESIGN.md called the cockpit "opt-in, loopback",
when install.sh has installed it by default since v1.12, on the tailnet address when the
box has one. SECURITY.md said the engine binds 0.0.0.0 on the reference box, which serves
it on 127.0.0.1 since v1.17, and that it is not on the network at all, which ./run.sh
contradicted until this release. SECURITY.md and ARCHITECTURE.md said TLS and per-client
identity do not exist, when the proxy has had both, opt-in, since v6.16; the README said the
flash-uncensored lane binds 0.0.0.0, when its proxy does; and docs/operations.md sent
Prometheus to the engine port, reachable from the box only since v1.17. /metrics is read
through :30001, with no key on either port (checked on the reference box), and the image
lane exports none.
What the proxy refuses, and that nothing is truncated. docs/clients.md said the 27B
units truncate an oversized prompt and the flash ceiling answers 413: no unit or launcher
passes --allow-auto-truncate (a CI gate refuses it), a prompt past the pool share or the
flash ceiling is a 400 context_too_long, and a 413 is only a body over 256 MiB.
docs/context-1m.md planned against an 863K floor and called the 1m pair's worst case
880,000, under every pool: sixteen boots measured 832,993 to 922,094, and with one agent step
counted the worst case is 923,863, above all of them, which is why the install fits it to
the pool. A native re-install also keeps the proxy the page said it removed.
The README's disk figures are the preflight's. It announced ~84 GB for a 27B target and
~225 GB for a flash one, while the installer asks 45 GB on the disk of HF_CACHE and 40 on
Docker's, or 230 and 35 for flash, so a box sized from the README was refused. It states
those now, per disk and summed for a box with one disk, and a test holds it to install.sh's
numbers. The one-liner's comment said native where the default is 1M; a code block of the
Operations section was never closed, so GitHub rendered the cockpit's heading and
introduction as code (a test now checks every page's code blocks); and the generated
opencode variants are lean, low, medium and xhigh, lean being the default.
The cockpit's pages describe the cockpit that exists. The README's tab table,
docs/cockpit.md and dashboard/CAPABILITIES.md promised a bench job, a 4-canary battery,
key regeneration, a settings editor, a switch dry-run, one-click reclaim and a template
panel, none of which exist, and install.sh's summary pointed at a Benchmarks tab the page
never had. Each now names what the tab does, and a test checks that every tab named in the
repo is one the page has. ROADMAP.md, frozen at v1.14.0, now lists System One, the release
check, the engine on loopback, the image lane and the pinned opencode.
Two more found while fixing the docs. On a box whose Hugging Face cache and Docker share one disk, as on a stock one, the installer checked the checkpoints' 45 GB and the image's 40 GB each against the same free space, so 45 GB passed a first 27B install that needs 85 there: it asks for the sum when the two are one disk. And the cockpit's Logs tab showed the last lines of the engine's container and journal as they were, while SGLang's ServerArgs line at boot carries the serving key: the key is masked there as the diagnostics bundle masks it.
Three smaller holes before the cockpit's login. A key with non-ASCII in it ended the
login's handler thread (compare_digest refuses such a str) before the attempt was counted
or audited, and a NUL in a static path did the same (resolve() raises): both are answered
now. The limit of five failed logins a minute was counted after the reply, so a burst of
simultaneous attempts was judged far past it (40 of 40 in a test): an attempt is counted
before it is judged, under a lock, and given back when it succeeds. And SECURITY.md said the
update check ran at most once every six hours (a failure retries after a minute), that
downloads go to Hugging Face and the image registry (GitHub too: the clone and the pinned
opencode), and that every byte is pinned and hash-verified, with nothing said of the image
lane, whose pip dependencies are resolved from PyPI unpinned.
Smaller cockpit defects.
- A proxy refusing the cockpit's key on the System One tab (an identity wall that does not list it) was relayed as a 401, which the page reads as its own session ending: a signed-in user was sent to the login. It is a gateway error with the proxy's detail.
- The update check asked GitHub every minute when the latest release was tagged outside semver, the whole anonymous budget of 60 an hour: any answer is an answer now. The cockpit called itself 1.1.2 since v1.7.2; it reads its release from CHANGELOG.md.
- A
.incompleteblob an interrupted download left marked its checkpoint "downloading" and its pinned revision absent for good, and a bare snapshot folder counted as a checkpoint: a revision is there when every file its indexes name is (a diffusers layout included), and only a blob written to in the last ten minutes is a download in progress. - A wedge's forensics saved the py-spy wrapper's complaint ("py-spy not installed") as the
scheduler's stacks; the wrapper's sudoers line allowed any arguments;
DASH_BIND=::made the unit fail at every start (both servers speak IPv4); a missing config folder failed the unit at its namespace step; the diagnostics bundle left out the image lane's and opencode-web's journals. Each is fixed. - GPU driver refusals were reported when their count over the last hour grew, which it does
not when as many old ones leave the hour as new ones come; a git status or a docker
inspect that timed out read as a clean checkout and a container without the request-id
override; in a dry run the memory floor and the pool guard acted in silence instead of
being shown acting; a native 27B recipe failed its own validation (no
--context-length, as a native unit has none). Each is fixed, and two comments that gave wrong numbers are.
Keys stay off command lines. Every lane passed the engine its key as
--api-key "$(cat .../api-key)", so the key was in the argv of the docker client and of
the server, which any local user reads in /proc; the download's docker run carried
-e HF_TOKEN=<token>, and the smoke test's curl the key in a -H argument. The units, the
flash launcher and run.sh now hand the server --config /out/engine-secrets.yaml, which
SGLang merges into its arguments in memory (checked in both serving images), written from
the api-key file by engine-secrets.sh before every start, so a key changed by hand still
reaches the next start, and only when its content changes, so an update that changes
nothing still restarts nothing. The token goes to docker by name, and the smoke key as a
header file. The engine restarts once, at the update that brings this.
CI gates that could not fail. A negated grep under bash -e checked nothing; the syntax
and shellcheck lists left out seven scripts, install-image.sh among them; the sudoers gate
never compared daemon-reload and the two install calls with the allowlist; and the flash
flags step checked literals it had written itself instead of what install.sh renders. Each is
fixed and was checked against the mutant that used to pass.
v1.18.6 (2026-09-23): the engine's journal stops filling with deprecation warnings, and a prune cannot take the serving images
Every call of /get_load and /get_server_info writes a deprecation warning in both
SGLang images this repo serves ("Endpoint '/get_load' is deprecated and will be removed in
a future version"), and the cockpit asked /get_load every second: 597 warnings for it and
20 for /get_server_info in ten minutes of the 27B's journal, about 86,000 lines a day, and
the same rate on the flash lane. The cockpit now asks /v1/loads?include=core and projects
it to the /get_load shape its page and its guards read, exactly as SGLang's own shim does;
the cockpit, the keepalive proxy (v6.23) and oc-fit-limits.py ask /server_info, and
conc-check.py /model_info. Each falls back to the old route only on an engine that
answers 404 to the new one, and asks the new one again once the port stops answering (a lane
switch). On the reference box, since the redeploy: /v1/loads?include=core once a second,
/server_info, /health, and no deprecation warning at all; a real generation read as one
running request.
Both serving images were one docker image prune away from deletion. An image pulled
by digest has no tag, and to Docker an image with no tag is dangling: docker image prune or
docker system prune, the usual way to win back room on a full disk, deletes it, and the lane
pulls 30 GB again at its next start. On the reference box, docker images -f dangling=true
listed both. The installer now tags each pinned image present on the box
(qwen38-pinned:<lane>-<digest>, both lanes, silently when already done); after one run,
the dangling list is empty and the digest references the cockpit matches pins by are still
there. uninstall.sh knows the name, removes an image by all its references (a tagged image
keeps its digest reference, and removing one of the two only untags it), and keeps its
prune warning for an image that really has no tag.
The cockpit's summary came out twice at the end of every install: install-agent.sh
runs install-dashboard.sh again right after install.sh did, only to add the relay. That
nested run (DASH_QUIET=1) now prints only the relay and, when it applies, the key warning.
v1.18.5 (2026-09-23): an update restarts the engine only when it has to
Every ./install.sh restarted the engine, even when it changed nothing the engine
reads: a full boot per update, about 8 minutes on the 27B and 12 on flash, for an update
that touched only the cockpit, the proxy or opencode (on the reference box, an update whose
27B unit came out byte-identical still cost a 7-minute boot). engine-inputs.py now finds what the engine reads at start from its own
unit (the unit and its drop-ins, the flash launcher, every file of the config dir they
name directly or through the /out mount, the checkpoint configs YaRN is patched into,
the image IDs) and says whether the running engine already has it: active, started after
each of those files was last written, its container on the image the unit names. The
installer takes that answer before it writes anything and compares the content of the
same files after it wrote them; when both hold and the engine answers /health, step 9
keeps it ("Keeping the running engine: nothing it reads changed since it started") and
still runs the real generation smoke test against it. Otherwise it says why it restarts
(a file changed after the start, this run changed what it reads, the engine is stopped,
or RESTART_ENGINE=1). On the reference box, a plain ./install.sh on the serving 27B went
from 7 to 8 minutes to 28 s, twice in a row, with the engine's start time unchanged; on
flash, MODEL_CHOICE=flash ./install.sh started the lane ("why: qwen38-flash.service is
inactive") and the two plain runs after it kept it, in 29 s and 28 s.
The second run is what showed the trap: the first kept the engine but rewrote its unit and
chat template identically, which dated them after its start, so the next run would have
restarted it. The unit, the flash launcher and the patched template (patch-template.py)
are now written only when their content changes.
v1.18.4 (2026-09-23): a fresh box's opencode stays on the box, and the image lane installs without Rust
The case v1.18.3 missed, a DGX Spark with no opencode and no opencode config. The
installer generates its opencode config under ~/.config/qwen38/, and in v1.18.3 nothing
pointed opencode there: no OPENCODE_CONFIG, not in oc, not in the Agent tab's unit. A box with
no ~/.config/opencode/opencode.json got a printed cp command, so v1.18.3 installed
opencode on it and left it with no provider for the model the box serves. Reproduced in a
throwaway HOME: "Error: Provider not found: qwen38". The installer now installs its config
when the box has none; a config you already have is still never overwritten, and when it
has none of this repo's providers the installer says so. The same throwaway HOME after the
fix, with the installer's own lines and the real download: opencode 1.18.32 installed and
checked, the config in place, qwen38/qwen3.8-27b listed, and a real turn answered "OK"
in 7 s through the proxy, with no model named on the command line.
The same box, one lane later. That copy lists the lanes the box had at its first
install. Installing the flash lane afterwards (MODEL_CHOICE=flash ./install.sh) left it as
it was, with no flashnext provider: the limits merge found nothing to merge, the default
model stayed on the 27B, and the NOTE printed said to re-run ./install.sh, which did the
same again. The served model answers under any name, so nothing failed at first: opencode
sent the 27B's limits (700,000 on a 1M install) to a lane whose proxy refuses a prompt past
250,000 tokens, and a long session would be refused well before opencode compacted it. A
config that already has one of this repo's providers now gains the provider of each lane
installed since, by the same kind of targeted edit as the other merges (a backup first, the
file read back and compared, restored if anything else moved). A config with none of them is
still the user's own and still only gets the message. Replayed with the installer's own
lines in a throwaway HOME, the 27B then flash: before, qwen38/qwen3.8-27b at 700000/200000
while flash served; after, the default on flashnext/qwen3.8-flash-next at 225000/32000, and
the real opencode 1.18.32 listing both and answering a turn.
What a missing opencode says, everywhere a first-time user meets it:
install.shsays it is installing opencode rather than naming a version, and when the download fails, that opencode is still not installed and what to run, instead of "opencode left as it was"; its last lines say whether opencode is there and which one.- Those last lines name what starts it from the user's own shell:
oc, or its full path when~/.local/binis new and not yet in that shell's PATH, or the plain opencode command when another program ownsoc(the launcher is not installed then, andocwould run that program). The config they name is the one opencode reads, not the generated copy. ocwith no opencode says so and names the command, instead of a shell error on a path.- The cockpit's Agent tab tells a box with no opencode (re-run
./install.sh, which installs the pinned one and the tab) from a box where only the tab is missing (dashboard/install-agent.sh).
Found by a real uninstall and a real first install on the reference box (everything of
this repo removed with ./uninstall.sh, the box emptied of opencode, its configs and the
27B checkpoints, then the published one-liner run as a new user would):
- On a fresh box,
ocand the Agent tab answered with a cloud model. The published v1.18.3 installed cleanly (exit 0, 11 min 46 s, engine, proxy, cockpit and Agent tab up), and thenoc run "Reply with exactly: OK"printedbuild · big-pickle: opencode's own hosted free model. The Agent tab's opencode listed one provider,opencode, defaultbig-pickle. With no provider for this box in the config it reads, opencode picks its free cloud model (zai-org/GLM-5.3-Flashon another run), so the prompts meant for the model this box serves left the box, and nothing said so. The config copy above fixes a fresh box;ocand the Agent tab now also load the box's generated config throughOPENCODE_CONFIG, which opencode reads over the global one (measured on 1.18.32: the box's model wins even over amodelset in the global config), so neither can fall back to a cloud model whatever the user's own opencode config says. A user's ownOPENCODE_CONFIGis kept, and plainopencodestays the user's. ./uninstall.sh --yesleft opencode unable to start. It deletes the API key, the providers install.sh writes read it through a{file:}reference, and opencode 1.18.32 then refuses to start at all, every provider included: "Configuration is invalid ... bad file reference". Since this release every fresh box gets such a config. The providers that read the key now go first (oc-merge-limits.py --remove-providers, same targeted edit as the merges, comments and the user's other providers kept), withmodelandsmall_modelwhen they name one; a file holding nothing else of the user's is moved to a backup. Without--yesthe key stays, and the uninstaller says the providers answer again after a reinstall. Proven with the real opencode: it starts after the purge.- The image lane did not install on a box without a Rust toolchain, which is every fresh
DGX Spark: DGX OS ships no
cargo, and the editable overlay of the pinned SGLang source stopped on "cargo is required to discover the Rust extension modules", so./install.sh --with-imageended in "the image lane did not install". It had passed on the reference box only because its owner's login puts~/.cargo/binon the PATH; a clean login showed it. The five extensions (gRPC, the Rust server, the radix tree, two multimodal processors) are all the LLM runtime's and none is imported by the diffusion server: the overlay is built without them (SGLANG_BUILD_RUST_EXTS=none). ./uninstall.sh --yesdied halfway on every box that had served the 27B: the engine container runs as root and writes its compile cache under~/.config/qwen38, in directories that are root's, so the plainrm -rfstopped the script (set -e) after 995 "Permission denied" lines, with the cache left behind and the reclaim commands never printed. What the user'srmcannot remove now goes throughsudo, quietly.- The uninstall inventory did not know the image lane's checkpoint (
Qwen/Qwen-Image-2.1, 31 GB): not listed, no reclaim command, while a comment in the script said it was reported. It is, and the CI gate on inventory pins now readsinstall-image.shtoo. - An update on a nearly full disk was refused: the preflight asked for 40 GB free on the docker root whatever was there, and the box, with the pinned image in place and nothing to download, answered "Need ~40 GB free ... found 36 GB". An image already here now needs only the container's room (5 GB); a first pull still needs the full amount.
- A commented-out opencode PATH line in
~/.bashrccounted as one, so the opencode the installer had just put in~/.opencode/binstayed off the PATH of every new shell, and since the line was written only by the run that installed opencode, no update ever wrote it after. An opencode in~/.opencode/binthat the installing shell cannot find now gets its line (marked as installed by this repo only when this run installed it). - A flash install on a box whose 27B serves 1M gave the 27B block of the generated config
the native 194048/64000: the flash install runs in native mode and used it for both
lanes. Harmless while only the user's config was read; not once
ocand the Agent tab load the generated one first. The 27B's mode now comes from its own unit. - While the flash lane boots, the installer said "first boot compiles kernels" for 13 minutes of a load that compiles nothing: every flash boot rewrites its 47.7 GiB PLE table.
- The reclaim commands
./uninstall.shprints were a plainrm -rfeven for checkpoints in which engine containers of past versions, running as root on the mounted HF cache, had left root-owned.no_existandrefsentries (three on the reference box): pasted, they stopped on "Permission denied". A directory the user cannot empty now getssudo rm -rf. ./uninstall.shon a box with nothing of this repo installed said "services removed.".
CI: the step that runs every unittest suite of tests/ in one process printed only
their names when one of them failed, because bash -e ended it on the assignment that
captured the run. It now prints the end of the run and names the failing tests.
v1.18.3 (2026-09-23): the same opencode on every box
Until now the repo installed no opencode at all: it took whatever was on PATH, and
opencode installs its own patch releases, so two boxes installed a week apart ran two
versions (the reference box sat on 1.18.27 while 1.18.32 was out). Four things this repo
does depend on opencode's own behaviour and were read out of one version's binary: the
compaction threshold oc-fit-limits.py sizes the limits for, the hidden 32,000-token
output cap the oc launcher lifts, the overflow phrases the proxy answers with so that a
refusal makes opencode compact, and --yolo / OPENCODE_PERMISSION for the Agent tab.
opencode is pinned now, version and checksum: OPENCODE_VERSION=1.18.32 and the
sha256 GitHub publishes for opencode-linux-arm64.tar.gz. It was checked against 1.18.27
before being pinned: the same 21 overflow phrases and 3 exclusions verbatim, max_tokens
182,000 with the launcher's variable and 32,000 without on both (recorded on a fake
endpoint), the same compaction and permission code once the bundler's chunk names are set
aside, serve --hostname and the hidden --yolo on both.
install.sh installs it when a box has none (the checked release asset, where opencode's
own installer puts it, and on PATH), replaces an older one there the same way, moves an
older one installed by npm, brew or bun with opencode's own upgrade, and keeps a newer
one, saying so, because going back a version can leave sessions a newer opencode wrote
unreadable. The generated config and yours get "autoupdate": "notify", so opencode
announces a release instead of installing it itself (a false you set is kept). The
Agent tab says when the opencode it serves is not the pinned one. OPENCODE_PIN=0 keeps
whatever you have; a download that does not match its sha256 is not installed, and
nothing about opencode fails the rest of the install. CI downloads the pinned asset and
checks its sha256 on every run. uninstall.sh lists an opencode this repo installed, and
leaves it.
A claim put right: docs/opencode.md said the 1M starting pair (700,000 + 200,000)
sits under the worst measured pool. It does not (832,993 to 922,094 over sixteen boots),
which is why the installer, and since v1.18.2 the cockpit, fit it to the pool each boot
gets.
v1.18.2 (2026-09-23): a generation can be cancelled, and a Stop during one is clean
What happened on the reference box, 2026-09-23. A call for ten 2048x2048 images at 60
steps (about 47 minutes of work) was running when the image lane was stopped to switch to a
text lane. The runtime's HTTP server waits, on shutdown, for every open connection, and a
generation holds one for as long as it runs: the lane sat in "stopping" for the unit's
60 s, systemd killed it, and the unit ended failed (Result=timeout). The page then
said "Qwen-Image failed, read its journal" about a lane nothing had gone wrong with. There
was no other way out: SGLang Diffusion cannot abort a request, and the page had no Cancel.
A Stop during a generation now takes 5 s and ends clean. A second local change to the
pinned source, image-sglang/http-graceful-timeout.patch, passes
timeout_graceful_shutdown=5 to uvicorn: five seconds for a request about to finish, then
the requests in flight are cancelled. In a transient systemd unit holding a ten-minute
request: without it, Result=timeout after the stop timeout; with it, stopped in 5.2 s,
Result=success. install-image.sh applies both local patches from one list, recognises
them on a re-run and takes them off before a new pin; CI checks each against the real
upstream file at the pin.
Cancel. The Image tab shows a Cancel button beside the run's clock while a generation
runs, this page's or another tab's. Since the runtime has no abort, it restarts the lane
(about a minute), through the same action API, gates and confirmation as the Engines card;
it starts and stops nothing else. A request cut by Cancel, by the lane's Stop, by a restart
or by a systemctl stop typed at a terminal reads as cancelled: the cockpit checks, on
the error path only, whether the lane is still the one the request started on, and answers
interrupted instead of the bare 500 uvicorn sends for a cancelled request.
Measured on the reference box, the same day, through a real browser and the action
API. Cancel during a 2048x2048, 60-step generation: "cancelled" in the tab 5.5 s after
the confirmation, systemd "Stopping" to "Deactivated successfully" in 5 s, the lane ready
again 56 s later. The lane's Stop during another one: 5 s, Result=success, read as
stopped, not failed. Ten 2048x2048 images in one call: HTTP 400 from the cockpit, and no
request reached the lane.
One call may not ask for more pixels than the largest call measured. The images of a call run as one batch: those ten 2048x2048 images took 42 s per step where one takes 4.6, and where their memory would have ended was never measured, on a box where running out of unified memory hangs the machine. The cockpit refuses a call whose images add up to more than one 2752x1536 image (44.8 GB at its peak), in the tab and on the server.
A unit killed at stop is not a crash. The lifecycle carries systemd's Result, and a
unit that ended timeout reads "was killed while stopping, nothing broke while it was
serving" instead of "failed".
opencode's limits follow the boot after a switch too. A switch writes the target's
nominal pair (900,000 on the 1M lanes, above every pool measured) because the pool is only
known once the engine is up, and nothing fitted it after a switch and a Start from the
page: after the switch to the uncensored target that morning, the Agent tab asked for
900,000 against the 809,983 its 880,417-token pool could serve. The cockpit now runs the
Setup tab's fit itself once the engine is ready: once per activation, only when the
declared limits do not fit, never to raise one, and as a job that shows in the strip and
the audit log. COCKPIT_AUTOFIT=0 turns it off. Measured: after a switch to the
uncensored target and a Start, the fit ran 16 s after the engine was ready, and the running
opencode server's /config read 548,000 / 182,000 for its 883,728-token pool.
Smaller facts put right. The stopping bar said "systemd stops the container" for the image lane, which has none. The image tab's curl panel said "from anywhere" and "with the serving key": the lane listens on loopback and checks no key, and its own command says to run it on the box.
v1.18.1 (2026-09-22): the Agent tab runs the limits that were fitted
opencode-web reads its config once, at startup, and both paths that fit its limits to
the KV pool left it on the old ones. ./install.sh restarted it at step 8, then fitted
the limits at step 9 once the engine was up, and never restarted it again; the cockpit's
Fit the limits to this engine rewrote the files and restarted nothing. The page's
check reads the files, so its warning went away while the Agent tab kept asking for more
than the pool holds, which is the failure the fit exists to prevent. On the reference
box: files at 567,000 / 189,000, the warning gone, and the running server's own /config
still answering 700,000 / 700,000 / 200,000.
oc-fit-limits.py --restart-agent restarts opencode-web when a limit actually changed
and the server is running, through the sudoers line the cockpit already holds for it.
A fit that finds the limits already right restarts nothing, so it never cuts a reply for
no reason. install.sh and the cockpit's button both pass it, and the button's
confirmation says what the restart costs.
Measured on the update itself: a plain ./install.sh from this commit on the
reference box got a 906,439-token pool, fitted 562,000 / 187,000 (worst case 749,000),
restarted opencode-web, and the running server's /config then read 562,000 / 562,000 /
187,000.
v1.18.0 (2026-09-22): Qwen-Image 2.1, a third lane
Text to image, image editing with up to ten references, and the native RGBA this model
is built for, on the same box. ./install.sh --with-image installs it, and so does the
one-liner (curl -fsSL .../get.sh | bash -s -- --with-image). It is opt-in because it
costs 38 GB (31 checkpoint, 7 runtime) and about 25 minutes; once installed, a plain
re-run keeps and updates it. The runtime is SGLang Diffusion from a pinned source commit,
because Qwen-Image 2.1 is in no SGLang release and the cookbook verifies no docker image
for it, over the released wheel that carries the prebuilt aarch64 kernels.
A lane like the other two. Picked in the cockpit's switcher, switched to with
Switch, started and stopped by the same lane button, and ./switch-model.sh image
from a terminal. The cockpit's rule holds for all three alike: no engine starts while
another is busy (409 blocked, with the one to stop), and the unit's Conflicts= is a
second belt for a systemctl start typed at a terminal. A plain ./install.sh on a box
switched to images updates the text lane without taking the image lane off the boot.
Measured on a Spark: 1024x1024 at 40 steps in 38.2 s (the cookbook publishes 35.36), 2048x2048 in 190.9 s at 44.7 GB, ready 60 to 72 s after a start, 0.05 CPU cores at rest. Same seed, same bytes.
What the cockpit refuses before the engine answers a bare 500: a width or height that
is not a multiple of 32, a request without an output format (the API falls back to JPEG
and this model returns RGBA), and a second image while one is generating (two at once
held 90.5 GB of 121.6 and wedged the engine while /health kept answering 200). The
Image tab exposes every parameter at the model's own defaults, with Reset settings,
sample prompts, each stage of a request as the engine names it, and a time estimate
within 6.5 % of nine measured requests.
The lane is loopback, and that is not an omission. The diffusion runtime has no
--api-key and no --sleep-on-idle (its --help lists both, from the LLM parser), so
the cockpit is the authenticated door in front of it.
One local change to the pinned source. The diffusion scheduler's loop never waits,
so an idle lane held one CPU core at 100% for as long as it served: 1.047 cores measured.
image-sglang/scheduler-idle-poll.patch waits on the request socket the way the LLM
scheduler's own IdleSleeper does: 0.045 cores, identical pixels at a fixed seed, no
latency cost. CI checks that it still applies to the pin.
Found on the way, for every lane. The keepalive proxy (v6.22) tells a text client
that finds no engine because the box is serving images so, and how to switch back,
instead of "restarting, about 9 minutes". A text boot that floods its log (inductor
compile errors during the graph capture, 850 lines against a 300-line window) no longer
sends the boot bar back to "starting", and a serving engine that loses health reads
"degraded" even to a cockpit that did not watch it boot. docs/clients.md no longer tells
Claude Code users to size its window to the 1M context: a session sized that way outgrows
the share of the pool the proxy accepts and is refused mid-conversation instead of
compacting. It now gives two settings sized on the smallest pool measured here.
120 tests hold it, and eleven of the fixes were checked by undoing each one and watching its test or its CI step fail. Licence of the model: Qwen Research, not for commercial use.
v1.17.0 (2026-09-22): the engine answers on localhost only, and that is the default
A changed default, and the reason it could change at all. The engine listened on every interface. Seven days of journal on the reference box: 581,479 requests, every single one from 127.0.0.1, while the machine was reached from a laptop and a phone on the cockpit port alone. An open port nobody uses would be an ordinary waste. This one is the port SGLang dies on rather than refuses (sglang#40076 and sglang#31597, both unfixed upstream, both refused at the proxy since v1.15.0), so leaving it open left a door beside the one with the lock.
Nothing is lost by closing it, which is the only honest reason to move a default. The
keepalive proxy on PORT+1 is a full pass-through: every route the engine serves, both
the OpenAI and the Anthropic dialects, the same /v1/models and /metrics, plus the
guards. A client that pointed at :30000 from another machine points at :30001 and
gets more, not less. The README has told agent clients to use that port since v1.5.
The proxy's own default does not move. It is the door clients are told to use, and the one that refuses what the engine cannot.
ENGINE_BIND=0.0.0.0 ./install.sh brings the old behaviour back, and a box that
already runs the engine on the network keeps it: convergence holds in both directions,
so an operator with a remote client on :30000 does not lose it to an update they did
not read about. Moving such a box to the new default is the same variable, once:
ENGINE_BIND=127.0.0.1 ./install.sh.
Eleven tests, and the recipe guard in the cockpit caught the placeholder this change added to three templates before CI was through its eighth step.
v1.16.0 (2026-09-22): the engine and the proxy can answer on localhost only
Both listened on every interface, and the reference box shows what that was worth. Seven days of journal: 581,479 requests to the engine and 8,288 to the proxy, every single one from 127.0.0.1, while the machine was reached from a MacBook and a phone on the cockpit port alone. Two ports open to a LAN and a tailnet, used by nobody but the box itself, and they are the two SGLang dies on rather than refuses (sglang#40076, sglang#31597, both unfixed upstream, both refused at the proxy since v1.15.0). The proxy's guards protect what goes through the proxy; a port that bypasses it is a door beside the one with the lock.
ENGINE_BIND and PROXY_BIND close them:
ENGINE_BIND=127.0.0.1 PROXY_BIND=127.0.0.1 ./install.sh
The defaults do not move. Somebody else's laptop may legitimately point at either
port, and a default must never take away something the operator did not ask to lose. What
the knob buys is that an operator who wants the proxy to be the only door can have it,
and the cockpit has had COCKPIT_BIND for the same reason since v1.5.
An installed choice wins over the default, in both directions, which is the part that
matters: a box hardened to localhost that a plain ./install.sh reopened would be the
worst outcome of the three, because nobody would have a reason to look. A bad value is
refused by name before a unit is written rather than by a unit that fails to start
minutes later, on a box whose engine has just been stopped.
Ten tests hold it, and the gate added in v1.15.2 earned its place on the first try: the proxy's bind line changed shape, the banner stopped matching, and the test that keeps the three version statements together failed before the change could ship.
v1.15.4 (2026-09-22): the update check recovers from a boot, instead of sleeping through it
v1.15.3 shipped with a backoff that started at an hour, and a reboot showed why that is
the wrong number. The cockpit unit starts in the same second network-online.target does
on this hardware, so the very first probe of a fresh boot is the one most likely to find
no route. It failed, the backoff put the check to sleep, and the box sat two hours
without being able to learn that an update existed: the machine that most needs the
check is the one that just came back.
It backs off from one minute now, doubling to six hours, so a boot-time failure costs a minute. Found by rebooting and reading what the cockpit reported about itself rather than by trusting the feature that had just been tested.
v1.15.3 (2026-09-22): the cockpit tells you a newer version exists
The release check was written in v1.5 and printed its answer in a line of the Models tab that appears after a button press. It therefore reached exactly the people who already suspected there was news, and a box could sit several releases behind a fix without one sign of it on screen. The check is unchanged; what changed is that nobody has to go looking for it.
A collector asks GitHub's public releases endpoint every six hours and hands the answer
to the banner strip, where this cockpit already says the things you did not go looking
for: "Version v1.15.3 is out; this box runs v1.15.0", with the command that installs
it. The Setup tab carries the same line permanently. The other staleness a live cockpit
can have gets a banner too: a git pull under a running process leaves it serving new
HTML against old Python, and the banner names the files that moved and the one command
that fixes it.
Two decisions keep it from becoming noise. Versions are compared as numbers, because
v1.9.0 sorts after v1.15.0 as text and would announce an update eleven releases old.
And it speaks only when the published version is strictly newer than the installed
one: this repo is developed on a box that runs it, and that box is regularly ahead of the
newest tag.
It is an outbound request the operator did not type, which this project otherwise does
not make, so it is named in SECURITY.md, it carries nothing but the cockpit's version in
a User-Agent, it backs off instead of retrying when it fails, a box with no network
reads "latest release unknown" rather than an alarm, and COCKPIT_UPDATE_CHECK=0 turns
it off entirely.
Nine assertions in a headless browser hold the banners and the Setup line, including the one that matters most: an up-to-date box shows nothing.
v1.15.2 (2026-09-22): the version a running box prints, and a gate so it cannot drift again
v1.15.1 fixed one of the three places this proxy states its own version and shipped
before anyone read the other two. The deployed file said v6.20 in its history block, the
cockpit reported v6.20 from it, and the process printed v6.20... no: it printed
v6.19, from a hardcoded line 2,700 lines away, and the module docstring said v6.19
too. So a box showed one version in its journal and another in its cockpit, which is
worse than the single wrong number v1.15.1 set out to fix.
All three now say v6.20, and a test holds them together: the docstring, the startup banner and the newest history entry must agree, and the history must stay newest-first because the cockpit reads its first entry. Verified the way every gate in this repo should be: by putting the old value back and watching the test fail.
v1.15.1 (2026-09-22): the proxy's version header says what the documents say
v1.15.0 shipped ARCHITECTURE.md and docs/clients.md announcing the new refusals
"since v6.20", and the proxy's own header still read v6.19. ARCHITECTURE.md calls that
header the proxy's real version and says the cockpit reads it live, so the release
contradicted itself on the one version string a running box displays. The header now
carries a v6.20 entry naming what v6.20 is. No behaviour changes: the refusals, the
vocabulary probe and their tests are the ones v1.15.0 already shipped.
v1.15.0 (2026-09-22): typed decisions, a System One endpoint on the lane you run
TypeSafe launched Jev on 2026-09-15, a hosted model that takes a state and typed
questions (choice, score, yes/no) and returns probabilities instead of text, at
$0.042 per million input tokens. Three days of launch coverage later, its founder had
conceded on the launch thread that it is "exactly" a zero-shot classifier, the
independent evaluations put it a notch under the frontier on accuracy (67.8% against
Opus 5's 73.1% on their own workflows) and well ahead on cost and latency, and its one
load-bearing claim, calibration, had no external evidence. What it does have is a
clean contract, and a box that already runs a 27B or a 176B model can serve that
contract itself: the keepalive proxy now answers POST /v1/systemone with Jev's
wire format, from the lane behind it, with nothing sent anywhere.
How the readout works. Every question becomes one chat completion of exactly one
token. The options are named by single-token letters (the 26 capitals and 562 verified
two-letter pairs; tokenizer.json blob 0997f410c57a1f4e, byte-identical on both
lanes, every label one id that survives the \n\n the chat template ends on), the
engine returns top_logprobs for the answer slot, and the probability of each letter
is the probability of its option, renormalized. Thinking is off through the template.
Nothing is generated and nothing is parsed. The state is the byte-identical prefix of
every branch, which is what the radix cache reuses; every branch goes out at once (a
send of the first branch alone, meant to warm the cache, was measured slower on this
engine and is off). Question ids never reach the model: Jev does not send them either,
and a key like refund_requested would leak the asker's expectation.
Why top_logprobs on /v1/chat/completions and never token_ids_logprob on
/generate. The obvious path, the one ekzhang/openjev-sglang takes, asks the engine
for the logprobs of specific token ids. On the served build (nightly 4ccff141d,
2026-09-07) get_token_ids_logprobs_raw appends a bare [] for a co-batched request
that asked for nothing (logprob_processor.py:144-146) and batch_result_processor.py
calls .tolist() on every entry (419-422, 950-952; the 27B lane's official 0.5.19
carries the same two at 489-498 and 1044-1054): the first batch that mixes one
scoring request with one ordinary chat request kills the scheduler (sglang#34719; the
guard in #35052 is still open). The top-k arm slices a tensor for every request, an
empty tensor at k=0 (logprob_processor.py:102-105), and survives the mix. A dedicated
deployment can make every request ask for logprobs and dodge this; a shared lane mixes
on every step, so this proxy takes the only path that is safe on it. Read in the
container's own source, not reproduced on the production engine.
What is the hosted API's, to the digit, and how that was learned. The docs say the
confidence is a normalized entropy, and their two worked examples fit it. The live
jev-1.13.0 does not: 166 (probabilities, confidence) pairs collected on 2026-09-18
with a real key say that a Choice's confidence is (p_max * N - 1) / (N - 1) (46 pairs
within 0.018) and a Score's is 1 - N * MAD_mode / floor(N^2 / 4) (120 pairs within
0.030, the residual being the two-decimal rounding of the published probabilities).
Those pages were written for jev-1.12; the proxy implements what the live model
returns. Also read off the live model, and worth knowing before comparing: its
probabilities are sample frequencies (ten identical calls moved one option by a
standard deviation of 0.014 to 0.027, a score by 0.025, a noul by 0.005), it spends
17 plus about 7 output tokens per option of a Choice inside (2,412 output tokens for
255 options, latency flat at 0.6 s), and it accepted every shape the docs promise.
This readout is a softmax and spends one token per question whatever the option count;
it does not repeat to the digit on this engine, whose kernels depend on batch
composition (LEAN.md): the figures are in BENCHMARKS.md.
The SDK works unchanged. Jev's three aliases resolve to the served model and the
response names it; typesafe-sdk 0.7.0 round-trips against the proxy in the test suite,
and CI installs the SDK so that round trip runs there too. Choice takes Jev's 255 options
(asked for 255 top_logprobs, the served build returned 255, and for 261 it returned 261),
Score takes one to ten levels because the live API answers a one-level Score, GET /v1/models keeps the OpenAI shape opencode and bench.sh read, so models.list() is the
one SDK call that does not translate.
A path is read once, and the way the engine reads it. Pre-existing, found by a review
of this branch and fixed here: every check in the proxy matched the raw request path with
startswith("/v1/"), while SGLang decodes percent-escapes before it routes. POST /%76%31/chat/completions therefore walked past the per-client identity wall AND past the
oversize guard, and the proxy attached the engine's own key to it: an unauthenticated
caller could reach the engine, and a 900 kB prompt could reach the scheduler that a guard
exists to keep it away from (sglang#36333, restart-only cure). The path is now decoded
once, before anything reads it, and the decoded path is what goes upstream: what was
checked is what is sent. A path that hides a query separator (%3F) is refused rather
than guessed at. tests/test_proxy_client_keys.py holds both, and both fail on the old
line.
The state is fenced. The state is third-party text by design, and it used to sit
between markers it could type itself: a state carrying its own QUESTION / OPTIONS /
"Reply with the label" block produced a branch with two of each, the attacker's first and
byte-identical to the proxy's framing. It is now wrapped in a token drawn at start-up,
which a caller cannot close from inside, and the system turn names that fence. One token
per process, not per call, so the shared prefix every branch reuses in the radix cache
stays shared. The benchmark grew six structural injections to measure it (BENCHMARKS.md,
"Instructions hidden in the state").
A caller that leaves takes its work with it. The SDK's default timeout is 10 s and a
cold fan-out on a large state takes longer, so an abandoned call is the ordinary case, not
the rare one. Every branch now carries an x-override-rid the proxy imposes before the
request exists engine-side (a rid learned later names nothing once a disconnect has
deleted the state, sglang#35255), the handler watches the caller's socket, and at EOF it
stops the fan-out, POSTs /abort_request for the branches in flight and gives the
admission slot back at once. The outcome is CLIENT GONE mid-systemone, which the
cockpit already reads as the client leaving rather than a fault.
Four levers, off by default, decided by the benchmark. SYSTEMONE_PERMUTATIONS=2
asks every question in the given and the reversed option order and averages (a letter
readout prefers some positions); SYSTEMONE_TEMPERATURE scales the label logits;
SYSTEMONE_MIN_LABEL_MASS refuses a question whose first-token probability mostly
missed the labels, which is what TypeSafe's CEO said a masked readout should do
("if ever a model was assigning probability to an invalid token, the model is by
definition confused. you'd be better off erroring"); SYSTEMONE_THINK_TOKENS=N lets
the model think first, stopped at the end of the thought or at N tokens, then reads
the label off the continued turn (two requests per branch, the second served from the
cache up to the end of the thought), the one lever that trades System One's latency
for accuracy where a single forward pass cannot settle the question. The share that
landed on a label is always reported in x-systemone-label-mass.
A door sized by measurement. SYSTEMONE_MAX_CALLS (8) calls in progress and
SYSTEMONE_MAX_INFLIGHT (8) engine requests behind them; the next caller gets the hosted
API's own 529 with Retry-After, which its SDK retries. The two numbers are a curve, not
a guess: 32 clients in a closed loop against the 27B lane at four settings, one bystander
streaming an ordinary completion the whole time. The rate is flat near one answer a second
at every setting (the engine is the bottleneck), so the door only decides who waits where.
At 32 calls and 16 slots every call was answered and the median one took 28.3 s, while the
bystander's 120 tokens went from 4.6 s to 57.0 s; at 8 and 8 the median call came back in
3.8 s, callers were told to come back 1,440 times in two minutes, and nothing failed.
The refusals are the hosted ones now, case by case. Fifty malformed and edge requests
were sent to api.typesafe.ai and to this proxy, the same bytes: 50 of 50 the same status,
the same envelope (422 with a detail list naming the path, 400 for what parses and cannot
be served) and the same path where there is one. Six behaviours changed to get there. An
unknown model name is refused instead of being answered by the local lane ("Unknown model:
jev-9", as there, while the lane's own name is served as itself); a Noul with neither
instructions nor criteria, an empty question id and an unknown field at the top level are
refused; and four shapes that the hosted API answers and this proxy used to refuse are
answered: a Choice with one option, a Score with one level, a Noul with a stray criteria
key, an option named "". The question cap became 1,024 (the hosted API took 300 questions
in one call, so this one does too: 13.5 s for 300 nouls, one engine call each).
Measured, same payloads to this box and to the hosted Jev (bench-systemone.py,
BENCHMARKS.md "Typed decisions"): on
TypeSafe's own 20 public cases (408 questions, references from GPT-6 Astra and Claude Fable 5.1)
the 27B lane with two option orders scores 92.9% against the hosted model's 93.2%, and the same
raw readout run twice scored 90.6% and 90.9%, which is the noise floor of that comparison; on BoolQ
(3,270) 89.3% against 91.9% with a better calibration (ECE 1.2% against 2.4%); on MMLU-Pro
(1,000, the same rows as ekzhang's run) 62.1% against 83.8%, the gap that a single forward pass
of a 27B cannot close on calculation; in French 71.4% against 78.2% (XNLI) and 74.6% against
87.4% (MMMLU). A single question answers in 0.2 s warm at any state size, 13 in about a second.
The raw readout is over-confident by 3.5 to 16 points; the two-order lever removes it where
position bias lives (BoolQ +2.6 points and ECE 4.7% to 1.2%, MMLU-Pro +4.0 points and 8.3% to
4.2%) and a fitted temperature does the rest. The thinking budget (SYSTEMONE_THINK_TOKENS=1024) on the first 200
MMLU-Pro rows: 80.0% against the hosted 84.0% on the same rows (the difference's interval
holds zero) and 57.5% raw, at 8.8 s a question. The warm-first send the draft shipped with
lost every cold and warm comparison (14.9 s against 5.4 s for 13 questions on a never-seen
10,800-token state) and is off by default, SYSTEMONE_WARM_CHARS=0. Repeatability at
concurrency 1: an uncertain yes/no moves by a standard deviation of up to 0.11 between
identical calls, a settled one by under 0.01; this engine's kernels are not batch-invariant.
Every number, protocol and trap is in BENCHMARKS.md, "Typed decisions".
What else the review changed. Ten smaller defects, each with a test that fails on the
old line: a NaN or Infinity logprob used to come back inside a 200 whose body no
parser but Python's accepts, and is now dropped (a logprob a hair above zero is read as
certainty rather than junk); SYSTEMONE_TEMPERATURE=0, the usual "greedy" idiom, was a
divisor and answered every call with a dropped socket, and a temperature outside 0.05 to
20 is now refused at start-up with the readout left raw; a branch that waited out its
timeout was reported as an unreachable engine AND dropped the cached KV pool, which made
the relay path refuse unrelated large prompts with "the engine restarted", and is now a
502 that says the engine is busy; the top-k margin collapsed above 58 options, so at
Jev's 255 a variant token could displace a real label and publish it as a probability of
exactly 0.0, and the margin is now added at every count; a question whose labels took no
probability at all used to 502 the whole call, discarding every other answer and the
prefill with them, and is asked once more with a 256-wide top-k first; the reversed
presentation of a Score carried the line "ordered from the lowest level to the highest"
over a list that ran the other way; the plan held one copy of the state per question,
which at this endpoint's own caps is gigabytes on a box whose documented failure mode is a
memory livelock, and branches now carry their own tail only; a lane that could not name
itself answered with the caller's alias as the model name, and now waits; an exception
inside the handler dropped the connection with no status line at all, and is a 500 that
says so; and this suite left UPSTREAM, SYSTEMONE_WARM_CHARS and
QWEN38_CLIENT_KEYS_FILE changed in the interpreter every other suite runs in.
bench-systemone.py also stopped writing an experiment's rows into the baseline's file
(a resumed run then found every id done and sent nothing), gave each agreement column its
own denominator, clamped a server's Retry-After to a minute, and prints the size of the
filler it actually sent rather than the size it asked for.
A second audit, 2026-09-21, found the request that ends the engine, and it is not this
endpoint's. Reading logprobs is what this route does, so the audit went looking at what
else can ask for them. OpenAI documents top_logprobs as "an integer between 0 and 20";
SGLang declares it Optional[int] with no constraint, and the number reaches
logprobs.topk(max_k, dim=-1) unexamined. Past the vocabulary that raises selected index k out of range inside the scheduler, and the engine is gone for every client
(sglang#40076, opened 2026-09-18, still open; the field is unbounded in the served
v0.5.19, checked in the image, and the same RuntimeError reproduces in two lines of
torch). It was then reproduced the hard way on the reference box, by relaying one such
request by accident: the scheduler died and systemd spent nine minutes bringing the lane
back. So the proxy refuses it, above TOP_LOGPROBS_CEILING (1,024), on the three
relayed routes that carry the number under three names: top_logprobs on
/v1/chat/completions, logprobs on /v1/completions, top_logprobs_num on
/generate, the last element by element when a batch sends a list. It refuses rather
than lowering the number, because a narrowed top-k answers a question nobody asked. The
ceiling is not the vocabulary, which the engine publishes nowhere: no vocabulary in use
is under 32k, this readout asks 261 with its shipped caps and 594 at the widest an operator
can set it, OpenAI's maximum is 20. This is the
proxy's second guard of that kind, next to the prompt past the pool (sglang#36333), and
it protects every client of the box, not this route. Eleven tests in
tests/test_proxy_guard.py, one of them end to end on the refusal the engine never sees.
Two defects of this route's own, from the same audit. The retry that asks a second, wider
time (SYSTEMONE_RETRY_TOP_K) went straight to the engine without passing the door that
now refuses everyone else, so an operator's number could take the lane down through this
proxy's own code; and it ignored SYSTEMONE_TOP_K_MAX, the clamp an operator sets
precisely because their build refuses a wide top-k, which the first ask honoured and the
retry walked past. Both bounded, three tests. And one trap written down rather than
fixed, because the code was already right and nothing said why: on the speculative path
this lane runs, the engine divides the logprobs it returns by the request's temperature
(compute_spec_logprobs), and on the ordinary path it does not. Only the 1.0 this route
sends makes the two agree, which is why SYSTEMONE_TEMPERATURE is applied to the
probabilities after they come back and must never be moved into the request. A test now
fails if it is.
What now holds the line. tests/test_proxy_systemone.py: 82 tests against a fake
engine with scripted first-token distributions (the Jev shape key by key and in the
hosted key order, the readout over the right tokens and never the wrong ones, never a
token_ids_logprob in any body, both refusal shapes with the path each one names and
the live cases behind them, the edge of every cap and floor, a newline in a request
that cannot forge a line in the log, the oversize guard on the longest branch, a dead
engine as the relay path's 503 and never a size refusal, the label list re-checked
against the local tokenizer, the four levers, the door, the SDK round trip when it is
importable); dashboard/tests/test_lifecycle.py holds four new members of the closed
outcome vocabulary; every existing proxy suite is unchanged and green; ruff F,E9
clean; keepalive-proxy.py at 83% branch coverage against a floor raised from 74 to 82.
Every checkpoint this repo can serve was checked, not two. The label table rests on
the tokenizer being the same file everywhere, and that was verified on the RadixArk 27B
and flash checkpoints. It holds on all seven targets: tokenizer.json is byte-identical
across RadixArk 27B (both pinned revisions), RadixArk and NVIDIA flash, stock Qwen FP8
and the three abliterated builds (sha256 0997f410c57a1f4e…), and so is the chat
template that ends the generation prompt on the \n\n the readout depends on
(c3cf9e34abf4f9e3…, the same file in all eight). A switch to any target keeps the
readout exactly as measured.
v1.14.2 (2026-09-19): the docs reorganised, and the numbers in them checked against the record
The README had grown to 1,045 lines and was the only door to all of it. It is 509
now, and it is an entry point: what this is, the seven targets with their measured
headline, how to install it, what speed and quality to expect, the targets and the
switch, the tools, the cockpit in short, and an index table naming every other file
and what it answers. Seven sections moved out whole, each to its own file under
docs/, each leaving a summary and a link behind: the 1M context mode, the flash
lane, the cockpit tour, operations and upgrades, the opencode integration, the GB10
memory trap in full, and where each lane stands against upstream.
Nothing was dropped. The split was checked line by line against the file it came from: of 1,045 lines, the only ones that do not appear verbatim in the new README or in one of those files are the ten that were rewritten on purpose, and the rewrites are the point:
- the headline said 65 tok/s for the 27B lane, which was the v1.9 figure. v1.14.0 measured 71.4 on the release image this lane has served since 2026-09-17, in the same campaign that measured 69.8 on the image it replaced. The title, the target table and the speed section now say 71.4 and name the campaign for each number they carry.
- the memory section read as though the installed fraction were 0.50, which is the
native-mode and
./run.shvalue. The 1m mode has been the default since v1.12.1 and runs 0.76. Both are stated, each with its mode. - two citations pointed at text that was not there: the README claimed a flat-memory
result was "quoted elsewhere in this README" when it lives in BENCHMARKS.md, and
keepalive-proxy.pyjustified its 92% usable share by quoting a README line about a 178,560-token pool that no longer exists anywhere. Both now name where the number actually is. Neither was caused by this release; both survived because nothing checks a quoted section title. - the flash lane's quality is now in the README as measured rather than as adjectives: GSM8K 97.41% over all 1,319 questions, MMLU 500 at 90.8%, HumanEval 164 pass@1 at 95.73%, tool calling 15/15 with reasoning off and on, needle 2/2 at 120K and 200K.
evals/, because two of those numbers could not be reproduced from this repo.
The drivers for MMLU and HumanEval now ship with the README that explains why they
exist: the image's run_eval --eval-name mmlu shells out to an sgl-eval binary it
does not ship, and its HumanEval path needs a package that is not there and then dies
in os.fork against the image's filelock. Six gates hold what makes them work, with
a stub sglang and no network: the score line a caller greps, the dataset MMLU is
measured against, spawn rather than fork, and one sample per task instead of the
harness default of five, which at temperature 0 is the same answer five times.
ARCHITECTURE.md gains the two directories it did not describe (docs/, evals/) and
tools-check.py in its table of instruments. TESTING.md gains a 2026-09-19 column
counted mechanically on both commits: 34 test files against 20, 587 test functions
against 442, 55 CI steps against 38. The flash lane's doc records the one boot in
thirteen that died at CUDA graph capture on 2026-09-18, because a failure that costs
twelve minutes and explains nothing belongs written down even when it happened once.
A warning that argued with its own numbers. The keepalive proxy's one-prompt ceiling follows the lane: 250,000 tokens on
flash, none on the 27B (switch-model.sh, the v1.5.6 contract). A sequence that
switches the target to flash and then starts the 27B leaves those two halves
disagreeing, with the flash ceiling on the proxy and the 27B serving, so
opencode's fitted 548,000 context can no longer be relayed and a session would
break mid-conversation. The cockpit caught exactly that, which is what it is for.
Then it printed the wrong pair. The banner showed 730,000 asked, 827,968 servable, which is the worst case against the pool, under a headline saying the
ask was too large: two numbers that say it fits, under a sentence saying it does
not. A warning that argues with itself reads as a bug in the cockpit, which is
how a real misconfiguration survives someone looking straight at it.
The verdict is now one function, fit_verdict, that returns the pair it judged
on, and the banner prints that pair: 548,000 asked against 250,000 on qwen3.8-27b. Four gates in dashboard/tests/test_cockpit_collectors.py, the
last of them the invariant the screenshot broke, over a grid of contexts,
outputs, pools and ceilings: when the verdict is not ok, asked is greater than
limit. The previous behaviour fails 40 of those cases.
v1.14.1 (2026-09-18): the two flash exports measured against each other, and the NVIDIA one downloads
RadixArk against NVIDIA, probe for probe on one box. flash and
flash-nvda are two NVFP4 exports of the same 176B checkpoint, and the second
is the one people assume is better calibrated because of whose name is on it.
Measured: one lane, the same unit, only the target swapped, first run after every
boot thrown away. Greedy median 46.3 against 46.9 tok/s, agent loop 28.2 against
27.7 ms/tok, GSM8K over all 1,319 questions 97.41% against 97.56%, MMLU 500
90.8% against 90.6% (identical to the digit on the STEM split), HumanEval 164
pass@1 95.73% against 96.95%, tool calling 15/15 and 15/15 against 15/15 and
14/15, conc-check clean and needle exact at 120K and 200K on both. Every gap
on quality is worth one or two questions, under the standard error of its own
sample. The files say why: their N-gram tables are the same bytes (all 129
tensors match on dtype, shape, exact length and the sha256 of the first and last
64 MiB of every one of the 128 shards), while their expert quantizations are
independently calibrated and their MTP heads are different objects (2 fused
tensors against 3,072 FP8 block-scaled ones).
One measurement is not a tie, and it is not the one the cookbook advertises: the
KV pool. Six RadixArk boots that day gave 517,184 to 566,016 tokens against 482,560
to 510,592 on five NVIDIA ones, ranges that do not overlap (6,592 tokens apart at
their closest, 9.6% apart on the means). NVIDIA's
smaller fp8 draft is exactly what its 174K against 93K comparison upstream is
credited to, and on this lane, which already removes the draft's disadvantage
with --speculative-token-map, it does not turn into a larger pool. So flash
stays the lane default, on the only number outside the noise, and flash-nvda
stays a first-class target that now downloads with the same command as the rest.
Full method and numbers in BENCHMARKS.md, "RadixArk against NVIDIA, head to head".
Two of those measurements needed the harness repaired before they meant
anything. The image's run_eval --eval-name mmlu shells out to an sgl-eval
binary it does not ship (sgl-project/sgl-eval, first on PyPI 2026-09-12), and
its HumanEval path needs a human_eval package that is not there either, then
dies in os.fork because the image's filelock refuses one. Both evals had been
logging an empty score, which reads exactly like a model that scored nothing.
flash-nvda could not be fetched with this repo's own settings. Both
downloaders disable the Hub's Xet backend, for a measured reason: during the
release campaign it moved 0-8 MB/s, sometimes zero bytes forever, while the
classic CDN did 89 MB/s on the same box in the same second. The classic CDN in
turn refuses any single file over MAX_HTTP_DOWNLOAD_SIZE, which is exactly
50,000,000,000 bytes, and nvidia/Qwen3.8-Flash-Next-NVFP4 ships its N-gram
table as one 53.7 GB safetensors. The two rules met on 2026-09-18: the resume
loop retried the refusal four times and the run died, over a traceback that did
name hf_xet, under a failure message listing four causes that were all the
wrong one, with 74 GB of the target's 124 left in cache.
Both downloaders now turn Xet back on for the one repo the CDN just refused,
then turn it off again, so every other file keeps the transport that measured
89 MB/s. Six gates in tests/test_install_xet_retry.py run the real block out
of both scripts against a stub Hub: they check that the retry happens, that it
does not fire on unrelated failures, that Xet does not leak into the next repo
of the same run, that an undownloadable repo still fails instead of looping, and
that install.sh and switch-model.sh carry the same helper. Four of the six
fail against the code without the fix.
One test file was deciding what another one measured. test_tools.py points
HOME at a throwaway directory because the scripts it imports read the serving key
at module level. It did that at module level too, and unittest imports every
module of a run before executing any of them, so the assignment reached files
that run long before it. test_install_sudo replays install.sh for real, and
install.sh sizes its disk preflight from whether the checkpoints are cached
(10 GB when they are, 230 GB when they are not): under the borrowed HOME it saw
an empty cache, died at step 1 for lack of space, and reported that as a failure
of the step 8 refusal it never reached. It only showed in full-suite runs on a
box that has the cache, which is how a real ordering bug gets called a flake.
HOME is now borrowed for the import and given straight back, and
tests/test_suite_isolation.py fails if any file in tests/ moves it, at import
or on the way out. Also: bench-agent.py, conc-check.py, build-token-map.py
and tools-check.py were in neither CI python list, so four of this repo's tools
were never linted or byte-compiled by a build. They are now.
tools-check.py: can an agent execute what a checkpoint emits? Fifteen cases
through this repo's serving surface, scored in four buckets that fail for
different reasons and need different repairs: called, well formed,
arguments, restraint. The split matters because a model that emits
nothing is inert, while a model whose call the tool parser cannot turn into
tool_calls looks to a client like a plain answer full of JSON, which it hands
back to the user. The argument cases sit where a re-export degrades first: an
escaped newline inside a JSON string, an apostrophe inside SQL, a date
normalized to the schema's format, an enum spelled the schema's way, a nested
object, an optional argument that must stay absent. Seven gates drive a fake
engine through each of those failure shapes, including the happy path, so a
probe that scored nothing could not pass them.
v1.14.0 (2026-09-17): the 27B lane serves the official image, and the overlay is gone
Both serving lanes now run an image this repo did not build. The 27B lane was the last holdout: since v1.2 it served the 2026-08-15 base with eight sha256-verified files copied on top, for two reasons that were finally checked instead of restated.
- The overlay carried nothing upstream lacks. Diffed file by file against
v0.5.19: not one function of it is missing there, and upstream carries about
ten this box never had (the DFlash renorm kernels,
_accept_block, the draft cell sizing,table_qk_norm_rope_, the Nemotron-35 draft). The one function that looked unique,_maybe_autodisable_shared_experts_fusion, is upstream as_qwen3_5_shared_experts_fusion_disable_reason, resolved before any layer is built and applied to all four entry classes. Five of the differences infused_qk_rmsnorm_rope_gate.pyare em dashes in comments. - The mrope fix is in the release. sglang#34446 merged 2026-08-30, v0.5.19
was built 2026-09-04: checked inside the image, its
fused_qk_rmsnorm_rope_gate.pycarriesmrope_axis_map, so the failure mode that kept this lane back (image tokens rotated as if they sat at their temporal position on all three axes) is not there. - The sm_121 objection was never a departure. v0.5.19 reports
arch_listup to sm_120 and shipssgl_kernelfor sm90 and sm100 only, which is true, and the image this lane served before it does exactly the same, byte for byte (15301320 and 14711496). GB10 loads the sm100 cubin either way. Neither image has a tuned sm_121 path; this one is no worse.
Measured on the box, same flags, same probes, one after the other. Greedy
median 71.4 tok/s against 69.8, acceptance 4.29 against 4.09, conc-check 40/40
serial and 160/160 at concurrency 8 on both (this is where sglang#36548 would
show), needle retrieval exact at 300,108 prompt tokens on both. The release is
behind on one number: 514 s against 493 s for that long prefill.
- The memory fraction moves from 0.70 to 0.76, and the number is the image's.
At an identical 0.70 the official image sized a 770,118-token pool against
906,524, while leaving 29.89 GB of GPU memory unused against 19.38: it was
never short of memory, it just did not claim it. 0.76 hands the pool back
(902,398, inside the 906,524-910,203 this box spreads across boots on one
image) and still leaves a wider margin than the old pin did, 21.30 GB against
19.38. What bounds the fraction is the unified pool and not the container:
--memory 100gcaps host RSS, the cgroup does not see CUDA unified allocations, and at 0.76 under a 5,623-token generation the container held 7.15 GiB of its 100 GiB throughout (measured 2026-09-18, after an earlier entry in this branch read a GPU-side figure as a cgroup one). - Verified on the production unit after the switch: greedy median 72.0 tok/s,
conc-check40/40 serial and 160/160 at concurrency 8, needle retrieval exact at 300,108 and 499,874 prompt tokens (512 s and 1,249 s), GSM8K 98.5% on 200 questions (sglang.test.run_eval, 5-shot, greedy). The pool comes up at 889,131 there, about 2% under the old image and at the low end of this box's own spread, with 21.34 GB of GPU memory free against 19.38. The GSM8K figure has no counterpart on the old image: it was measured after the switch, so it stands as an absolute, not as a comparison. The A/B on correctness isconc-check, which was perfect on both. dflash2/is deleted, with its build step, itsOVERLAY_27Bswitch and its CI integrity gate.flash-sglang/stays: it is still that lane's rollback. The 27B rollback isgit checkout v1.13.0 && ./install.sh, which rebuilds the overlay from that tag.SERVE_IMAGE=qwen38-dflash2:v1.2.3 ./install.shalso serves it on a box that still holds the tag, but at HEAD the files that build it are gone, so it is not a path that survives adocker rmior a fresh machine.- Gates updated with the change, not around it: the 1m template fraction, the
anti-drift pair, the run.sh and switch-model.sh pin contracts (19 and 17), the
uninstall inventory (which now knows both the new digest and the retired one),
and the cockpit recipe tests. The socket-leak gate was briefly relaxed during
this work to stop it tripping on an engine that finished booting mid-suite,
and then restored: that flake only happens to
ci-local.shrun ON a serving box, the CI runner never holds those ports, and CONTRIBUTING and ARCHITECTURE both state the invariant it was about to lose. The failure message names the local cause instead.
v1.13.0 (2026-09-15): lean, a fourth reasoning-effort level, and it is the default
Qwen3.8-27B defaults to xhigh, the most expensive of its three levels, and the
levels are not modes: they are three sentences the chat template prepends to the
system message, measurable as 42, 30 and 0 tokens of prompt. That is the whole
mechanism, which is what makes it addressable with words.
Measured here on 7,008 runs, the shipped default is not only slower, it is
worse. On 364 public problems (HumanEval 164 with the dataset's tests executed,
GSM8K 200 on the exact final number) xhigh costs 3.19x the thinking tokens
of medium [2.73, 3.69] and scores 2.2 points lower on a paired McNemar test
(p=0.057); on HumanEval alone it is 4.3 points lower at p=0.039, and five of its
ten failures there are truncations, where it spent the whole 16,000-token budget
thinking and returned nothing. low, the fix the community recommends, loses
significantly (p=0.021) for an 11% saving.
lean: 74 words, added as a fourth level and made the default. On the same 364 problems it costs 0.71x the thinking tokens ofmedium[0.66, 0.77] with no detectable quality change (-1.1 points, p=0.344). On 58 deliberately underspecified requests, the shape that makes this model spiral, it costs 0.436x ofmedium[0.40, 0.47] and 0.047x ofxhigh[0.04, 0.06] while producing 17.2 points more usable answers thanxhigh[+10.9, +24.1], with zero empty answers and zero truncations against 6.9% and 10.3%. Live check on one request: 990 tokens and 19.0 s against 9,084 and 190.9 s.- Qwen's three levels come out byte-identical. Ask for
mediumand you get Qwen'smedium. A repo that quietly redefines a standard level makes every number measured with it incomparable with everyone else's. LEAN_DEFAULT=0 ./install.shinstalls the level without taking the default.- Proxy v6.18: SGLang validates
reasoning_effortat the API boundary against an enum compiled into its own request model, so a level the chat template understands is refused before the template runs. The same value insidechat_template_kwargsis not validated and reaches it, which is the door opencode happens to use. The proxy now moves a level SGLang refuses into that field, and touches nothing in SGLang's own enum. - The level reaches the config opencode actually reads.
install.shwrites a complete config intoCONFIG_DIR, but only merged limits into the operator's own file, so a new level appeared everywhere except where it could be selected.oc-merge-limits.py --add-variantcloses that.
LEAN.md carries the method, the pre-registered falsification
criteria, the three-state functional scoring (a component whose code is run,
with "not checkable" kept separate from "broken"), the fairness replay that
tripled the token cap to show the truncations were not an artefact, and the
things that did not work: an expert persona (no gain, and twice the tokens used
alone), a decisiveness instruction (nothing left to remove, lean already sits
at 0.00 backtracking markers per thousand), Chain of Draft (cheapest, and it
loses quality), and four candidates designed from an error analysis that all
cost tokens and gained nothing. It also states what was prepared and not run: a
557-problem held-out set with an identical-twin null control.
v1.12.1 (2026-09-14): the 1M window by default, and a cockpit that can actually switch
v1.12.0 made the one-liner install the whole box. It still installed the wrong
box: 262,144 tokens, with the 1,010,000-token window this stack is built
around sitting behind CONTEXT_MODE=1m, an env var documented in a section of
a README that a first install has no reason to have read. A headline feature
that has to be asked for by name is off for almost everybody.
-
CONTEXT_MODEunset now means1mon the 27B lane: YaRN static scaling into both cached configs,--context-length 1010000,mem-fraction-static0.70, the keepalive proxy that was already installed.CONTEXT_MODE=nativeis the opt-out. -
The paths that cannot serve it fall back in silence. The flash lane serves its own native 262,144 window and
--no-servicehas no proxy service, and both used to refuseCONTEXT_MODE=1mby name. A refusal is right for a value the operator typed and wrong for a default they did not, so the default is now resolved after the flags are parsed, where the lane and--no-serviceare both known, instead of at the top of the file where neither is. -
Convergence gained its other direction. Only the 1m case was converged before (nothing could downgrade a 1m box), which was enough while the default was native. With the default flipped, a plain re-run on a box installed native would have patched YaRN into its cached configs and moved its memory fraction. An installed choice now wins over the default both ways, and says which one it kept.
-
The 1m limits are fitted to the real pool at the end of the install. The static 1m limits overshoot the measured 863,398-token floor, so on an unlucky boot a long session meets the proxy's refusal mid-conversation. Running
oc-fit-limits.pyafterwards was a documented manual step, which is acceptable for an opt-in mode and not for the default;install.shnow runs it itself once the engine answers. -
The cockpit could not write a unit file, and the gate said it could.
ProtectSystem=fullgives the dashboard unit a mount namespace with/etcbound read-only, and sudo does not leave a mount namespace: root inside it cannot write to a read-only mount either. The exact-argv sudoers allowlist authorised every write the Switch button makes, and every one of them failed with "Read-only file system" the moment it touched a file rather than callingsystemctl(which is done by PID 1, outside the namespace, and always worked). A CI gate assertedReadWritePaths=/etc/systemd/systemwas ABSENT, under the comment "cockpit only reads there", so the design read as complete. Found on the reference box, 2026-09-14: a switch to the flash lane disabled the 27B unit, then died creating the keepalive ceiling drop-in, leaving one lane disabled and the other enabled but not serving. The unit now carves/etc/systemd/systemback out of the protection, which changes nothing about who may write there (the cockpit runs unprivileged, file permissions are unchanged, the allowlist is still the only way in) and stops the namespace from vetoing writes the allowlist already permits. The gate is inverted and gained a second half: every/etcpathswitch-model.shwrites must be inside one of the unit'sReadWritePaths, or the button cannot do its job. Both halves negative-controlled.
tests/test_install_context_mode.py holds all four, including the fresh-box
default, which is invisible on any machine that already has a unit (correctly:
convergence wins there) and is tested against a copy of the installer whose
unit paths point at an empty directory, with the rewrite itself asserted so a
rename upstream fails loudly instead of silently testing /etc again.
v1.12.0 (2026-09-14): one command, and the thing you open
Two failures with the same root: an installer that finishes is not the same as a box you can use. The one-liner left an engine and an API port, and left the cockpit, which is the whole point of the last four releases, behind a second command in a README nobody reads after a 30 GB download. And it accepted being run as root, which on the reference box on 2026-09-13 produced the worst outcome this stack has ever produced: a silent success into the wrong home.
curl .../get.sh | sudo bash cloned into /root, wrote /root/.config/qwen38
with a brand new API key, rendered both units as User=root pointing at it,
started the engine, passed its own generation smoke test and reported success.
Every client on the box then got 401 from an engine that was healthy, serving
and green in every check, because they all read ~/.config/qwen38/api-key.
Nothing failed, so nothing could be read from a log; it took the sudo audit
trail to see what had happened. A wall that only exists in a README is not a
wall.
- Neither entry point installs as root.
get.shrefuses before it clones,install.shrefuses before it writes, and the refusal knows which mistake was made: withSUDO_USERset it names the login, the API key path that would stop working and the command that works, with no override, because there is always a right answer (drop the sudo). A genuine root login is merely unusual: refused by default,ALLOW_ROOT=1gets through. - The cockpit ships with a plain install, as step 10/10, after the engine has answered a real generation, so the page it opens on is a working box. The Agent tab comes with it when opencode is on the PATH, and is skipped with a note when it is not: a missing tab never fails an install. A cockpit that fails to install never fails an engine that is already serving.
- The installer ends on the cockpit URL, read back from the installed unit rather than assumed, with a wildcard bind turned into an address you can actually type. The raw endpoints moved below it: they are what you use when you are not using the cockpit, not the headline.
- On a first install the cockpit binds the box's tailnet address when it
has one, loopback otherwise. A re-run passes nothing and converges on the
installed unit, so an upgrade still cannot flip a reachable cockpit back to
loopback.
--no-cockpitopts out and the choice persists in a marker file,~/.config/qwen38/cockpit.off, the way the opencode choice does.
Three bugs the new tests found while they were being written, each of them the same shape as the release itself, a guard that could not survive its own path:
- The sudo refusal died before printing.
getent passwdexits 2 on an unknown user and, underset -ewithpipefail, that killed the very refusal that was looking the user up: the operator got "Install failed at line 36" instead of the message. Third time a refusal in this file has been lost that way, second time it shipped. - Four tracked test files were run by no CI step at all:
test_install_preflight.py,test_install_sudo.py,test_proxy_tls.pyandtest_uninstall_inventory.py. Gate 8 counts declared against ran, but only fordashboard/tests;tests/had a hand-kept list of named steps and four files had fallen off it. They all pass, which is not the point: a test nobody runs reads as coverage. test_install_sudo.pydeclared two tests and ran zero wherever it skipped, which is every GitHub runner: aSkipTestraised fromsetUpClassis reported as one skip withtestsRun0. Skipping with a class decorator counts each test. Found by the new gate, on its first run.
The new gate, No test file in tests/ is left unrun, closes the class: the
unittest modules are discovered rather than listed, the script-style files
(the fake engines for bench.sh, needle.sh and the tools) must each be named
by a step, declared must equal ran in aggregate and per file, and both halves
were negative-controlled against a file that declares tests without running
them and a script file no step names.
v1.11.1 (2026-09-13): the identity wall learns admission
A one-fix patch, and an honest one: v6.16's per-client identity named every
labeled client and admitted none. The client's bearer went upstream verbatim
and met the engine's own --api-key there, so each identified request died
with the engine's 401 past a wall that had correctly identified it. No test
caught it because every fake engine in the suite lets everything through;
the reference box caught it, on its real engine, the day v1.11 landed there.
That biography is the whole argument for the fix carrying its own enforcing
fake engine: the admission scenarios below exist so this exact hole cannot
reopen unnoticed.
- Proxy v6.17:
QWEN38_UPSTREAM_API_KEYnames the engine's key to the proxy. When both halves are set, the client's bearer names them on the journal line and the engine's key admits them upstream, on relays and on abort calls alike (the abort path had the same verbatim habit). Without the upstream key the old verbatim behavior stays, for an engine with no key check of its own or one shared key on purpose, and the startup banner warns loudly about the combination.docs/clients.mdnow teaches the two-key model instead of the one-key story v1.11 shipped. - Three new admission tests (substitution observed engine-side, verbatim pinned as the documented fallback, upstream key dormant with the wall off); root proxy coverage 78% over its 74% floor.
- Deploys onto a running box with a keepalive-proxy restart only: no engine restart, no re-install, the drift panel has nothing to say about it.
v1.11 (2026-09-13): the walls this box kept being built around, built in and fail-closed
A serving stack that stays a weekend project grows walls in front of it: someone's nginx for TLS, someone's sidecar for "which laptop sent this", someone's Prometheus exporter. This release moves the three that keep coming into the stack itself, opt-in, each one designed so the loopback-and-tailnet default does not notice, and none of them allowed to half-exist: a wall that vanished silently is worse than no wall, the sentence this version turns into code. It is also the release where the repo starts behaving like the years-long project it claims to be: the governance documents, the daily supply-chain alarm, and the releases that had stopped being tagged are all caught up.
- Proxy v6.16, TLS: name
QWEN38_TLS_CERT(andQWEN38_TLS_KEYwhen the key is a separate file) and the socket speaks the operator's certificate, TLS 1.2 floor, and the unit refuses to start rather than bind plain beside the promise of TLS. Unset, the socket is byte-for-byte what it was: this feature must not be able to change a loopback box.tests/test_proxy_tls.pydrives the real production entry point with an openssl-generated cert and proves all three: handshake works, nothing plain answers beside the TLS socket, a cert that cannot load boots nothing. It found its first bug while being written (ssl.TLSVersion.TLS1_2does not exist;TLSv1_2does), which is the whole argument for testing a wall by walking through its door. - Proxy v6.16, per-client identity:
QWEN38_CLIENT_KEYS_FILE, a JSON map of bearer token to label. When set, a/v1/request whose token is not on the list gets a 401 in its own dialect (authentication_errorparses on the Claude side,error.typeon the OpenAI side),/healthstays open because a monitored endpoint behind an identity wall stops being monitoring, and the label rides every journal line of the request: per-client throughput and refusals becomejournalctl, with no telemetry component anywhere. A missing, empty or malformed keys file stops the unit at import: fail closed is tested as aSystemExit, not as a hope. The engine's--api-keyis untouched and still enforced: this is identity, not a second key to rotate twice. - Prometheus on every lane:
--enable-metricsin both 27B units, the flash launcher andrun.sh, carried by a new CI gate the same shape as--sleep-on-idle's./metricsis unauthenticated on the engine port, which already assumes a trusted network for its whole surface; README and SECURITY.md say so plainly. The flag lands at the next./install.shre-run and engine start; on the reference box the cockpit drift panel readsrecipe true, installed falsefor exactly that reason, and that reading is the panel working, not a defect. - The closed outcome vocabulary caught its own new member: registering the v6.16
401 failed the vocabulary gate until someone (it, eventually) decided the kind:
fail, the same reading its 400 and 413 siblings got. The gate did its job before a human had to. - The installer's three port refusals say their own name:
die()was defined below the port validations that call it first, soPORT=abc ./install.shprinted "die: command not found" through the ERR trap and lost the message;tests/test_install_preflight.pypins all three refusals with a minimal-environment run that is safe on any machine. - Governance: SECURITY.md names the trust boundaries that are contracts (exact-argv
sudoers, session cookie, bundle masking, byte caps) and the ones that are design
edges (plain HTTP by network choice, one key one realm,
AGENT_AUTOas deliberate escalation); CONTRIBUTING.md points at every gate that will catch you instead of at vibes; ARCHITECTURE.md is the map the CHANGELOG is not; ROADMAP.md gives "on the roadmap" checkboxes and gives considered features their reasons. Issue templates make a box report carry its conditions or explain why not. Dependabot is allowed to touch the GitHub Actions versions and nothing else. - A daily supply-chain alarm: the
pin watchworkflow runscheck-pins.shon a schedule and files one labeled issue when a pin stops resolving upstream, never a duplicate; the build itself stays network-free by contract, the watch is a watch. - The mirror, honestly:
MIRROR.mdandmirror-pins.sh(plan-only by default,--dry-runneeds no credentials) are the runbook for holding every pinned byte; the license table in it is empty of conclusions on purpose and the first mirrored byte waits for nine dated human license checks and one org decision. - Caught up: v1.10.1 and v1.10.2 get their tags and GitHub releases (they had
drifted two releases), the README's doc map gains the four governance links, and
docs/clients.mdanswers the client questions the issues keep asking, with the line between "measured on the reference box" and "standard vendor configuration" drawn where the repo draws it.
Thirteen new tests (4 preflight, 3 TLS, 6 identity), the root coverage of
keepalive-proxy.py up to 77% against its 74% floor, and the whole offline suite green
on the most constrained environment the project knows: a GitHub runner with no docker,
no systemctl, no GPU.
v1.10.2 (2026-09-13): the window the model actually has
The flash lane serves a 262,144-token window and opencode was allowed 175,000 of it, so a third of the machine was never used. The ceiling that capped it was not wrong, it was stale: it came from the v1.5 engine, whose PLE mapping faulted in whole page-cache folios and made a long prefill cost ~0.27 GiB per 1k tokens past 90k. v1.8 serves an engine that trims that, and nobody had re-measured.
Measured now, on this box, MemAvailable sampled through every prefill, engine up 19 h with the PLE budget already filled:
| prompt | host headroom it cost | wall clock | needle |
|---|---|---|---|
| 195,784 tokens | 1.16 GiB | 94.7 s | 1/1 exact at 200,058 |
| 225,051 tokens | 1.57 GiB | 111.3 s | 1/1 exact at 230,231 |
| 249,500 tokens | 1.52 GiB | 126.1 s, floor 6.9 GiB | 1/1 exact at 249,838 |
Flat past 200k, an order of magnitude under what the v1.5 engine paid, and exact
retrieval at every depth. Memory is no longer what caps this lane. What caps
it is the engine's own max_req_input_len, 262,138.
- The one-prompt ceiling is 250,000 (was 200,000), leaving 12,138 tokens of
slack under the engine's wall. The flash
contexttier becomes 225,000 / 32,000 (was 175,000 / 64,000; 32,000 of output is what a turn on this lane actually needs, and the 32,000 it gives back is context). Compaction now fires at 205,000 instead of 155,000, and the chain still closes on the measured worst step:225,000 - 20,000 + 43,863 = 248,863 <= 250,000. --allow-auto-truncateis gone from the launcher, and gated out of every lane. It was there undocumented. A probe asked for a prompt above the window and got backprompt_tokensexactly equal tomax_req_input_lenwith a confident answer, the needle gone, and no warning anywhere: the engine had quietly cut the context and answered from what was left. The proxy already refuses above the ceiling with a clear 400, so the flag bought nothing and cost the one failure worse than a refusal. Takes effect on the next engine start.- Compaction stops throwing the window away. opencode's own
preserve_recent_tokensdefault ismin(15000, max(2000, threshold/4)), and that 15,000 cap was chosen for 128K models: on this lane a compaction at 205,000 tokens would keep 15,000 and summarise the other 190,000. The installed value is opencode's own intent without the cap, a quarter of the threshold (51,000 here), sized from the installed target byoc-limits.sh --preserveand rewritten by every install and switch.prunegoes on with it, so stale tool output is cleared instead of the whole conversation being summarised. - A switch now reaches the server that reads the numbers.
opencode serveparsesopencode.jsononce at startup and never again: with 225,000 on disk, the running server still answered 175,000 on/config. Every switch before this rewrote the limits correctly and left the Agent tab compacting against the previous lane's window.install.shandswitch-model.shrestartopencode-web.servicewhen it is running, and CI holds it. - An image the guard cannot parse is charged its ceiling, not a flat budget.
A 3840x2160 screenshot really costs 8,162 tokens, so the flat 4,096 fallback
under-counted it, which is the direction that lets an oversize prompt through.
An image is bounded by the processor's
max_pixels, so the fallback is that bound (16,386). Audio, video and documents keep the flat budget: no geometry to reason from.
Verified end to end on the box: the ceiling raised live, needle 3/3 at depth, a
248,800-token prompt served through the proxy, and one above 250,000 still
refused with code: context_length_exceeded.
v1.10.1 (2026-09-13): an image costs what it costs
The flash lane kept dying mid-session with a proxy 400, and the number in that 400 was wrong. On 2026-09-12 a conversation was refused as 200,684 prompt tokens against the lane's 200,000 ceiling. The engine was serving 139,868.
The gap was 24 screenshots. The proxy's oversize guard cannot ask /tokenize
to price an image (SGLang returns the 3-token placeholder, not the expansion),
so since v6.8 it charged every media part a flat 4,096 tokens. Measured
against this engine at twelve sizes, an agent screenshot really costs 880
(1280x720) to 1,562 (1680x950): 24 of them were charged 98,304 where the
engine charges 37,488. Every oversize refusal this box has ever logged, all
eight of them since 2026-09-09, happened in a session holding images.
- The guard now prices an image from its own header (PNG, JPEG, GIF, WebP)
with the vision tower's geometry:
round(w/32) * round(h/32)cells, clamped into the processor's pixel range, plus the two wrapper tokens. Exact against the engine's ownprompt_tokensat all twelve sizes tried, including both clamp branches (64x64 up tomin_pixels, 4500x4500 down frommax_pixels), and exact end to end at 1, 5 and 24 images. Every checkpoint this repo serves has the same geometry (patch_size16,merge_size2), so one formula covers both lanes.TOKENS_PER_MEDIAsurvives as the fallback for what has no readable header: audio, video, documents, a remote URL the engine will fetch. - The refusal is now one a client can act on. opencode recovers from a
context overflow by compacting and dropping the media attachments, which is
exactly the right move here, but it only does it when it recognises the
provider's error: a fixed message vocabulary, or
error.code == "context_length_exceeded". The old message matched nothing and carried no code, so the session resent the same prompt and got the same 400. That is what the field log shows: 23:18:00 refused at 200,684, 23:18:03 refused at 200,735, no compaction in between. The refusal now says "the prompt is too long" and carries the code.error.typestayscontext_too_long, becauseneedle.shreads it. - The 175,000 context tier keeps its number and loses its reason. It was set
by reading the 09/09 and 10/09 refusals as opencode "estimating" its context
and drifting from the engine. It does not estimate: it compacts when the last
response's reported usage reaches
limit.input - min(20,000, output cap), and those are the engine's own numbers. What it cannot see is the step it is about to take, so the real rule isthreshold + one worst step <= ceiling. Measured over 2,156 flash-lane steps in opencode's session store: worst step 43,863 tokens, p99 18,512. 175,000 gives 155,000 + 43,863 = 198,863 under a 200,000 ceiling and holds; 190,000 gave 213,863 and did not.oc-fit-limitsderives its margin from those two measurements instead of asserting 25,000, and a CI gate holds the invariant and the agreement between tool and table.
Tests: 4 new in tests/test_proxy_guard.py for the pricing (the twelve measured
sizes, the four header formats, the 24-screenshot conversation, the fallbacks)
and 4 for the refusal shape, including the client's own overflow vocabulary read
out of the binary. 49 tests in that file, all suites green.
v1.10.0 (2026-09-12): measured serving flags, a wildcard-free sudoers file, and a hardened proxy
Five small holes in keepalive-proxy.py, each reproduced before fixing, each
with a regression test in tests/test_proxy_guard.py (40 tests, coverage
floor for the module holds at 75%).
- A lying or broken
Content-Lengthno longer decides the allocation: bodies overMAX_BODY_BYTES(256 MiB, env-overridable) get 413 before a byte is read, and a non-numeric or negative length gets 400 instead of killing the handler thread with zero bytes back (raw-socket repro: empty reply, then the next request served normally). - Upstream calls that are metadata always (
GET: models, health, load) now have a deadline (UPSTREAM_GET_TIMEOUT_S, 30 s). Generations keep none: a cold giant prefill legitimately takes tens of minutes to its first byte. - A monster arriving while the pool is unmeasured (engine restart) waits with
503
engine_warminginstead of relaying into a scheduler wedge. Small requests still pass; the estimate is a lower bound, so no fittable request is ever held; 503 and never 400, because the request may serve fine on retry. - The SSE socket is now closed explicitly at normal end of stream (it used to wait for the refcount), and the depth bound of the tool-schema guard reports instead of silently skipping (a missing propagation of the flag, caught by the new coverage because the first version of the fix did not take).
- Not changed on purpose: concurrent drains stay unbounded, because stopping a drain early re-creates the engine-side zombie the drain exists to avoid.
The cockpit runs switch-model.sh under NOPASSWD sudo, so its allowlist is a
root boundary and had three wildcards in it (install from any source path,
sed -i with any expression, journalctl -k with any flags). A wildcard on
sed arguments is still root even pinned to one file (its w command writes
any file), so the keepalive ceiling edit is a systemd drop-in now instead of
an in-place edit, and the 27B unit stages at a fixed path the allowlist pins
character for character. The qwen38-flash.service install line was dead
privilege (flash switches through its user-owned launcher) and is gone; the
journal read is the exact argv cockpit.py performs. Two CI gates hold it: no
* on any allowlist line, and staging paths plus journalctl argv
cross-checked against their callers (plus no sudo sed in switch-model.sh).
Side hardening with the same change: the dashboard unit lost its
ReadWritePaths=/etc/systemd/system (every cockpit read there is a
read_text/is_file, verified; all writes go through sudo lines), while
NoNewPrivileges=no stays: sudo cannot elevate under yes, so yes would
silently break every button. install.sh removes a stale ceiling drop-in
(the installed unit carries the ceiling again), and uninstall.sh lists and
removes the drop-in dir, knows the served digest image and both flash weight
trees (--list was blind to the 126G served weights), and warns against
docker image prune when digest-pulled images are present.
Same target, native lane, one variable at a time, 2026-09-12 with the box owner present. Baseline after a native reinstall (maurienne NVFP4 draft D16, chunk 8192): pool 342,339, greedy median 63.5 tok/s.
- Chunk 2048 vs 8192: median 63.3 vs 63.5, per-probe inside noise (reasoning 60.4/66.2 vs 60.7/66.2, prose identical to the decimal). KEPT 8192: no headline difference, and 8192 protects 1M cold-prefill throughput while the cookbook's 2048 case (smoother inter-token latency under mixed load) has no measured problem behind it here.
- Draft incoai/Qwen3.8-27B-DFlash2 (the cookbook's, proven byte-identical in structure to z-lab: same size, 81 identical tensor headers) at D8/unquant vs maurienne-ai calibrated NVFP4 at D16: median 52.5 vs 63.5 (code -20%, reasoning -15%, math -30%, prose -5%). KEPT maurienne: the margin is too big for depth alone to explain away, and the NVFP4 draft frees ~2.3 GiB of VRAM into the pool. (The z-lab D8 boot was skipped on purpose: no outcome of it could change the decision.)
HF_HUB_OFFLINE=1on the native lane: boots identically with a complete cache (7 min, full graph capture, pool + smoke OK). ADOPTED in the native template and run.sh; the CI gate that forbade it is updated with the reason.--json-model-override-argsinstead of file patching for YaRN: BLOCKED with proof. First attempt died on shell quoting (single quotes inside the single-quoted ExecStart); fixed to compact unquoted JSON, the engine then refused the shape outright (unrecognized arguments, one arg per nested key). This build wants a flatter form, and the separate DFlash draft config may not take overrides at all (MiaAI's DSpark leak is the same family). Needs source-level research on the override parser, not another blind boot. The file-patch path stays, fully repaired (see below).- Found live by the campaign: every native install died at step 8/9 since
~30/08 (a grep for
--context-lengthmatches nothing on native units and pipefail killed the script; only 1m units ever passed). Fixed with|| trueplus a CI gate that runs the idiom both ways.
MTP verify intermediates on a fixed ring (--enable-linear-replayssm-spec,
the cookbook's EAGLE row on SM120/SM121), measured on this box 2026-09-12 on
the flash-uncensored target, context tier, everything else equal:
- pool 463,936 -> 557,312 (+20%, above the previous boot range 279-463K);
- decode neutral: greedy median 42.4 vs 43.1 (code 40.2 / reasoning 45.4 / math 47.1 / prose 28.9 warmed, inside the documented uptime drift);
- canaries 4/4 (merge, logic, French, primes), no corruption, accept rates
healthy. Adopted: the flag ships by default on speculating tiers
(
FLASH_REPLAYSSM_SPEC=0to opt out; the throughput tier skips it with a NOTE). New CI gate exercises the knob matrix, default included.
The concurrency tier (8 requests) measured the same day: pool 468,480
(was 129,792 before the flag), scheduler-capped at exactly 8, host 13G idle,
single-stream best of the campaign (43.7 / 44.2 / 46.8 / 29.5, median 44.4),
needle 8/8 exact to 140K at a 13.5 GiB floor, 90.4 tok/s aggregate at 4
streams. The default stays context (4): its pool is larger still (557K),
its 175K/64K session limits are sized for one or two streams, and
concurrent-load memory is unmeasured; tier 8 stays a validated option, and
the README tier table carries the new numbers.
- API key file is born 0600 now (subshell umask, the install-agent.sh pattern): with umask 022 it used to be world-readable until the chmod ran.
PORT/PROXY_PORTare validated as numbers before any arithmetic, and may never be equal (each port check would see "its" port free, then both services would fight over one socket). All three refusals verified live.- Disk is measured where the weights land (
HF_CACHE, not$HOME), with an explicit unknown instead of a cryptic integer error whendffails;ssis a preflight requirement instead of a silent2>/dev/null. - Unit rendering escapes sed-special bytes in every value (byte-identical
output on sane values, proven; a path with
&used to corrupt or abort the render). oc-limits.sh --froma missing file keeps its contract (defaults, rc 0, the switch treats it as leave-everything) but says so on stderr now, gated.patch-yarn.pywrites atomically (temp file + rename, utf-8 both ways): a kill can no longer leave a truncated config.json behind.run.shprints the served memory fraction at startup (still the native template default 0.50 by contract, CI-gated exact): hand-tuned service units compare like with like.- Deliberately unchanged, with the reason written down:
sudowithout-nin the install scripts (they are interactive by design, the cockpit uses-neverywhere),set -uowithout-ein the two diagnostic helpers (they degrade to FAIL lines, never a silent pass), noHF_HUB_OFFLINE=1on the native lane (only the 1M lane needs it; adding it wants a boot test), andfit()without a ceiling on proxyless boxes (no proxy enforces one there, so the pool share is the right answer).
Not a code change: the state patch-yarn --restore needs. Two pinned
snapshots (stock 27B target, z-lab rollback draft) were YaRN-patched with no
.pre-yarn backup next to them - every snapshot dir shares one blob per file
through symlinks, so one old patch had covered three dirs and left no way
back, and CONTEXT_MODE=native ./install.sh would have died on them. Fixed
by re-downloading just config.json at each pin (hash-checked by the Hub
tooling; the stale .bak-native files matched the fresh downloads byte for
byte, confirming the pristine content three ways), re-linking, and
re-patching: the re-patched bytes hash identically to before, so the dormant
1M lane sees nothing change, and --check reports patched-with-backup on all
four pinned snapshots now. A full stray snapshot revision (unreferenced
anywhere, weights shared with the pin) was removed; it could otherwise hijack
the newest-by-mtime fallback. Restore itself was proved on copies, not on the
live cache.
v1.9.1 (2026-09-11): opencode offers and defaults to the lane that serves
Installing stock 1M over an fp8/flash era config left opencode's picker and
default behind: the Agent tab offered flash while the box served stock, and
the 27B entry still read FP8. switch-model.sh re-pointed both, install.sh
only merged the limits. The default model and the per-target picker names now
live once, in oc-point-default.py, called by both scripts on every config
they manage (generated artifact and the file opencode reads); the generated
artifact uses the same names instead of its own generic spelling. With a test
file on the helper and CI gates on the wiring and the label coverage.
v1.9.0 (2026-09-11): the 27B lane drafts from a calibrated NVFP4 head, 16 deep
The screenshots were right. Two independent single-Spark recipes measured the
same two levers on this exact target (RadixArk/Qwen3.8-27B-NVFP4 @ 52d1adc):
maurienne-ai's calibrated NVFP4 quantization of the DFlash2 draft (the draft
runs every step, so quantizing it well matters more than its size suggests)
and a draft depth of 16 instead of 8. Both were re-measured on the reference
box before being adopted, same target, same flags otherwise:
- The draft:
maurienne-ai/Qwen3.8-27B-DFlash2-NVFP4-RTNcal@bd7a934, served with--speculative-draft-model-quantization modelopt_fp4. BF16 3.53 GB -> NVFP4 1.37 GB of VRAM, acceptance preserved by calibration (uncalibrated round-to-nearest loses ~13% acceptance; calibrated recovers the whole gap). The freed VRAM becomes KV pool. - The depth:
--speculative-num-draft-tokens 16instead of 8. Swept, not guessed: D8 -> D16 alone is +19% pooled throughput at unchanged quality. - Measured here:
./bench.shgreedy median 50 -> 65.3 tok/s (+30%), code 41-47 -> 64-66, reasoning 52-57 -> 65-66, math peak 50-60 -> 57-71, prose unchanged (23-25); frozen battery./bench-matrix.shcode EN 40.1, tech FR 32.4 (was 25.8), reasoning FR 49.5 (was 43.5), prose EN/FR/DE 22.1/19.5/18.3 (parity); KV pool 357,706 tokens at mem-fraction 0.50, so a full 262,144-token prompt still fits; 0 corruption markers; 4 concurrent streams clean (4x400 tokens, ~76 tok/s aggregate on prose). - Quality is lossless by construction: the target verifies every drafted token over the whole vocabulary, so the draft can only change speed, never what the model may say. Independent paired evidence (27 frozen payloads): quality frozen 24/27 in both recipes, 21/27 byte-identical outputs.
- What did NOT change, and why: NVIDIA's own 27B NVFP4 export
(
nvidia/Qwen3.8-27B-NVFP4, ModelOpt 0.48.0) was downloaded and compared field by field: identical quantization map (401 layers, 208 FP8 + 193 NVFP4, NVFP4lm_head), internals still stamped 0.47.0.dev80, andkv_cache_quant_algo: nullwhere RadixArk declares FP8, so it serves half the pool unless asked explicitly. A tie at best for 21 GB and a validation cycle: not added. The flash lane is untouched (its official image is still the head of its branch, and NVFP4-KV there costs measured quality). - Rollback, if the draft ever misbehaves on your workload:
DRAFT2_REPO=z-lab/Qwen3.8-27B-DFlash2 DRAFT2_REV=50307d4c4cde6860d4eee73e2547cd786fe8e8a4 DRAFT2_QUANT=unquant DRAFT2_TOKENS=8 ./install.sh, then restart the unit. A plain re-run keeps whichever draft is installed, the way MODEL_CHOICE is kept. - Gates: the 27B templates carry the draft as placeholders (repo, revision,
depth, quantization),
run.shreads the same pins, the cockpit derives them, and CI asserts the measured triple plus the placeholder wiring. - A bare IPv6 literal no longer comes back unbracketed. Hypothesis found
host_name("::")returning"::", which the callers splice intohttp://{name}:{port}URLs. It now returns the bracketed canonical form, with a unit test on both shapes; the relay's origin gate compares raw strings and is untouched. - Coming home from 1m no longer crashes. A native server dies at load on
a YaRN-patched config (measured: target
context_length1010000 against a derived 262144), and nothing restored the originals:patch-yarn.pygrows--restore(moves the.pre-yarnbackup back, consumes it) and--check(exit 0 clean, 2 patched-with-backup, 3 patched-without), a native 27B install restores the target and the draft, andrun.shpreflights the cache and refuses early with the restore path instead of ten minutes into the boot. With tests on both config shapes and a CI gate on the wiring.
v1.8.6 (2026-09-10): the phone can finally send a photo, and compaction fires before the proxy says no
v1.8.2 opened the Agent tab fullscreen on a phone on the strength of a measurement that said opencode's own interface is responsive. It was true at 393 px and false in every way that mattered: the composer's footer overlapped its send button, a fresh browser's home listed nothing to open (the session lists are per-browser local state), the iOS keyboard buried the dock - and a photo attached with the "+" button simply never arrived, with no error anywhere. Both stories end here, and both end with the failure measured, not guessed.
- Attachments died in a hole no code of ours controls. The box answers the phone
over
http://100.x.x.x:30091, and plain HTTP on anything but localhost is not a secure context, so iOS Safari and Chrome hidecrypto.subtleandnavigator.clipboardentirely. The bundle readscrypto.subtle.digest("SHA-256", file)the moment a file is picked (verified: the only twocrypto.subtlecalls in the whole bundle, both SHA-256 - and five of its sevennavigator.clipboard.writeTextcall sites carry no guard at all), the undefined read throws, and the throw is swallowed. On the box itself the app is served from127.0.0.1, which is secure - which is why the exact same build works at the desk and silently loses photos on the phone. - The relay now ships a mobile layer: a stylesheet and a companion script,
injected into the served index as same-origin tags before opencode's module
(classic script, so the polyfills are in place before the module evaluates),
hot-reloaded with the assets they serve, opencode's code untouched: composer and
send button that stop stealing each other's pixels, a session card on the blank
home, the dock lifted above the software keyboard via
visualViewport, a dark default for touch devices, a pure-JS SHA-256 forcrypto.subtle.digest, and anexecCommandcopy fallback for the clipboard. End to end, real path: photo in, chip in the composer, prompt out, model answers about the picture. - The other ceiling, the one that refused the whole conversation. The flash
context tier gave opencode a 190,000-token context under the proxy's 200,000
ceiling, and a tool-heavy agent session walked straight through it: opencode
counts tokens by estimate, the proxy counts them with the engine, and the two
were ≥ 18,297 apart when the engine counted 208,297 for a request opencode had
decided to send. Past the ceiling the proxy refuses - including the compaction
request that was supposed to rescue the session, because that request carries
the whole oversized conversation. So the table drops the tier to 175,000,
the ceiling minus a margin that covers the drift,
oc-fit-limits(the cockpit's fit button) gets the same rule whenever a lane has a ceiling (OC_CEILING_MARGIN, default 25,000 - otherwise one click quietly restored the bug), and the CI gate follows. Fresh installs get 175,000; installed boxes pick it up on the next update, switch, or fit click. - The cockpit's own face: graphite-and-champagne, dark only, self-hosted Inter
and IBM Plex Mono (a
font/woff2type in the asset route), the memory gauge calm at rest and only bronze-to-clay in real danger, the proxy table wearing colour only when a client left or broke, and a draggable "back to cockpit" pill. - The suite spent the same day learning to measure itself: coverage floors set from the most constrained environment rather than this box, the two pure modules at 100 % branch coverage - and the honesty that follows it: that same lifecycle.py scores 91.7 % under mutation, because coverage measures execution and only mutation measures detection. 41 property checks, a proxy fuzzer, a mutation runner that cannot corrupt the tree, 21 cockpit crashes flushed out of the HTTP and action surface, and gates for the keepalive injection and the relay boundary. The full suite: 359 cockpit tests and 41 property checks, all green.
v1.8.5 (2026-09-10): the flash lane stops burning a core to do nothing, and the cockpit says who is leaking
Two facts measured on the reference box this morning, both about the lane that is actually in production.
- The flash lane never got
--sleep-on-idle. Without it SGLang's scheduler busy-spins while there is nothing to do. Measured on the live box at 11:13, with the engine idle: thesglang::schedulthread at 101 % of a CPU core, and it had been there for 12 h 21 min of elapsed time. The 27B lane has carried the flag since v1.2.6, where the A/B on this same box measured scheduler CPU 101 % to 1.7 %, module power 12.1 to 10.5 W, and wake-up TTFT unchanged (0.234-0.240 s before, 0.234-0.239 s after); the flash launcher, written later, simply never received it. On a box whose ten power cuts were heat-soak, a core spinning for nothing is not a detail. The flag is in the launcher now, and a CI gate requires it of every serving lane (both 27B units, the flash launcher andrun.sh) so it cannot be forgotten by the next one. It takes effect at the next engine start, together with theSGLANG_ENABLE_REQUEST_HEADER_OVERRIDES=1of v1.8.4. - The cockpit was blind to the whole class of flag it belonged to. The recipe layer
held flags as "flag -> value" pairs, so a flag that carries no value could not be
represented, and the drift panel, whose one job is to say where the box differs from
the repo, had nothing to report about a lane missing
--sleep-on-idle. Recipes now carry aswitchesmap (seven value-less serving flags, token equality so--disable-radix-cachenever answers for another flag),drift()reports them asswitch.--flag, and a custom recipe may declare them. On the reference box the panel now reads exactly what is true:switch.--sleep-on-idle: recipe true, installed false. - New cockpit panel: Zombie guard (Requests tab, 30 s tier). It reads both sides of
the wire at once: the engine's own flood lines (
Received output for rid=... but the state was deleted in TokenizerManager, grouped by request, worst first, with the seconds between a request's first and last line, which IS the dead decode), the proxy's counters over the same window (aborted, drained and the longest drain, aborts the engine never answered, drains that hit the ceiling), the version of the running proxy read from its own startup banner, and whether the engine accepts the proxy's request id at all. That last pair is what makes the panel actionable: a repo on v6.14 says nothing about the process systemd started, and without the header override an abandoned answer can only be drained, never aborted. - Two bugs found while building it, both fixed here:
journalctl -greturns its matches newest first where plain-nis chronological, so reading the listing last-wins reported a box running v6.13 as v6.12, the version it had booted nine hours earlier; andbuiltin()composes a recipe field by field, so the new switches map had to be carried explicitly, which the suite's own "no drift against my own template" test caught immediately. 13 new offline tests (8 intest_lifecycle.py, 6 intest_recipes.py), all on real log lines from this box.
v1.8.4 (2026-09-09): a client that gives up no longer leaves the engine decoding
The reference box logged 6,582 copies of Received output for rid=... but the state was deleted in TokenizerManager on 2026-09-09 alone. Behind each burst is a request
whose client went away and whose generation kept running: one of them decoded for
6 minutes and 8 seconds with nobody listening (4,470 log lines), on a lane that
serves four concurrent requests. The engine was healthy the whole time.
- Why an abort can arrive too late to do anything.
TokenizerManager.abort_request()returns early when the rid is no longer inrid_to_state, and a client disconnect deletes that entry first:generate_request()catches theCancelledErrorand calls_discard_pending_req_states(). TheAbortReqnever reaches the scheduler, which keeps decoding and logs one line per output batch. Upstream fixed it in sglang#35255 (merged 2026-09-04,_release_req_states_on_failure); neither image this repo serves carries it: the 27B images predate it, and the flash lane'sdev-qwen38-next-localis built from the Qwen4-Exp branch, which is 995 commits behind main (verified against the container:_release_req_states_on_failure0,abort_sent0,_discard_pending_req_states2). - Three holes on this side of the wire, all measured here. The proxy learned the rid
from the first SSE event, so a client that gave up during prefill left a request it
could not name (the 6-minute one). On
/v1/messagesit sent the id it did have,msg_<uuid>, which the Anthropic route mints locally and the engine has never heard of: an abort that logs like a success and aborts nothing. And the abort was fired in a background thread racingresp.close(), which is the call that deletes the state the abort needs. - The proxy (v6.14) names every request itself. It sends
x-override-ridon the routes that honour it (/v1/chat/completions,/generate), so an abandoned request has a name before it has produced a single token, and it POSTs/abort_requestsynchronously, before closing the upstream socket. A rid it invented is only used once an answer has proved the engine takes it: SGLang gates header overrides behindSGLANG_ENABLE_REQUEST_HEADER_OVERRIDES, off by default, and an unproven rid would abort nothing while reading like a success. - When there is no rid to abort with, the answer is drained, not dropped. On
/v1/messagesthe engine mints its own id and applies no header overrides, so nothing the client sees names the request. Reading the answer to its end costs the decode the zombie would have cost anyway, and keeps the engine's state coherent: no flood, and the slot is released when the generation ends.DRAIN_MAX_S(900 s) bounds it. SGLANG_ENABLE_REQUEST_HEADER_OVERRIDES=1is now passed to the engine by the flash launcher, both 27B units andrun.sh. It takes effect at the next engine start; until then the proxy drains instead of aborting, which is the same absence of a zombie at the cost of the decode.- Measured on the box, same engine, same request (client killed mid-request,
max_tokens400): 223 flood lines and a zombie holding a slot through the v6.13 proxy, 0 flood lines through v6.14, which drained the abandoned answer for 18 s and closed it.tests/test_proxy_abort.py(new, 6 cases) reproduces the upstream rule in a fake engine: an abort for a rid whose state is gone is recorded as ignored, never as an abort, so the ordering is tested and not merely intended.
v1.8.3 (2026-09-09): one tool schema no longer kills a whole session
Claude Code 2.1.266 could not say hello to this lane. Every request, from the
very first word, came back 400 Tool 1 function has invalid 'parameters' schema: '^(?!__.*__$)[^\\p{Cc}\\p{Cf}\\p{Zl}\\p{Zp}"\\\\./[\\]]{1,200}$' is not a 'regex'.
Nothing was wrong with the model, the chat template or the client.
- The engine validates tool schemas with a Python regex, and JSON Schema is not
written in one.
serving_chat.py:868runsDraft202012Validator.check_schema()on every tool's parameters, and that check compiles eachpatternwith Python'sre. The spec sayspatternis ECMA-262, which has Unicode property escapes;redoes not, and answersbad escape \p. One tool carrying such a pattern (Claude Code'sArtifact, on itsfieldargument) is enough to make the engine refuse every request of the session, before the model sees anything. This is an upstream limitation, not a local misconfiguration:jsonschemahas always compiled withrerather than theregexmodule. - The proxy (v6.13) drops exactly those patterns and nothing else. Only the
patternvalues Python cannot compile are removed, only inside tool parameter schemas (input_schemaon the Anthropic dialect,function.parameterson the OpenAI one, at request level and inside messages, since the engine validates message-level tools too). Apatternconstrains what the model may write into an argument, so removing it costs the caller nothing here, and a patternredoes accept (^[A-Za-z0-9_-]{1,64}$) is kept. - The hot path pays one substring scan. A body whose raw bytes carry none of the
JSON-escaped markers
\\p{,\\P{,(?<is forwarded untouched, without being parsed at all. A prompt that merely quotes one of these regexes is never rewritten, and the walk is depth-bounded so a cyclic schema cannot take the proxy down. Each distinct dropped pattern is logged once, not once per turn. - Measured, not assumed: the failing request was reproduced against the live
lane (
400), then answered200with the same body after the fix.tests/test_proxy_guard.pygrew five cases and runs 30.
v1.8.2 (2026-09-09): the cockpit on a phone, opencode included
Measured before it was changed: dashboard/tests/mobile-check.mjs (new) drives a
headless Chromium through four real iPhone geometries (SE 375x667, 15 393x852,
15 Pro Max 430x932, 15 in landscape 852x393) across all eight tabs and asserts
horizontal overflow, elements wider than the screen, touch target sizes, form
control sizes and the Agent frame's box. The first run scored 64 of 132. It
now scores 136 of 136 against the address a phone uses, and 132 of 132
against one where the relay answers elsewhere.
- The chrome was the problem, not the content. On a 393 px phone the top bar and the section rail both wrapped into three rows and ate 620 px of an 852 px screen before the first card. The bar now keeps one identity row and gives the actions a row of their own that scrolls sideways; the rail is one swipeable row of pills, with the current section scrolled into view by app.js. Same content, 150 px instead of 620.
- 44x44 and 16 px. Every control was under Apple's minimum touch target (the action buttons were 27 px tall) and every form control was under 16 px, which makes iOS Safari zoom the whole page on focus with no way back. Both are fixed below 980 px and on any coarse pointer, and the login page's field, the first thing a phone sees, was 15 px.
dvh, notvh. On iOS the browser's own chrome counts inside100vh, so every full-height box written that way overflows by exactly the toolbar. The shell, the login card and the agent frame now use dynamic viewport units with the old ones as the fallback, and the fullscreen frame followswindow.visualViewport(--vvh,--vvtop), which is the only thing that tracks the software keyboard on iOS.- The Agent tab opens fullscreen on a phone, because there the tab is the frame: opencode's own interface is responsive (measured: its media queries at 600 and 640 px, no overflow at 393 px), it only needed the whole screen. The choice is remembered per device, and it is never applied when the panel cannot load, so a relay on another address still shows its explanation instead of a blank frame with a chip in the corner.
- A specificity bug that was not a phone bug.
.agentnote:not([hidden]) + .agentframeweighs (0,3,0), because:not()counts its own argument, and outweighedbody.agentmax .agentframe(0,2,1): fullscreen kept the embedded height whenever the relay note was visible. Measured on a 900 px desktop window: a 682 px "fullscreen" frame.agent-check.mjsgrew the gate that catches it (31 checks now), and the gate was verified against the old CSS. - Also: the buttons in the Agent head are grouped so they scroll as a row instead
of stacking four deep, panels and cards stack on a narrow screen (the KV pool
card put its tank in a 40 % column and left the number's column empty), and
interactive-widget=resizes-contentis declared so a keyboard resizes the content instead of pushing it out of view.
Nothing changed above 980 px: click-storm 43/43, resilience 16/16, headless render with no exception, HTTP smoke 32/32, 160 unit tests, CI 27/27.
v1.8.1 (2026-09-08): the opencode output ceiling is a ceiling, not the installed target's number
Found by asking the Agent tab what it was actually running, right after v1.8.0
shipped. opencode sends max_tokens = min(limit.output, OPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX),
and v1.8.0 made limit.output follow a model switch (oc-limits.sh) while the
env var kept being written from the installed target: a box installed on the
flash lane got a 64,000 ceiling in ~/.local/bin/oc and in
opencode-web.service, so after a switch to a 27B box in 1M mode, where
limit.output is 200,000, a long turn was still cut at 64,000 with
finish_reason: length, no text and no tool call. That is the exact silent
failure the env var exists to prevent, and the switch could not fix it because
the ceiling is not a per-target number.
./oc-limits.sh --max-outreturns the largest output limit the table can produce (200,000 today, from the 27B NVFP4 1M pair), computed by asking the table for every target and tier so it cannot drift from it.install.shwrites that value into theoclauncher, and refuses to install if it comes back below the installed target's own limit.dashboard/install-agent.shtakes the Agent tab's ceiling from the same call instead of copying the launcher's number, which is how the tab inherited the installed target's value.AGENT_OUTPUT_TOKEN_MAXstill wins when set.- The CI gate now proves the property, not the number: the ceiling must exceed opencode's hidden 32,000 default and every output limit the table produces on every target and tier, and both installers must read it from the table. All four assertions were mutation-tested (ceiling taken from the installed target, ceiling below the table, Agent tab reading the launcher, ceiling at 64,000: each one fails the gate).
- Applied on the reference box: launcher and
opencode-web.servicenow carry 200,000, the agent unit was re-installed with its bind, port and auto mode kept, and the flash lane's own limits are unchanged (limit.output64,000, which is what the lane serves). On that box the live effect was confined to the Agent tab: an interactive shell there already exported 200,000 from~/.bashrc, which a systemd unit does not read, so the CLI never saw the low ceiling and the tab always did. A fresh install has no such export.
v1.8.0 (2026-09-08): the official image, a reduced draft vocabulary, and a seventh target
Upstream caught up with this repo on the flash lane, and then this repo found
one lever upstream already had. The SGLang cookbook now carries a verified
single-DGX-Spark cell for Qwen3.8-Flash-Next, and the image it points this
hardware at ships everything this repo used to graft on locally. So that lane
serves the official image directly, builds nothing, gains concurrency, loses two
workarounds, and gets 14 to 25% of its decode back from one flag. The 27B
lane stays where it is, for one measured reason given below.
OVERLAY_FLASH=1 ./install.sh rebuilds the v1.7 flash path as the rollback.
The lane
- The flash lane runs
lmsysorg/sglang:dev-qwen38-next-local(theqwen4-main-squashedbuild,4ccff141db, pinned by digest), which brings four things at once: the file-backed PLE table backend (#37068) replacing this repo's mmap patch, the merged KDA QSA sm_121 decode kernel (#36845) replacing the vendored copy, the root cause of the wall of!(#36811 via #38308 and #38290: a zero-bias allocation in the fused softmax routing kernel collapsed every running MTP request to token id 0 at the same instant on GB10), and the mixed-precision loader (#38121). The proxy keeps its!detector as a backstop; it was never the fix. --speculative-token-map: 14 to 25% of decode, and it changes nothing about what the model can say. A speculative step's draft reads the model'slm_headin full, 1.18 GiB at 248,320 x 2560 in BF16, three times in an MTP-3 engine step. SGLang can hand the draft that head sliced to a list of token ids (EAGLEWorkerV2.init_lm_head, and the proposal path maps the local ids back), which removes 2.6 GiB from every step on a lane that is memory-bandwidth bound. The target still verifies every drafted token over the whole vocabulary, so the reachable outputs are unchanged by construction.build-token-map.py(new) builds the list inside the serving image, so the tokenizer that ranks it is the served model's: specials first, then corpus frequencies if acorpus.jsonlis present, then the tokenizer's own BPE construction order, which is a frequency ranking that needs no corpus at all. A/B on one boot each, three repeats after a discarded warm-up: code 39.8 -> 47.9, math 39.0 -> 47.1, prose EN 23.4 -> 29.3, prose FR 27.2 -> 30.9 tok/s, agent loop median 30.3 -> 27.0 ms/tok, acceptance unchanged, needle 2/2 exact at 120K, canaries 4/4. On by default (SPEC_TOKEN_MAP_SIZE=65536;0is off). Two independent single-Spark projects reached the same lever by patching vLLM and report the same order of gain; here it is a flag.- The lane serves 4 concurrent requests instead of 1, and single-stream decode is not the price: at the same protocol it is 47.9 on code and 47.1 on math, against 38.8 and 36.7 on v1.6.0-kda. The two GB10-specific attention-backend flags that used to buy that speed are gone: they existed because the QSA resolver rejected sm_121, and the merged kernel owns that route now. Prefix caching still works: 27K re-served in 2.1 s against 11.8 s cold, 27,008 of 27,026 tokens from the cache.
FLASH_TIER: three cookbook-derived tiers, and the default keeps the context. Every mamba state slot costs 0.206 GiB of the pool the KV cache comes out of, and the model reserves 5 per running request (4 onextra_buffer_lazy), so concurrency and the longest servable prompt trade one for one.context(default) is 4 requests and a KV pool measured between 279,872 and 463,488 tokens across boots, every one of them above the 262,144-token window, so a full-context prompt always fits;concurrencyis the cookbook's low-latency cell, 8 requests and a 129,792-token pool on the boot measured;throughputis its high-throughput cell, 24 requests without speculation.- The one-prompt ceiling goes from 128,000 to 200,000 tokens, and the reason
is #37068's resident-set trimmer. A 120K prompt used to cost ~9 GiB of host
headroom; it now costs 0.0 to 1.3 GiB, and a 200,058-token prompt costs 3.5 GiB
and retrieves its needle exactly, leaving 12.6 GiB against the ~10 GiB livelock
edge. Past 200K is deliberately unmeasured: 262K would land near that edge and
a livelock here costs a power cycle. The opencode limits follow per tier
(190000/64000 on
context). --max-total-tokens 190000and the poisoned-table guard are gone. The pin answered a boot lottery with two mechanisms and only one is fixed: the table's mapping no longer climbs (seen live:PLE table: trimmed resident set 10.6 -> 0.2 GiB), while boot-time profiling still varies, which is why the launcher keeps waiting for a busy box to go quiet. The difference is that a big pool is no longer the dangerous outcome: 454,016 and 463,488-token boots both left the host 16.6-16.9 GiB idle. And the table is rewritten from scratch every boot (the launcher deletes the previous file), so it cannot be half-written from a previous one. Boot to/health: 10 min 40 s to 12 min 21 s.
Two more targets, seven in all
flash-uncensored:dealignai/Qwen3.8-Flash-Next-ABLITERATED-NVFP4. Chosen on evidence, not popularity: of the abliterated Flash-Next exports published for this architecture, this one has 206 shards with the same names as the stock export and 205 of them byte-identical in size, the same index, the samehf_quant_configand the same chat template, so it is an abliteration OF the export this lane already serves and every serving flag transfers unchanged. Validated on the box: boot 10 min 40 s, KV pool 473,664, decode 45.4-46.4 on code, canaries 4/4, needle 1/1 exact at 120K, prefix caching x5.9, and 0 refusals of 5 blunt probes. Two alternatives were rejected for stated reasons:orcarouter/...-Uncensored-NVFP4is a different packaging (18 shards, 170.9 GiB, nohf_quant_config, a separatemodel-mtp.safetensors), and the Mia/Keys splice cannot be served here at all, because it is built on the vLLM tree (Qwen3_8FlashNextForConditionalGeneration) and SGLang registers onlyQwen4ExpForConditionalGeneration, with zero mentions of the other name anywhere in the image.flash-nvda:nvidia/Qwen3.8-Flash-Next-NVFP4, the ModelOpt MIXED_PRECISION export. Served with no--quantization(it resolves tomodelopt_mixed) and--moe-runner-backend flashinfer_cutlasspinned, because the auto-default picksflashinfer_trtllmon GB10 and the NVFP4 MoE method rejects it at autotune. Measured here at the same protocol as the others: code 47.9/47.2/48.1, math 47.1/47.9/47.6, prose 30.6/29.8/31.9, canaries 4/4, KV pool 388,672. So it ties the stock export inside the spread and its pool came out smaller: the cookbook's 174K-against-93K comparison is an advantage of its smaller fp8 draft, and the reduced draft vocabulary removes the disadvantage it was measured against. Kept as a target, checkpoint evicted for disk.- All three flash checkpoints have byte-identical tokenizer files (same git oids) and the same 248,320-token vocabulary, verified, which is what makes one draft vocabulary valid across them.
The 27B lane does not move, and the reason is measured
There is now an official multi-arch DFLASH2 image for this hardware
(lmsysorg/sglang:dev-qwen38-27b-dflash2, built from 1cf2b8c), and it ships
two DFlash2 improvements our 2026-08-15 base predates, which the pinned
z-lab/Qwen3.8-27B-DFlash2 checkpoint has been asking for all along since its
config declares conv_kernel_size, conv_group_size, selector_rank and
selector_top_k: the grouped dynamic convolution and the candidate selector
(#35371, published acceptance
5.46 on GSM8K against MTP's 5.02), and the quantized target lm_head the selector
projects through (#35496).
It was built on 2026-08-22, and the mrope fix this repo's 27B overlay carries
(#34446) merged on
2026-08-30, so serving it as it stands would rotate every image token as if it
sat at its temporal position on all three axes: text unaffected, image inputs
silently wrong. Verified in the image rather than assumed (its
fused_qk_rmsnorm_rope_gate.py still loads one position per token), and the port
is not mechanical, also verified rather than assumed: between the two bases
mrope.py changed API (get_exec() to attention_backends()) and qwen3_5.py
changed by 398 lines. So the 27B lane keeps building its overlay, the official
image is pinned as DFLASH2_OFFICIAL_IMAGE for the day the fix lands in a build
for sm_121, and the task is written up in dflash2/ATTRIBUTION.md.
lmsysorg/sglang:v0.5.19 has both fixes and is not an answer either: its
torch.cuda.get_arch_list() stops at sm_120 and its sgl_kernel ships only
sm90 and sm100 variants, while GB10 is sm_121, which is exactly why the cookbook
points DGX Spark at dev-* images.
#35496 does settle one parked question: the packed NVFP4 head is supported
upstream, so there is nothing to switch to on compatibility grounds. A third
party's paired-NLL measurement on this family says an NVFP4 head costs 2.4% of
NLL against a loss-neutral FP8 one, so the question is a quality trade and not a
compatibility one; it stays parked with that noted.
Eight bugs, each with a gate that would have caught it
Every one of these was found by running the thing, not by reading it, and each fix ships with a test or a CI gate that fails when the bug is reintroduced (verified by mutation, one at a time).
- A switch between flash checkpoints left the previous one's quantization
flags. The rewrite patched fragments of the flag line, and the two
checkpoints' flag strings hold a different number of flags, so returning to
the NVFP4 tree dropped
--speculative-draft-model-quantization unquant, which loads BF16 MTP tensors as if they were quantized. The line is now rebuilt whole byrewrite_flash_launcher(), sourced by the tests so no copy can drift. - A switch never updated the opencode limits, and the picker lied about two
targets. opencode compacts a conversation when it reaches
limit.context, so a limit above what the lane serves means the keepalive proxy answers 400 before opencode ever decides to compact: a hard failure mid-session rather than a compaction. Only the installer knew the limits table, so switching a 27B box in 1M mode (700,000 context) to the flash lane (200,000 ceiling) left the old numbers in place. Andswitch-model.sh's picker labels had no entry for the two new flash targets, so the model list kept saying NVFP4 while the box served the abliterated build, which is the field case its own comment describes for the FP8 pair. The table now lives once, inoc-limits.sh, read by install.sh with the tier or mode it knows and by switch-model.sh from the invocation it just wrote; CI exercises every target and every tier through it, refuses nonsense rather than defaulting, and fails if either caller grows its own copy of a number or if a target has no picker label. Verified live on the reference box, which also repaired a pre-existing drift there: its 27B entry was carrying the FP8 budget under an NVFP4 label. - A switch to Qwen's FP8 release dropped the fp8 KV cache. Same family, worse
consequence: the 27B branch rewrote only the model path and the revision, and
that checkpoint carries no KV scales, so
autofalls back to a bf16 KV cache and the pool halves (771,139 tokens against 382,706, measured by this repo).rewrite_27b_unit()now carries the dtype and preserves the box's own memory fraction, tested in both directions on both unit templates. - The cockpit reported "image missing" about the image the lane was running.
Its scan asked docker for
{{.Repository}}:{{.Tag}}, and an image pulled by digest carries no tag; docker also hides untagged images from the default listing, so the digest pass needs-a. Both shapes are read now. - Two targets' presence read "unknown".
registry.py'sPIN_MODELSis a fifth list of the served checkpoints and the new ones were not in it, so the cockpit could not say whether switching to them would work. A test now derives the list from install.sh. - A pin added to install.sh broke both consumers at once.
run.shandswitch-model.shasserted a hardcoded COUNT of matched pin lines. They now check that every name they use is defined, by name, and CI runs each script's own pin block against the real install.sh underset -u, which also catches the second half of that bug: an assignment interpolating a pin the grep did not select is unbound and dies. - A plain
./install.shon a flash box wrote a launcher that could not boot. The worst of the seven, and the one an upgrading user would have hit first. The per-checkpoint flags were computed fromMODEL_CHOICEonce, at the top, and the convergence block below can changeMODEL_CHOICE: run with no variables on a box already serving flash and it converges from the defaultstocktoflash, but the flags kept the empty valuestockhad chosen. The launcher went out without--quantization modelopt_fp4, the engine then resolved its MoE runner toflashinfer_trtllm, and it died ten minutes into the boot withNotImplementedError: Unsupported moe_runner_backend for NVFP4 MoE, into aRestart=alwaysloop. Found by running the installer the way a user would, not by reading it. The resolution is now a function called again after convergence and before any render, install.sh refuses to write a flash launcher with no checkpoint flags rather than let it fail later, and CI asserts both the function and the order of the call. - The installer rendered
token-map-0.pt. The file name interpolatedSPEC_TOKEN_MAP_SIZEnine lines above where it was set, and${x:-0}turned an ordering bug into a silently mis-named file instead of an error. CI now asserts the order.
The cockpit
- Three new targets in the switch selector, and one list instead of five. The
selector's options, the closed enum the action layer validates against,
install.sh's
MODEL_CHOICEcase, switch-model.sh's guard andBUILTIN_IDSare five independent spellings of the same set; nothing checked that they agreed. A CI step now derives them all from install.sh and fails naming the odd one out. - The cockpit says when it is running code older than the repo. It imports
this repo's python once, at start, and serves its html from disk on every
request, so a
git pullunderneath a running process shows new controls backed by old logic: that is how the switch selector came to offer two targets the action layer refused. It now fingerprints its own sources and reports which changed, and install.sh restarts the unit after an update. - Recipes know the new flags (
--page-size,--fp4-gemm-backend,--ple-offload-backend,--moe-runner-backend,--speculative-token-map, the draft's own quantization,extra_buffer_lazy) andbuiltin()now refuses to build a recipe that left a flag-bearing placeholder unrendered, which is what made every flash recipe report a drift the box did not have. - Two bugs in the recipe parser: it read the closing parenthesis of a bash array as part of the last flag's value, and it took the LAST assignment of a name, so install.sh's convergence branches were being read as the repo's pins.
New tools
bench-agent.py: the agent-loop benchmark. A growing conversation on a shared prefix, one short answer per turn, work pinned withignore_eosso ms/tok compares engines and not answer lengths, and it refuses its own summary if the turns did unequal work. It reports TTFT per 1,000 added prompt tokens, which is the number that says whether the prefix cache is actually being reused: -1 ms here, against a published vLLM measurement where MTP had the best decode and the worst agent loop for exactly that reason.build-token-map.py: builds the reduced draft vocabulary, with a coverage report and self-checks that read the map back the way SGLang will.oc-limits.sh: the opencode limits table, extracted so the installer and the switch cannot disagree about it. Two ways in, one table: explicit (oc-limits.sh flash context) for a caller that knows, derived (oc-limits.sh flash --from <invocation>) for one that has to read the box.check-pins.sh: asks, over the network, whether every pinned revision and image digest still resolves. Not in CI, because a green build must not depend on Hugging Face being up. All 13 resolve today.
Tests
159 unit tests (four files, discovered rather than listed, because a fifth file nobody runs is worse than no fifth file), 27 CI steps, and the live suites: HTTP smoke 31/31, headless render of all seven targets with no exception, click-storm 47/47, resilience 16/16, Agent tab 30/30. The click-storm's engine-gate assertion was rewritten: it expected the switch button to stay enabled with no engine, which reads as a failure whenever a lane is booting, so it now asserts the rule the server actually states and checks both of its branches.
v1.7.2 (2026-09-04): the Agent tab goes fullscreen
- Fullscreen in the Agent tab. The frame covers the whole browser window; the
corner button or Escape brings the cockpit back, leaving the tab shrinks it back, and
a reload on
#agentcomes back the way it was left. Field lesson behind it: every browser tab of the interface holds one permanent event stream that receives the events of every running session, browsers allow six connections per origin over HTTP/1.1, so six tabs froze the interface everywhere while the server answered in milliseconds. One tab, fullscreen when wanted, any number of sessions inside.
v1.7.1 (2026-09-03): the Agent tab can run autonomous
AGENT_AUTO=1 dashboard/install-agent.sh: every tool call approved in the Agent tab.opencode serverejects the--yoloand--autoflags of the TUI, so the unit setsOPENCODE_PERMISSIONto allow everything instead, which opencode honours (verified on the reference box: the served config reads{"*": "allow"}). opencode's defaults otherwise allow most calls and ask before a tool touches a path outside the session's project or on a repeated identical call. Explicit deny rules of your config still apply, youropencode.jsonis not touched, and a re-run of the installer remembers the choice (AGENT_AUTO=0turns it off). The tab reports the mode the running server applies and says when the unit was changed but the server not yet restarted.
v1.7.0 (2026-09-03): opencode in the cockpit
- Agent tab: opencode's web interface inside the cockpit, behind the cockpit login.
dashboard/install-agent.sh(opt-in) installsopencode-web.service, which runsopencode serveas you on127.0.0.1:4096with Basic credentials generated once into~/.config/qwen38/opencode-web.env(0600), and re-installs the cockpit with a relay (dashboard/agent_relay.py, stdlib) on one address, the tailnet address by default. The relay is the only thing that reaches opencode: it accepts a request only with a valid cockpit session cookie, refuses foreign origins, strips the cookie, adds the credentials, and streams plain answers, the event stream and the terminal's WebSocket. Its responses carryframe-ancestorsnaming the cockpit. Browsers see one host for the cockpit and the relay, so the tab needs no second login and Chrome's block on Basic-auth prompts inside cross-origin frames never comes up. The tab reports the server, the relay and the served version, offers Open in a tab, Reload and Restart server (three more exact sudoers lines), and the Logs tab reads the server's journal. Verified on the reference box: a prompt sent through the relay reached the served lane and came back, abashtool call ran and returned, the terminal WebSocket tunnels, the relay is unreachable from the LAN and the docker bridge, and it answers 401 on the tailnet address without a session. install-dashboard.shremembers. A re-run without variables now keeps the bind, the port and the relay settings it finds in the installed unit; before this, a re-run withoutDASH_BINDflipped a cockpit back to loopback.- Tests: 25 offline tests for the relay (header hygiene, byte-exact bodies, chunked and
server-sent events streamed as emitted, keep-alive framing, HTTP/1.0 clients,
WebSocket tunnel, gates), a headless check of the tab against a live cockpit
(
dashboard/tests/agent-check.mjs), the HTTP smoke gains eleven relay checks, the monkey check covers the new tab (a deep link to#agentcrashed the first build at parse time; caught by that check, fixed). CI renders both cockpit unit templates and proves every unit the cockpit can act on has its sudoers lines.
v1.6.2 (2026-09-03): the flash pool is the same on every boot
- The flash lane's KV pool is the same on every boot. SGLang sizes the pool from
the host's
MemAvailableat the instant it profiles (it usespsutilon an integrated GPU, notcudaMemGetInfo), so anything holding memory right then shrinks the pool for the life of the boot. Two boots of the identical launcher and image drew 189,056 and 249,408 tokens on 2026-09-03; the bigger draw left 17.2 GiB of idle host headroom against 23.7, and a 120k prompt spends about 9 GiB of it, so the "better" draw was the one nearer the livelock edge. The launcher now pins--max-total-tokens 190000(SGLang serves it as 189,952 after page alignment), the envelope every needle and canary result in this repo was measured in, and it waits up to 180 s forMemAvailableto clear 96 GiB before starting (measured: the memory of a stopping lane is back within one second of the container exit, so the wait costs nothing on a normal switch and only bites when something else is busy). SGLang treats the pin as a ceiling, so a boot that still profiles less serves less: the cockpit now says so in its event feed, with both numbers. Verified on the reference box after the change: pool 189,952, idle 23.7 GiB, needle 2/2 at 120k with a 14.9 GiB floor, canaries 4/4, and the KDA kernel is the only QSA kernel that compiled in the container. - The cockpit actually records the pool each boot wins. v1.6 announced that; it
recorded one boot in five. The recording read the
engine_infocollector's cache at the moment the lane turned ready, and at that moment the cache holds either the boot's connection errors (nothing recorded) or the previous engine's facts (the wrong pool recorded). It reads the engine directly now. - A flag named in a comment is not a flag. The recipe parser scanned the whole
launcher text, comments included, so a comment reading "--max-total-tokens below
pins the ceiling" became
max_total_tokens = "below"and failed the built-in recipe as invalid. Full-line comments are dropped before scanning; regression test added. - Proxy v6.12: the corruption tripwire trips at 128 marker characters, not 48. A
run of 48 exclamation marks is a plausible banner line in a code block; a run of 128
is not something a model writes. Real corruption runs to
max_tokens, so the later trip costs about two seconds. The OpenAI dialect also getsdata: [DONE]after the error event, so strict clients see a terminated stream rather than a truncated one. - The v1.6 GitHub release notes were cut at 9,000 characters mid-sentence and the v1.6.1 notes began with a fragment of the heading line; both are republished whole.
v1.6.1 (2026-09-03): the dashboard can switch lanes again
-
The cockpit can switch lanes again.
switch-model.shpassed bare unit names to sudo (systemctl disable qwen38-sglang), while the cockpit's sudoers allowlist pins exact argv (/usr/bin/systemctl disable qwen38-sglang.service). To sudo those are two different commands. It had always been wrong and never showed, because a leftover blanketNOPASSWD: /usr/bin/systemctlon the reference box matched anything; the day that file was tightened, every switch from the dashboard died onsudo: a terminal is required to read the password, half-applied, with the target lane enabled and the old one still enabled too. Unit names are fully qualified now, and a CI step cross-checks every privileged call inswitch-model.shagainstdashboard/sudoers-cockpit.template, so the next mismatch fails a build instead of a switch. The gate was verified against the broken version: it names the four missing entries. -
A switch says when the serving image is behind the repo.
switch-model.shchanges the checkpoint, never the serving image: onlyinstall.shbuilds that. So a box that pulled a repo whose image pin had moved would keep serving the old image without a word, and the image is where the kernel fixes live (v1.6 moved the flash lane to the merged sm_121 kernel). The flash branch now compares the installed launcher's image with the repo'sFLASH_SERVE_IMAGEand prints what to run if they differ. Silent when they match.
v1.6 (2026-09-03): the cockpit ships, Qwen's own FP8 joins the 27B lane, and the flash lane gets the merged kernel
- Spark Cockpit, the local web dashboard, is now part of the repo instead of
living on a branch the CHANGELOG kept pointing at. Opt-in and never run by
install.sh:dashboard/install-dashboard.sh, bound to127.0.0.1:30090, login is the API key. It reports lane state from a real generation canary rather than/health(a wedged SGLang answers/healthfine), keeps a hostMemAvailablefloor and an NVRM allocation-refusal counter, runs one supervised action at a time (unit start/stop/restart, lane switch, flush, abort, smoke) with every argv audited, and shows which pinned checkpoints are actually on disk. Full section in the README. conc-check.py: does this lane still answer correctly when requests share the engine? sglang#36548 reports DFlash2 corrupting state under concurrency, and a DGX Spark measurement on this repo's own cookbook-cell issue (sglang#35860) puts numbers on it: with the packed-FP4-head NVFP4 target at concurrency 8, 111 of 304 greedy answers were wrong, against 0 of 100 served one at a time, 1 of 304 with the dense BF16-head export, and 0 of 304 with speculation off. The default target of this repo is a packed-FP4-head checkpoint served with--max-running-requests 8, so this ships as a probe you can run in two minutes rather than as a claim. On the reference box, the FP8 abliterated target with DFlash2 x8 measured 60/60 serial and 304/304 at concurrency 8. The packed-FP4-head target that produced the 111/304 upstream measures 60/60 serial and 304/304 concurrent here too, and 303/304 with 3,000 tokens of context unique to each request (the one miss was verbose, not wrong, and no answer ever carried another request's content). This repo's configuration does not reproduce the failure on the same hardware and the same checkpoint. What differs is the rest of the recipe: a pinned DFlash2 image and drafter revision, an fp8 KV cache, mem fraction 0.70 and a 8192 chunked prefill, against the cookbook cell's plain 0.80 / 2048. A negative result is not a proof of absence, so the probe ships with a--padmode and a cross-contamination detector rather than a claim.- The cockpit stopped crying drift on a lane that has none. The 27B lane has two
unit templates, native and 1M, and
install.shremembers which one a box runs. The recipe generator always derived from the native one, so a 1M installation reported its own three markers (--context-length 1010000,--mem-fraction-static 0.70,SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1) as drift, permanently, with a warning badge on the rail to match. Recipes are now derived from the mode the box actually runs, read off the installed unit. On the reference box the served lane went from three differences to none, and the recipes that are not installed still differ where they truly do, by model and KV dtype. Seven tests, including the exact false alarm. - The flash lane serves the merged SM121 kernel now (
qwen38-flash:v1.6.0-kda). sglang#36845 was merged on 2026-08-30 as a different implementation than the 2026-08-28 Triton revision this repo vendored: a KDA kernel package undersglang/kernels/kda_kernels/. No stable tag carries it (v0.5.18 predates the merge and the stableqwen38flashnextimage is still the 2026-08-26 digest), so the repo vendors it the way it vendored the last one: verbatim from hashd1ve's pinned4f425ca5, sha256-pinned, with the 2026-08-28 Triton kernel kept as the fallback the route calls outside the KDA contract. The image build now imports both routes for real, so a missing symbol fails the build instead of surfacing as a decode crash nine minutes into a boot. Validated on the reference box: needle retrieval 11/11 exact at 120k prompt tokens (nine on the build under test, two more on the image that ships after a comments-only edit; fresh passphrase each, host memory floor 14.6 GiB), quality canaries 4/4 on both builds, decode 38.8 / 36.7 / 26.5 tok/s on code, math and prose, and no run of token id 0 anywhere in the campaign. - Do not send a prompt bigger than the pool to the engine port. Establishing the
above cost one wedged engine, and the mechanism is worth writing down. This lane's KV
pool is 189,056 tokens; a 190k prompt sent direct to
:30000, past the proxy's oversize guard, is queued and never admitted (#queue-req: 1, #running-req: 0), and from then on the engine answers/get_loadand/healthwhile generating nothing for anyone.POST /abort_requestrepliesnot found in rid_to_state, which is sglang#36333, whose fix (#36418) is still not merged. Only a restart clears it. The proxy refused that prompt correctly; the direct port has no guard, and that is now stated where the ceiling is documented. - The proxy refuses to relay a corrupted answer (v6.11). A decode path that loses
its state on this hardware keeps generating: it emits runs of token id 0, which is
!in the Qwen tokenizer, so the client reads a wall of exclamation marks and has no way to tell it from an answer. This is the visible face of sglang#36537 / #36558 / #36806 / #36845, and on the flash lane it is why that lane is still beta. The proxy now counts marker characters across the stream and, pastCORRUPTION_RUNin a row (48 by default,0disables), aborts the generation upstream and sends an explicitcorrupted_outputerror in the client's own dialect. It reads only the delta text it already relays, never tool-call arguments; prose with!!!in it is untouched. Covered by nine unit tests plus an end-to-end test whose fake engine streams 4,000 exclamation marks and must be cut short and aborted. - A design pass over every cockpit surface, done by reading the rendered pages
rather than the stylesheet. What it changed:
- The top bar stops breaking. A long lane name (
27B FP8 uncensored) pushed the action bar onto a second row inside a header with a fixed 58 px height, so the second row was drawn above the top of the window. The bar now keeps one row and shrinks in a stated order (the lane pill, then the target selector, then the lane button), the action groups lost their boxes, the lane button names the unit it stops instead of the whole checkpoint, and--topfollows the measured header height so a bar that does wrap takes the rail and the job strip with it. - Tracked-out capitals are gone. Every panel title, table header and micro-label
was
text-transform: uppercasewith heavy letter-spacing. They are now sentence case at reading weight, separated by a hairline instead of by shouting. - The interface says things in words. The event feed printed
unit started ({'verb': 'start', 'unit': 'qwen38-sglang.service'})and the job strip printedunit verb=start unit=...; both now saystart qwen38-sglang, from one vocabulary shared by the server and the page. State transitions use a real arrow, so->stops splitting into-and>across a line break. - Empty is designed. Every table that can legitimately be empty says what would fill it instead of showing a bare header row, the served-engine panel says once why it has no facts instead of repeating the same sentence down ten rows, and a sparkline with nothing in its window says so.
- Layout that fills the page. The request feed and its pool, and the event list and the job history, sit side by side; the Models and Setup tabs pair their panels two per row; the safety belts explain themselves across the full width with prose capped at a readable measure. Values that were sentences (the refresh periods, the opencode fit, the repo head, the cockpit mode) are short in the column and complete in the tooltip.
- Colour carries meaning again. Six buttons in six colours became one primary (switch), the destructive ones in red, the rest neutral. Gauge tracks are visible on a dark card at zero. Sparklines are drawn at device resolution.
- The click-storm test (
dashboard/tests/monkey-check.mjs) still passes 41/41, including no horizontal scrolling at 390 px.
- The top bar stops breaking. A long lane name (
- The cockpit's bind address is configurable. It was hardcoded to
127.0.0.1in the unit template, so the dashboard was only ever reachable from a browser running on the box itself, which is not where a headless GB10 keeps its browser.dashboard/install-dashboard.shnow takesDASH_BIND(default unchanged,127.0.0.1):DASH_BIND=0.0.0.0for every interface,DASH_BIND=$(tailscale ip -4)for the tailnet only. The health probe dials a real address when the bind is a wildcard, the installer warns when a non loopback bind has no API key to gate it, and the cockpit prints the exposure in its own startup line. Access stays plain HTTP behind the API key, so this is for a tailnet, not the open internet. Two things had to be fixed for a re-run to actually change anything:enable --nowleaves an already running unit alone, so the installer now follows it withtry-restart(a bind change used to report success while the old process kept the old socket), and the unit setsPYTHONUNBUFFERED=1, without which Python block buffered stdout into the journal pipe and no cockpit startup line was ever readable there. - Cockpit self-restart is off by default.
COCKPIT_AUTOHEALdefaulted to1, so an install would have restarted a wedged engine on its own. For a repo with a section on how this box freezes that is the wrong default; the unit now shipsCOCKPIT_AUTOHEAL=0and the README says how to arm it. ./uninstall.shnow removes the cockpit's privileged surface. It knew nothing aboutqwen38-dashboard.service,/etc/sudoers.d/qwen38-cockpitor/usr/local/bin/qwen38-pyspy-scheduler, so a full uninstall left a NOPASSWD sudoers file behind whilesudoers-cockpit.templateclaimed it was removed. All three are inventoried by--listand deleted by the uninstall../uninstall.sh --listsees the FP8 checkpoints. The two new repos were missing fromHF_REPOS, so about 60 GB of weights was invisible to the inventory that claims to show everything this repo left on the box.- CI covers the dashboard:
dashboard/*.pyanddashboard/tests/*.pyjoin the ruff and py_compile lists, the three dashboard shell scripts joinbash -nand shellcheck, and the two cockpit suites run as their own step. Before this, the repo's largest component was reached by exactly one gate, the typography check, and only because that one walksgit ls-files. - The FP8 targets are served with an fp8 KV cache, as they were measured.
The reference box has served
--kv-cache-dtype fp8_e4m3since 2026-08-31 and every FP8 pool figure in this repo was measured with it, but the flag was in nobody's template: aninstall.shfrom this repo produced a bf16 KV cache and about half the pool (measured, same 1m unit: 771,139 with, 382,706 without), which the 1m limits above would then have overflowed on the first long session. The NVFP4 checkpoints carry KV scales in their own quant config and are untouched. CI renders both templates for both cases and fails if the FP8 path loses the flag or the NVFP4 path gains one. ./run.shaccepts the FP8 targets.install.sh --no-serviceinstalled them happily andrun.shthen died with "MODEL_CHOICE must be stock, uncensored or flash", because its own target map and its pin list both predated them. The documented no-service path works for all four 27B targets.needle.shno longer reports a lane's own prompt limit as corruption. It probes through the keepalive proxy by default, so the oversize guard andPROMPT_CEILING_TOKENSapply to it, and its default depths run to 140,000 while the flash lane's ceiling is 128,000. A refused prompt came back asERROR, counted against the retrieval ratio and exited 1, which reads as the long-context corruption this probe exists to detect. Refusals are now labelledREFUSED, excluded from the ratio, explained (lower--depths, or probe the engine port directly withPORT=30000), and an all-refused run exits 2 because nothing was measured rather than 0 because nothing failed.oc-merge-limits.pycould report a write it had not made. It patched the limit block with three regexes; a block missingoutputorinputmatched nothing for those keys, so the file kept its old values while the tool printed the new ones and exited 0, leaving opencode on its own default cap. Missing keys are now inserted, and every run re-reads the file afterwards and restores the backup rather than report a write that did not land. The inline CI fixture becametests/test_oc_merge_limits.py, covering four incomplete block shapes, an empty one, preservation of unknown keys and JSONC comments, the no-op exit code, and the verifier itself.- 58 cockpit tests were never running.
dashboard/tests/test_lifecycle.pydeclares 58 tests across 14 classes and had no__main__block, so the CI step that invoked it as a script executed nothing and exited 0. The repo's largest suite, covering the lifecycle state machine, wedge detection and the autoheal decision, was green because it was inert. All 58 pass now that they run. CI compares the number of tests unittest reports against the number the files declare, both in aggregate and per file when each is invoked directly, so a missing entry point or an uncollected class fails instead of passing silently. - The cockpit records the KV pool each boot wins, per target. The pool is a lottery and it depends on the checkpoint, which is why this repo carries two disagreeing 1m measurement campaigns: nobody was recording it. Every transition into ready now appends the served pool under its own target key, and the lane panel reports min, max, last and spread once two boots exist.
- A 27B install stops downloading 6 GB it never serves. The DSpark drafter
was fetched by every 27B install since v1.2 replaced it with DFlash2, and
run.shrefused to start when it was missing, but no serving path had referenced it for six releases. It is no longer downloaded or required; the pin stays so the cockpit's registry still recognises a copy on disk, andgit checkout v1.1 && ./install.shfetches it through that release's own installer. A 27B target now needs about 84 GB free instead of 90, and CI fails if the set of downloaded checkpoints and the set something actually serves drift apart again. - The keepalive proxy stops enforcing a dead engine's KV pool.
pool_tokens()cached the pool for 600 s and dropped it nowhere, so for ten minutes after an engine restart the oversize guard sized prompts against the previous engine. The pool is a boot lottery (863,398 / 893,479 / 913,334 measured for one checkpoint) and changes outright between lanes (about 863k on 27B, 184k on flash), so a prompt accepted against a stale larger pool would be relayed to a smaller one and wedge the scheduler, which is the failure the guard exists to prevent. The cache is now dropped whenever the engine proves unreachable and whenever a refresh read fails, with a regression test that goes red if the invalidation is removed. - An upgrade on an FP8 box no longer demotes it to a custom model. install.sh
maps the installed
--model-pathback to a MODEL_CHOICE so a re-run keeps your target; that map knew stock and uncensored only, so either FP8 checkpoint fell through to the custom branch, dropping the pinned revision and offering only stock or uncensored as a way out. Reproduced against the reference box's own unit before and after. - The FP8 targets ship 1m opencode limits that fit their pool. The 1m limits
were static across targets: 680,000 compaction plus 200,000 output is an
880,000 worst case, against a measured FP8 pool of 771,139. The FP8 pair now
gets 480000/160000, what
oc-fit-limits.pyderived from the live FP8 engine. - The NVFP4 1m pool is documented honestly. Two campaigns on the reference
box disagree and their ranges do not overlap (README: 917K-1019K over five
v1.3-era boots;
oc-fit-limits.py: 863,398, 893,479 and 913,334 over three later ones). The README now states both, names 863K as the floor to plan against, and says plainly that the static 1m worst case sits above it, so a 1m user is told to runoc-fit-limits.pyafter boot rather than discovering it mid-session. The default itself is unchanged pending a fresh campaign. - The pool cost of FP8 was an extrapolation presented as a measurement. install.sh reasoned 10 GB of extra weights times 20,000 tokens per GB and published "roughly 200,000 fewer"; the same 1m unit measures 863,398 on NVFP4 and 771,139 on FP8, so about 92,000. Corrected in install.sh, README and here.
- The CI pin contract matched its own name, not the script. switch-model.sh
reads 16 pins; the check counted a 12-name pattern, leaving the four FP8 names
guarded by nothing. It now mirrors the script's
PINSgrep name by name, verified with a negative test, and switch-model.sh refuses a target that resolves to an empty repo or revision. oc-fit-limits.pyhas tests, and two defects fewer. It read the lane ceiling with a plainstartswith(), but systemd prefixes only the first variable withEnvironment=, so a template reordering would have made the ceiling read as absent and handed the flash lane 27B-sized limits. Kilo rounding also bottomed out at0/0on an implausibly small pool, and writing"context": 0would break opencode; it now refuses instead.- Two new targets on the 27B lane, switchable like the others and served by the
same unit:
fp8(Qwen/Qwen3.8-27B-FP8, Qwen's own release) anduncensored-fp8(edp1096/Huihui-Qwen3.8-27B-abliterated-FP8, huihui-ai's abliteration in the same format).MODEL_CHOICE=fp8 ./install.shon a fresh box,./switch-model.sh fp8on an existing one. No flag changes: SGLang reads the quantization scheme from the checkpoint's own config. - What FP8 costs, measured here: the weights are 30.9 GB against 21 GB for NVFP4, which SGLang takes out of the KV pool (measured on the same 1m unit: 863,398 tokens on NVFP4, 771,139 on FP8, so about 92,000 fewer), and decode is bandwidth bound on GB10 so it is slower too, 108 tok/s aggregate at 8 streams against 135-148 for the NVFP4 default. What it buys is the quantization question off the table.
- Checked before pinning the abliterated FP8: architecture
Qwen3_5ForConditionalGeneration, vision tower present, not gated, 30.9 GB, and the weights compared against Qwen's official FP8 file by file, 66 names in common and not one shared hash, so the abliteration is real rather than a rename.lm_headis left out of the quantization, which is what keeps an FP8 checkpoint loadable by SGLang (the unsloth and RedHat FP8 builds quantize it and their own cards say SGLang cannot load them). oc-fit-limits.py: the generated opencode config asks for no more than the served engine can actually hold, and the switch names the checkpoint behind the opencode entry it writes.- 27B overlay: vendors the upstream mrope fix for the fused Qwen3.5 rope kernel.
- Two gaps stated in the README rather than papered over. The FP8 pair does not
yet carry a full
./bench-matrix.shrun the way the other three targets do (108 tok/s is a single aggregate probe), and the memory ceiling of FP8 combined withCONTEXT_MODE=1mis not measured: the "27B lane measured flat at 100K, 200K and 300K" result was measured on NVFP4, and FP8 puts about 10 GB more in residence. Run the FP8 pair at native context until that curve exists, or watch hostMemAvailableif you run it at 1M.
v1.5.9 (2026-08-30): opencode is a choice, and every choice is written down
./install.sh --no-opencode(one-liner:| bash -s -- --no-opencode): API only. No generated config, nooclauncher, andswitch-model.shleaves your opencode default model alone. The choice persists across re-runs and upgrades through a marker file (~/.config/qwen38/opencode.off), like the installed model, context mode, port and cache;--with-opencodeturns it back on. Your own~/.config/opencode/opencode.jsonis never rewritten in either mode../uninstall.sh --listshows the marker.- switch-model.sh now updates the default model in the config opencode actually reads
(
~/.config/opencode/opencode.json) and not only in the generated artifact: on the reference box, opencode kept opening on the previous lane after a switch. - The installer no longer shrinks the 27B opencode limits of a box whose installed unit serves more than 262,144 tokens when re-run in native mode (a native re-run had turned a 1M box's 700000/200000 into 194048/64000, hence a "21K tokens = 11 percent" gauge).
- The
oclauncher respects an inheritedOPENCODE_EXPERIMENTAL_OUTPUT_TOKEN_MAXinstead of hardcoding the cap of the last install (a flash install had capped a 1M box at 32000). - keepalive proxy: every request leaves exactly one end line in the journal, including a client that vanishes while its body is still being read (a request had shown as "in flight" forever).
- README: a "Your choices, and how they combine" table under Quickstart, with the one-liner and clone forms of every sensible combination.
v1.5.8 (2026-08-30): an engine that is down is reported as down
- keepalive proxy v6.9: when the engine does not answer (stopped, crashed, restarting, still
loading), every path answers
503 engine_unavailablewithRetry-After: 30and a message that says the request was NOT refused for its size and can be retried unchanged once/healthanswers 200. Before, a body over 200 KB met the oversize guard first,/tokenizefailed because the engine was gone, and the size fallback refused it as400 context_too_long("at least ~408841 tokens by size" for a 68,626-token request, live on 2026-08-30 at 01:15 while the flash engine was restarting). Unknown request shapes still refuse on size, and the message now says that the engine itself is up. - The field case behind it: the flash engine (SGLang dev build
d91c3682b) hitNVRM: Xid 31(GPU MMU fault,FAULT_PTEread) andCUDA error: an illegal memory access was encounteredin the QSA indexer prefill path (qsa_indexer.py forward_cuda -> get_prefill_mqa_inputs), one second after a 68k-token request had finished, inside the one-token generation thatGET /healthperforms in this build when the engine is idle. First Xid in 60 days of kernel logs, 30 GiB of host memory free, noNV_ERR_NO_MEMORY. systemd restarted the unit (Restart=always, 15 s) and it served again 8 min 39 s later with the PLE table reused. - Tests:
tests/test_proxy_guard.pynow covers connection refused,5xxand4xxfrom/tokenize, and runs the real proxy process in front of a fake engine that knows its pool but is still loading: a 1 MB body gets503 engine_unavailable, never400 context_too_long.
v1.5.7 (2026-08-29): the ceiling follows the lane
switch-model.shnow sets the keepalive proxy's one-prompt ceiling for the target lane (flash 128,000 tokens by default, the 27B lane none), restarts the proxy and says so. In v1.5.6 onlyinstall.shwrote it, so a lane switch left the proxy with the previous lane's ceiling: a 27B lane capped at 128K, or a flash lane without one. Tested both ways on the reference box (unit and running process checked, no engine restart needed).needle.sh --mem: samples host MemAvailable every 0.5 s during each prompt and reports the floor per trial plus a summary, so anyone can measure the memory ceiling of their own box the way BENCHMARKS did. No sudo.- Docs: the 27B lane measured flat at 100K, 200K and 300K on the 1M unit (the prefill growth is flash-specific); a 40-minute soak under the 128K ceiling (24 prompts, exact, footprint plateaus); ATTRIBUTION names the exact revision of the vendored sm121 kernel.
v1.5.6 (2026-08-29): the oversize guard counts instead of guessing
- keepalive proxy v6.8: the v6.7 guard refused every body whose size divided by
2.5 chars per token exceeded the KV pool. English prose runs 3.4 to 4.6 chars
per token, so a 140k-token prompt (479 KB) was refused as "192k tokens" while
the pool served it (soak of 29/08: 60k, 100k and 120k prompts looped without a
flush, 140k got a 400 every time). Now the size only nominates a body; the
engine's own
/tokenize(present in both images this repo ships; 644 ms for 474k chars, measured) gives the exact prompt length, chat template applied, Anthropic-shaped bodies converted. Refusal when the count exceeds 92 percent of the pool (OVERSIZE_MARGIN_FRAC=0.08, the same ceiling the README states: 165K of 178,560); the size-based refusal remains the fallback when the engine cannot count. Image, audio and document parts (OpenAI parts or Anthropic blocks) are counted as a fixed budget of 4096 tokens each (TOKENS_PER_MEDIA), never as their base64 text. 8 offline tests (fake/tokenize) run in CI. Live on the reference box after deployment: the 140k needle passes through the proxy (140,111 tokens counted, 92 s), a 1.24 MB body is refused in 0.6 s as 230,533 prompt tokens against 169,633 usable, a 300 KB Anthropic-shaped body is served, a 600 KB image body is counted as 4,153 tokens and reaches the engine. - Measured ceiling for one prompt (direct, 29/08, pool 184,384): 166k, 171k and 177k tokens (90, 93 and 96 percent of the pool) all served with exact needle retrieval in 112 to 123 s. The proxy's 8 percent margin is room for the answer, not a hang boundary.
- The KV pool is not the ceiling, memory is. Measured on the reference box at
fraction 0.81 (fresh boot, 24 GiB available idle): the prefill of a long prompt
grows the engine's footprint by about 0.27 GiB per 1k tokens beyond ~90k
(120k prompt: +7.4 GiB; 135k: +11.4; 150k: +15.3; 177k: +22.8, MemAvailable
down to 0.8 GiB and 15
NVRM: NV_ERR_NO_MEMORYkernel lines, the livelock edge). The process RSS does not move (unified CUDA allocations). Two effects, not one: GPU driver allocation refusals, which torch recovers from by freeing its cache and retrying, showed up between 125k and 150k depending on the run (0 at 135k in one run, 11 at 125k in another: they follow the page cache state, not a clean threshold, and every prompt still answered correctly); and the host memory floor, the hard limit, which the curve puts near 170k. The proxy therefore enforces an absolute per-lane ceiling for one prompt,PROMPT_CEILING_TOKENS, set by install.sh in the keepalive unit: 128,000 on the flash lane, which keeps about 14 GiB available at the prompt's peak on a 128 GB box (override withPROMPT_CEILING_TOKENS=), none on the 27B lane (not measured, then measured the same evening: flat, +3 GiB from 100k to 300k on the 1M unit, so its limit stays the pool). Deployed on the reference box throughinstall.sh: 140k and 130k prompts refused with the engine's count, 125k served in 81 s. A smaller prefill chunk (512) was tested and rejected: 30 percent slower cold prefill and a worse floor at 150k (6.7 GiB, 13 driver refusals). The v1.5.4 note "host headroom unchanged at 23 GB" was an idle measurement and is corrected in the README. - CHANGELOG cites the upstream PR behind
SGLANG_OPT_MAMBA_SKIP_DECODE_LOCK(sgl-project/sglang#32228, merged 2026-07-29, off by default).
v1.5.5 (2026-08-29): clean stops, A/B verdict on DSpark v2
- The three unit templates declare
SuccessExitStatus=137 143: docker ends the foreground engine with SIGKILL or SIGTERM on a plainsystemctl stop, which systemd reported asfailedafter every intentional stop. - BENCHMARKS: DFlash2 vs the new DSpark v2 drafter on this box, same battery, both native at 262144 on the SGLang image this repo ships. A tie on the median (29.4 to 30.4 vs 29.5) with DSpark v2 behind on the cells that are stable across runs (reasoning FR, prose), so DFlash2 stays the 27B drafter.
needle.shexits 2 with a clear message when the calibration request fails.
v1.5.4 (2026-08-29): the proxy stops two ways of wedging the flash scheduler
Root cause work on the four hangs of 2026-08-29 (gdb and py-spy on the spinning
scheduler, a controlled campaign of launcher variants): the scheduler of this
build busy-loops forever, with /health still answering, when a queued request
can never be admitted. Two triggers reproduced: a prompt longer than the KV pool,
and a large prompt that needs a mamba state slot only an eviction can free (the
default cache is 9 to 15 slots depending on the memory left at boot, 5 per running
request; 9-slot boots hang on the second large prompt, 15-slot boots served six
in a row). No launcher flag fixes it without amputating the KV pool (explicit
sizes, memory ratio and max-running-requests were all measured), so the fix
lives in the keepalive proxy (v6.7), which every service install already fronts:
- a request whose most optimistic token estimate exceeds the engine's KV pool is
refused with a clear 400 (
context_too_long) instead of wedging the engine; - when a client disappears mid-stream, the proxy now posts
/abort_requestfor that request id (closing the socket alone left orphan generations decoding to their max_tokens; measured 29/08).
The launcher also sets SGLANG_OPT_MAMBA_SKIP_DECODE_LOCK=1, an option of this
build that stops locking a request's cached mamba state during decode (the
request already works on its own copy-on-write slot; upstream PR
sgl-project/sglang#32228, merged 2026-07-29, off by default). Measured: with the lock,
9-slot boots hang on the second large prompt; without it, four and then five
consecutive large prompts were served with the evictions the lock used to
block. The state cache becomes 12 slots of 4 per request, and with
--mem-fraction-static 0.81 (host headroom measured unchanged at 23 GB) the KV
pool grows to 178560 tokens, from 159,552.
needle.sh exits cleanly when the engine is unreachable. The cockpit (then a
branch, shipped in v1.6) adds the generation probe, the wedged state with
optional autoheal and a cache flush when the engine idles with a mostly-held pool. Upstream report: sglang #30314 (comment).
v1.5.3 (2026-08-29): PLE table reused across boots
Every flash boot rewrote the 48 GB PLE table through a random-access mapping
(issue #7 by nullburn: ~42 GB written per boot, NVMe saturated by 4 KB faults,
59-minute boots once the page cache is cold; confirmed on the reference box).
The table is a deterministic function of the checkpoint, so it now carries a
completion marker (served revision, geometry, dtype) written after msync; a
boot whose marker matches maps the file and skips the copies, and a real
(re)build runs with sequential readahead before switching to MADV_RANDOM for
serving. The launcher tags the table with the served revision
(SGLANG_QWEN4_PLE_TAG) and wipes the marker together with the table after an
interrupted boot; a tag that is not a commit sha (for example a branch name
passed through MODEL_REV=main) disables reuse, so a moving upstream can never be
served from a stale table; switch-model.sh rewrites the tag with the revision.
Serving image tag: qwen38-flash:v1.5.3.
Measured on the reference box: rebuild boot about 12 minutes (55 GB written, sequential readahead), reuse boot 500 s with 352 MB of block writes for the whole boot and the table untouched, exact needle retrieval at 60k and 120k real prompt tokens on the reuse boot.
Known and under investigation (unchanged by this release): with the default
mamba state cache of this build (9 to 15 slots depending on the memory left at
boot, 5 per running request), a large prompt that needs a slot only an eviction
can free, or a prompt longer than the KV pool, makes the scheduler busy-loop
forever instead of refusing the request (/health keeps answering; gdb and
py-spy show the event loop spinning in recv_requests with the request queued).
Four occurrences on 2026-08-29. Mitigations shipped so far live in the cockpit
(then a branch, shipped in v1.6: generation probe, wedged state, optional
autoheal, cache flush when idle); a proxy-level refusal of oversize prompts and
an explicit cache size follow.
v1.5.2 (2026-08-29): flash lane correctness hotfix
Fixes a silent long-context corruption in the v1.5 flash lane. The v1.5 overlay widened the QSA trtllm sparse-decode gate to sm_121; on GB10 that routes decode to FlashInfer's XQA kernel, which emits runs of token id 0 deep in long contexts (hashd1ve, 2026-08-29: 1 of 4 requests at 120k tokens, 4 of 4 at 210k). The gate is back to upstream and sm_121 decode uses the packed Triton varlen kernel of sglang#36845 (vendored verbatim, sha256-pinned, attribution in flash-sglang/ATTRIBUTION.md). Serving image tag: qwen38-flash:v1.5.2.
Validation on the reference box: exact needle retrieval 12/12 at 40k, 67k and
80k real prompt tokens (the depths the probe reached), on top of the kernel
author's 4/4 at 120k/190k/210k. Not yet validated here beyond that: prompts of
~120k tokens wedged this box's scheduler twice on 2026-08-29 (prefill stalls,
/health keeps answering, no output), a pre-existing behavior unrelated to the
kernel route and under investigation (mamba state cache of 9 slots against one
checkpoint per 1024-token prefill chunk is the leading hypothesis). Until that
lands, treat ~100k tokens as the practical ceiling of one prompt on this lane.
Also in this release, after a real scheduler wedge on this box (two ~109k-token
requests admitted into a 159k-token KV pool, scheduler spinning at 100 % CPU
with /health still answering):
- flash lane:
--max-running-requests 1(one giant context at a time; a second request queues instead of fighting for the pool). Small concurrent requests were never the use case of a single-user box. The boot log shows the flash lane never actually served two requests at once: the mamba state cache is sized to 9 slots by default and each running request needs 5 (max_running_requests is capped to 1 by the mamba state cache), so one active request plus four cached prompts fill it and the next prompt forces an eviction, which is where both hangs of 2026-08-29 happened. v1.5.3 sizes that cache explicitly. - opencode config for the flash lane: context 110000 (was 226000, which let a conversation outgrow the pool before compaction). The converging install now merges the lane's limits into an EXISTING ~/.config/opencode/opencode.json too (targeted edit, dated backup, comments and other providers untouched), instead of only printing a merge reminder.
uninstall.sh --listknows qwen38-flash:v1.5 as a superseded image.
v1.5.1 (2026-08-28)
Flash lane robustness hotfix: poisoned PLE table self-healing.
- A flash boot interrupted while the 48 GB PLE mmap backing file is being
written (power cut, manual stop, kill) left a stale table that wedged every
later boot in a silent scheduler spin (100% of one core, empty journal, no
IO). Root-caused and reproduced live; regenerating the table fixed it in
one boot. The launcher now sets a
.loadingmarker at start and a detached waiter removes it once/healthanswers; finding the marker at launch means the previous boot never got there, so the table is wiped and rebuilt automatically (one ~11 min boot instead of a wedged lane). - No flag, image, or checkpoint changes; 27B lanes untouched.
v1.5 (2026-08-28)
The flash lane moves to SGLang: working prefix caching, tool-loop fix, vision on.
- Flash target now serves on SGLang (
lmsysorg/sglang:qwen38flashnext, digest-pinned), same engine family as the 27B pair. The reason: prefix caching works there and vLLM's is blocked by a GB10 GDN bug (tracked upstream as vllm#54173, filed with this box's exact environment). Measured on the reference box: a 30K-token conversation re-served in 0.5 s instead of 18.4 s (x36); a fresh question on a known 30K prefix in ~3 s (x5.8); decode 34-42 tok/s (vLLM lane: 31); vision validated including with large prompts; canaries 4/4; needle at 100K passing. flash-sglang/vendored overlay (MIT, by hashd1ve, over Apache-2.0 SGLang sources): patch 1 mmaps the 51B PLE table from NVMe (SGLANG_QWEN4_PLE_MMAP_DIR, ~48 GB backing file written once at first boot,PLE_DIRenv, default~/flashnext-ple); patch 2 fixes the QSA resolvers on sm_121 (+32% decode). Patch 2 is the same fix as upstream PR #36556, which independent reports confirm also fixes the token-ID-0 tool-call loop (#36537); this repo carries both of that PR's resolver edits (the hashd1ve tree had one) after verifying the FA4 dispatcher module exists in the pinned image. Provenance is proven at vendor time: each file diffs against the module extracted from the pinned image in exactly the patched region.- The lane authenticates (
--api-key, like everything else here); early public recipes for this model ran open. - The v1.4 vLLM lane is retired (git history keeps it:
git checkout v1.4). Upgrades from v1.4 keep port/cache/model choices and regenerate the launch script on the new engine. The flash lane now also serves the Anthropic protocol, like the 27B lane. - 27B: known upstream reports, not reproduced here. sglang#36548 (DFlash2
can attach a message to the wrong context under concurrent load) and
sglang#35150 (speculative verify diverges from plain decode in the SSM
transition) affect DFlash2 builds newer than this repo's pins. Reproduction
on this repo's exact pinned build: 100 greedy ordering prompts, serial AND
at concurrency 8, zero wrong answers. The pins stay; documented options if
you serve many concurrent correctness-critical streams: the
RadixArk/Qwen3.8-27B-NVFP4-BF16-LMHeadtarget (009632f), DSpark v2, or--max-running-requests 1. - Known upstream behavior documented and reproduced on this lane (sglang#35537): with chunked prefill, a long-decoding request can starve new requests until it completes. Single-agent use is unaffected.
./uninstall.sh --list: read-only inventory of every artifact any version of this repo (v1.0 through v1.5) may have left on the box: units, drop-ins, unit backups, config, the oc launcher, local AND base docker images (matched by tag or digest: a digest pull leaves no tag), the five checkpoints, the PLE backing file, each with its size. The uninstall itself now prints reclaim commands only for what is actually present, and the installer points out superseded engine images after an upgrade (e.g. the ~40 GB of v1.4 vLLM images) without ever deleting data on its own.- CI: flash guards moved to the SGLang launcher (radix cache, NEXTN, split
attention backends, api-key, PLE mmap dir, no
--language-only, revision lock), vendored-file gate greps, generator executed on all three shapes.
v1.4 (2026-08-27)
Qwen3.8-Flash-Next 176B as a third switchable target, on one box.
- New target
MODEL_CHOICE=flash: Qwen3.8-Flash-Next (176B hybrid MoE, 6B active, QSA sparse attention, multimodal) in RadixArk NVFP4, served by vLLM with the model's own MTP speculative head. Full native 262,144 context on a single GB10. Measured on the reference box: decode ~31 tok/s (code/reasoning), prefill ~2,280 tok/s at 60K and ~2,100 at 189K, quality canaries 4/4, needle passing at 190K+ depth. flash/vendored overlay (Apache-2.0, by blazux): the checkpoint's 51B N-gram (PLE) table is mmap-served from NVMe through the page cache instead of living in the unified pool; that single change is what makes the model fit. Two files, sha256-pinned, and the bit-exactness test of the gather runs inside the freshly built image at every install (the build refuses to tag on failure).qwen38-flash.service: same hardening as the 27B unit (docker caps 110g, Restart=always, ExecStartPre rm, API key, serve-time --revision lock, HF_HUB_OFFLINE boot) plus the GB10-specific serving flags (PIECEWISE CUDA graphs with the PLE op split out, prefix caching off on sm_121, FlashInfer autotune off), each now guarded by CI.- Cross-engine switching:
./switch-model.sh flash/stock/uncensored. Both units publish the same port and are never enabled together; the switch flips which unit starts at boot, re-verifies the checkpoint, regenerates the target template and re-points the opencode default model. The installer converges on whichever target is installed, including flash, and never resets a served choice. - opencode config generation reworked: one provider per installed engine
(
qwen38,flashnext), each withlow/medium/xhighreasoning-effort variants (xhigh added for the 27B too), written by json.dump instead of a heredoc; the default model follows the installed target. Flash limits: 226,000 context / 32,000 output inside the 262,144 window. - Patched chat template for flash (
chat-template-flashnext.jinja): the upstream Flash-Next template ships the same two agent-hostile behaviors as the 27B one (500 on reasoning_effort "max"/"high", 500 on mid-conversation system messages); the same two surgical fixes apply, verified by rendering all six effort levels. - CI: flash unit render guards (the GB10-critical flags can never silently regress), flash overlay manifest check, opencode generator executed on all three install shapes, pin contracts extended (12 for switch-model.sh).
- Uninstall now removes both engines and lists the flash reclaim paths.
v1.3 (2026-08-27)
Release validated end to end on the reference box before tagging: a converging
upgrade over the live install (only the Description and the new --revision
changed in the unit, everything else preserved), stock and uncensored switches
with reboots proving the revision lock (the pinned sha served while the cache
held a newer upstream revision AND a refs/main pointing at it), ./run.sh
foreground with a clean stop, a from-scratch cache simulating a fresh machine
(which caught the Xet stall and the anonymous throttling fixed below),
./bench.sh at 50.7 tok/s greedy median (reference: ~50), and a real opencode
session writing files through the oc launcher and the keepalive proxy
(which caught the --yolo flag-position fix below).
- The 1M context mode:
CONTEXT_MODE=1m ./install.shinstalls the preset that serves the reference box daily since 2026-08-22, as one converging command. It patches YaRN static scaling (factor 4.0) into both cachedconfig.jsonfiles via the newpatch-yarn.py(target AND DFlash2 draft, originals backed up asconfig.json.pre-yarn; the shared script also replacesswitch-model.sh's inline patcher and handles the draft's root-level config shape), renders a dedicated 1m unit (--context-length 1010000,--mem-fraction-static 0.70,SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1,HF_HUB_OFFLINE=1to shield the patched configs from Hub re-resolution,Restart=alwaysbecause a Triton crash measured on 2026-08-22 exited 0 andon-failurenever relaunched it), and installs the vendored keepalive proxy (keepalive-proxy.pyv6.6 +qwen38-keepalive.serviceonPORT+1): SGLang buffers tool-call arguments (127 s of measured silence on a 400-line write) and agent CLIs abort silent streams, so the proxy injects the official Anthropic ping event / an authentic empty OpenAI chunk every 10 s at SSE event boundaries only, closes the upstream when the client leaves, and reports an explicit error after 3600 s of upstream silence../run.shrefuses 1m (the proxy is a service);uninstall.shremoves the proxy service too. Native stays the default and is byte-identical to v1.2.7 behavior. - Converging upgrades: re-running
install.sh(or theget.shone-liner) now reads the installed unit and keeps the operator's choices instead of silently resetting them to the defaults: the target model (stock/uncensored, or a custom--model-path, kept verbatim with its download and template steps skipped), the context mode (native/1m, plus the proxy port), the port, and the HF cache location. An explicit env var (MODEL_CHOICE=,CONTEXT_MODE=,PORT=,PROXY_PORT=,HF_CACHE=) still wins. The previous unit is backed up to~/.config/qwen38/qwen38-sglang.service.bak-preupdatebefore being rewritten, so hand-tuned flags stay recoverable. Theoclauncher passes--yoloafter the user's arguments, not before: opencode's parser rejects global flags placed before a subcommand (oc run ...printed the help instead of running; caught by the release campaign's live opencode test). - The repo's client story moves from Claude Code to opencode.
install.shnow writes a complete provider config to~/.config/qwen38/opencode.json(limits sized per context mode so no request can ever 400, reasoning-effort variants, vision declared, key referenced via{file:...}), installs anoclauncher to~/.local/bin/octhat lifts opencode's hidden 32000 max_tokens cap to the declared output limit (never clobbering a foreignocbinary), and no longer writesclaude-code.env(an existing copy keeps working but is unmaintained). The Claude Code warmup is removed:--with-claude-warmupis now a no-op with a notice,warmup-claude-code.shleaves the repo, and an installedwarmup.confdrop-in from an earlier version is cleaned up on upgrade (other drop-ins are untouched). The template patches are unchanged: they were always server-side and client-agnostic. - New
extras/directory, two field-tested opt-ins from the reference box:extras/opencode/auto-continue.js(opencode plugin that resumes a session after a transient technical error or a stuck compaction; never after a deliberate abort or an auth problem; stops after 25 relaunches without progress) andextras/cake-ingress/(ingress anti-bufferbloat: CAKE shapes received traffic just under the measured downlink so SSH and the API stay at milliseconds while a model download saturates the link; interface auto-detected, BANDWIDTH deliberately required and validated, full measurement sweep in the script header,setup.sh --uninstallrestores stock networking). The README's Operations section also documents/abort_requestfor killing abandoned generations on direct connections. - The keepalive proxy ships with every service install, not only 1m: SGLang buffers tool-call arguments at any context length (127 s of measured silence on one 400-line write) and agent CLIs abort silent streams, so the proxy is the difference between a finished write and a client retry loop. The generated opencode config points at the proxy port on service installs and at the server directly with --no-service (where ./run.sh has no proxy). The oc launcher resolves opencode from PATH with a fallback to ~/.opencode/bin/opencode.
- The native unit moves to
Restart=always(matching the 1m unit and the reference box): a Triton compile crash measured on 2026-08-22 terminated withSystemExit: 0, a clean exit in systemd's eyes, soRestart=on-failurenever relaunched it. Documentation sweep: real disk numbers everywhere (~90 GB fresh, +22 GB with both targets cached), theHF_HUB_OFFLINEguidance rewritten from measurements, and a note thatclaude-code.envis never overwritten again. - Serve-time revision lock: the units and
run.shnow pass the pinned--revisionto the server for the target model (the draft already had its own pinned revision flag). Until now the pin only governed the download: at boot the server could still resolve the repo's "main" and pick up an upstream push (RadixArk has already published two newer stock revisions). With the sha passed to the server, upstream changes cannot affect what is served, online or offline;switch-model.shrewrites the revision together with the model path, and a kept custom model reuses its unit's existing revision or none. Combined withHF_HUB_OFFLINE=1in the 1m unit, the running configuration is exactly the repo's, whatever happens upstream. - Fresh-machine hardening and small fixes, ahead of the release stress test.
Downloads: a fresh-cache pull stalled forever at 3.3 GB during the release
campaign; root-caused live to the hub library's Xet transfer backend (an
established socket moving zero bytes, 0-8 MB/s when moving at all, while
the classic CDN path measured 89 MB/s on the same box in the same second).
The download containers now set
HF_HUB_DISABLE_XET=1, plusHF_HUB_DOWNLOAD_TIMEOUT=30and a 5-attempt resume loop as a belt for any other silent stall, andHF_TOKENis passed through for authenticated rate limits (a token already in$HF_CACHE/tokenkeeps working through the mount). Also, pinned-sha downloads now also write the cache'srefs/mainwhen absent (huggingface_hubonly writes refs for named revisions, so on a fresh machine the 1m unit'sHF_HUB_OFFLINE=1boot would fail to resolve "main"; never overwritten if present).switch-model.shalso regenerates the patched chat template from the target's own snapshot on every switch (byte-identical between the two known targets today, verified; the belt keeps the served template following the served model if one ever diverges).run.sherror messages now echo the fix-it command with the activeMODEL_CHOICEprefix, so following the advice prepares the configuration that failed, not the default one.uninstall.sh's reclaim list gains the uncensored checkpoint (~22 GB). Theoclauncher passes--yolo(the reference box's way; documented, removable in the launcher file). - Model switch option:
MODEL_CHOICE=stock|uncensoredininstall.shandrun.sh, plus./switch-model.shfor surgical live installs (downloads the checkpoint, patches 1M YaRN config if the unit uses it, rewrites only the--model-pathline, daemon-reload; no service restart by the script itself). Uncensored target = huihui-ai abliteration re-quantized with the identical RadixArk modelopt NVFP4 recipe (edp1096/Huihui-RadixArk-Qwen3.8-27B-abliterated-NVFP4@21565d3); the DFlash2 drafter stays unchanged in both modes.patch-template.pynow takes the repo as an optional fourth argument.switch-model.shrewrites the unit via a temp file +sudo install -m 644(nosudo sed) and skips the download/YaRN steps idempotently when already done. See README, "Stock ↔ Uncensored target model".
v1.2.7 (2026-08-21)
run.sh now passes --sleep-on-idle too, matching the systemd unit which got the flag in
v1.2.6. Contributed by struxoje in #4,
opened before v1.2.6 was even tagged: the community caught the run.sh path while the unit
path was being A/B tested. Same behavior as measured in the v1.2.6 notes (scheduler idle
CPU 101 % -> 1.7 %, wake-up TTFT unchanged).
v1.2.6 (2026-08-21)
The systemd unit now passes --sleep-on-idle. Without it, SGLang's scheduler busy-spins a
full CPU core whenever the queue is empty, which two users measured as +10-12 W at the wall
(alef204 and emX0r on the forum thread, root-caused by emX0r in MiaAI-Lab issue #4; the flag
exists in the pinned image, so no rebuild). A/B on the reference box before adopting:
scheduler CPU at idle 101 % -> 1.7 %, module power 12.1 -> 10.5 W (median over 60 s), wake-up
TTFT unchanged after 60 s and 300 s of idle (0.234-0.240 s -> 0.234-0.239 s), decode
throughput in family (41.5 tok/s code, 52.8 math, answers correct). Existing installs:
re-run the one-liner or ./install.sh --no-start, then sudo systemctl restart qwen38-sglang.
v1.2.5 (2026-08-21)
Claude Code env pair rebalanced after a real 64K truncation report and a request-capture
study on Claude Code 2.1.238. CLAUDE_CODE_MAX_OUTPUT_TOKENS goes 64000 -> 128000, which
is the CLI's hard ceiling for a third-party model id (any higher value, e.g. 258048, is
silently capped back to 128000). CLAUDE_CODE_MAX_CONTEXT_TOKENS goes 258048 -> 130048,
because the pair must satisfy CONTEXT + OUTPUT <= 258048: the server rejects any request
where input + max_tokens exceeds 262144 (a 400, no clamping), Claude Code never shrinks
max_tokens to fit, and its auto-compaction reserves at most 20000 output tokens. The
previous 64000/258048 pair had a latent dead zone (every request past ~198K input tokens
got a 400 before auto-compaction fired at ~225K); no field report yet, fixed preemptively.
Users who prefer longer context over very long single answers can set 64000/194048, as
documented in the README. Existing installs: re-run the one-liner (or ./install.sh --no-start) to regenerate claude-code.env; the serving image and unit are untouched.
Second fix from the lifecycle audit: the step-3 "container sees the GPU" line always printed
blank, because the image's entrypoint banner starts with an empty line and the check displayed
the first line of output. The GPU line comes after the banner. The check now extracts the
actual GPU 0: ... line, refuses to continue if no GPU line appears even when the command
exits 0, and runs one container instead of two. Verified on the reference box, including with
the GPU busy serving.
v1.2.3 (2026-08-20)
One fix from the lifecycle audit: the systemd unit file was installed with mode 600 (a
mktemp + sudo cp interaction), so the service ran fine but systemctl cat and any
non-root inspection of the unit failed with permission denied. install.sh now writes it
with install -m 644, the standard mode for unit files. Re-running the one-liner (or
./install.sh --no-start) fixes the mode in place without restarting the service.
v1.2.2 (2026-08-20)
Typography pass, no functional change. All prose dashes were removed from every document,
script message and comment (house style). One comment line inside the vendored overlay
(dflash2/sglang/srt/models/dflash.py) was reworded, so the manifest is regenerated and the
serving image tag becomes qwen38-dflash2:v1.2.2 (rebuilt automatically by ./install.sh,
about a minute, offline). Runtime behavior, flags, pins and performance are identical to
v1.2.1. Also validated in this release cycle, on the reference box: the full lifecycle
get.sh one-liner (fresh install, upgrade over a modified clone, uninstall/reinstall),
./run.sh end to end, and the manifest tamper guard (a modified overlay file refuses to
build).
v1.2.1 (2026-08-20)
Correctness alignment of the vendored DFlash2 overlay with upstream, plus the quality study that the community's reports triggered.
- Quantized-head logits: crop → contiguous mask. Upstream merged the official quantized
lm_head support for the DFlash2 selector hours after this repo's v1.2 vendoring
(sgl-project/sglang#35496): slicing the
padded local vocab produces a non-contiguous view that flashinfer's radix top-k rejects or
can misread; the fix keeps the logits contiguous and masks the padded tail to -inf. Both
overlay call sites now follow that pattern. The serving image tag becomes
qwen38-dflash2:v1.2.1(rebuilt automatically by./install.sh). - The quality question, measured. Forum users reported a 2-6 point tool-eval drop and anecdotal hallucinations vs DSpark. We measured instead of guessing, on a deterministic server (reproducible to the point): tool-eval 93/93 (DSpark) vs 91/91 (DFlash2), a stable 3-scenario delta; then GSM8K 200: exact parity, 188/200 both; IFEval 200: split within noise (prompt-level favors DSpark with 15 excluded timeouts muddying its denominator, instruction-level favors DFlash2). A token-identity test at temperature 0 against the pure autoregressive model shows both drafters diverge from it (10/10 prompts each, equally early): speculative decoding is lossless in exact arithmetic, not in floating point, and near-tie argmax flips cascade. The 2-3 tool-eval points are those flips landing, not a quality regression. Full methodology and numbers in BENCHMARKS.md, "The losslessness study". DFlash2 stays the default.
v1.2 (2026-08-20)
DFlash2 becomes the default. The service now serves the z-lab DFlash2 drafter instead of
DSpark. Measured on the reference box against the v1.1 config, same battery, same night,
deterministic mode, thinking on: every single-stream cell improves except math (parity), with
free prose FR 20.2 vs 14.0, reasoning FR 43.5 vs 30.5, code DE 39.4 vs 25.4; aggregate
throughput 135-148 tok/s at concurrency 8 (vs 100-104) and 258 tok/s at c32
(--max-running-requests 32). Quality canaries pass; speculative decoding remains lossless by
construction. Validated end to end including a full machine reboot.
No official SGLang image contains DFLASH2 yet (merged upstream 2026-08-19), so install.sh
now builds the serving image locally: the same pinned base digest plus five sha256-verified
overlay files vendored in dflash2/ (Apache-2.0 from sgl-project PR #35371, plus MiaAI-Lab's
MIT-licensed quantized-lm_head fix; full provenance in dflash2/ATTRIBUTION.md, K choice per
r0b0tlab's block sweep). The build is offline and takes about a minute. The day an official
image ships DFLASH2, the repo repins to it and dflash2/ is retired.
Upgrade: git pull && ./install.sh (key and template kept; ~4 GB one-time draft download;
first boot recaptures CUDA graphs). To stay on the DSpark config instead:
git checkout v1.1 && ./install.sh.
Also: the DSpark draft pin moves to RadixArk's 2026-08-16 revision (identical weights and config; the commit only fixed the transformers reference code).
v1.1 (2026-08-20)
Two flag changes, both measured overnight on the reference box (same battery, same night,
multiple boots per verdict). Upgrade: git pull && ./install.sh (your key and template are
kept, the unit is rewritten, the service restarts).
--disable-flashinfer-autotune(new): FlashInfer re-runs its kernel autotune at every boot and the result varies: the identical config measured anywhere between 92 and 111 tok/s aggregate at concurrency 8 depending on the boot, and up to ±15 % on verify-heavy single-stream cells (code, math). Disabling the autotune makes boots deterministic (single-stream cells reproduce to the decimal across boots, c8 within ±1.6 %) and cuts about 2 minutes of boot time, at a cost of roughly 2 % of the lottery's average. Every published GB10 comparison that did not control for this contains boot noise; see BENCHMARKS.md, "The boot lottery".--cuda-graph-max-bs 4→8: with--max-running-requests 8, decode batches of 5 to 8 requests were falling outside the captured CUDA graphs and running eager. Capturing up to batch size 8 is worth +6.5 % aggregate throughput at concurrency 8 (measured deterministic, reproduced across boots) for about 0.4 GB of extra capture memory and a slightly longer first boot.
Net effect on the reference box: concurrency-8 aggregate goes from a 92-111 lottery to a stable 100-104 tok/s, and benchmarks against this config become reproducible.
Also in this release: bench.sh counts vLLM ≥ 0.27's renamed reasoning stream field and warns
above the physical ceiling (issue #2), BENCHMARKS.md gains third-party sections (vLLM DSpark
battery, long-prefix ladder) and the renamed-field trap.
Coming next: a DFlash2-based configuration (z-lab drafter) currently measures +40 % aggregate at c8 and wins every single-stream cell on this box; it ships as the default once an official SGLang release image contains DFLASH2 (merged upstream 2026-08-19). Watch this repo.
v1.0 (2026-08-15)
Initial pinned release: NVFP4 + DSpark on SGLang, one-command install, systemd unit, benchmark
battery (bench.sh, bench-matrix.sh), BENCHMARKS.md with full methodology.