Commit Graph
103 Commits
Author SHA1 Message Date
Hasan BasbunarandQwen3.8-Flash-Next 942e552e53 CI: the typography gate reads text files, not the bytes of images
The gate greps every tracked file, binary included, and three compressed
bytes of the 2026-10-11 cockpit capture happened to spell an en dash at
offset 97923 of cockpit-lanes.png: a PNG cannot hold house typography,
but grep saw the bytes and both the v1.27.1 local run and the docs CI of
5a37ed2 failed. The grep now skips what grep itself calls binary (-I);
every text file is still read, and the self-check on a real em dash stays.

Co-Authored-By: Qwen3.8-Flash-Next <noreply@dgx-spark.qwen38.local>
2026-10-11 23:35:29 +02:00
Hasan BasbunarandClaude Opus 5.5 2f89c77d2a image lane: SGLang v0.5.21, and Qwen-Image 2.1 Turbo as a second checkpoint (v1.24.0)
The lane runs the v0.5.21 release's commit and wheel instead of the main commit ddebc52
and the 0.5.20 wheel: the base's images are byte-identical on both (twelve requests),
4.7 % faster at 1024x1024. sgl-project/sglang#43391 (merged 2026-10-10, in no release) is
backported as three one-file patches so the Turbo samples on its eight-step sigma grid;
image-sglang/turbo-grid-check.py checks the three parts on the runtime, and the installer
and the switch refuse the Turbo where one is missing.

./switch-model.sh image-turbo rewrites the unit's --model-path from a fixed staging path
(one new sudoers line), reads the revision the box serves (refs/main) and the pin only
when there is none, checks for room less what the cache holds, and keeps a checkpoint of
the unit's own across a round trip through the Turbo. An existing venv takes a new wheel
(sglang-wheel note, removed by both uninstallers); the runtime check asks the registry,
whose source text v0.5.21 no longer matches; no check rests on an assert. A first
install's checkout no longer trips on a patch merged upstream, in both diffusion
installers.

The cockpit asks the image engine what it serves (/model_info, once per life of the unit)
and the page, Load and the banner follow it; the Image view fixes the steps at 8 under the
Turbo, leaves num_inference_steps out and estimates with a formula fitted to both
checkpoints on the new runtime. Docs, README, MIRROR.md, ROADMAP and the CHANGELOG say what
changed, measured on the reference box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 13:12:31 +02:00
Hasan BasbunarandClaude Opus 5.5 d1841590e3 27B: --cuda-graph-max-bs-decode, the name v0.5.21 still accepts
v0.5.21 refuses --cuda-graph-max-bs as ambiguous. The canonical name
resolves to the same 488 settings on v0.5.19 (prepare_server_args run
inside both images on this unit's command line), so this commit is
neutral on the image it ships with. v0.5.19 already printed a
deprecation warning for the old name; booted with the new one on the
reference box, it printed none and passed the 18 production checks
through the proxy. The CI regex that compares the templates' values
follows the new name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 02:16:12 +02:00
Hasan BasbunarandClaude Opus 5.5 b8306bac8a proxy: a lane switch is followed at once, request or not
The pool, the window and the names the proxy reads from the engine were kept 600 s and
dropped only by a request that found the engine gone. After a switch made while no request
came, a lane that boots in less than 600 s served its first minutes under the stopped lane's
facts: the 27B (about 7 min to boot on the reference box) refused every prompt past the
flash lane's 250,000 ceiling for up to 2.5 min, and /v1/systemone answered as the flash
(2026-10-08). The units PROXY_HOLD_UNITS names are now asked for their invocation id when
those facts are read, at most every 2 s, and a new one, which systemd gives every start,
drops them. A proxy that names no unit, or a systemd that does not answer, keeps them their
600 s. The hold tests' systemctl answers that question with ids that never change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:19:38 +02:00
Hasan BasbunarandClaude Opus 5.5 0b27e26d99 proxy: the serving key is checked before a body is read
Without the identity wall, the engine's key is the port's one gate (README), and a
request without it still had its body read whole and, when large, counted by the
engine on the proxy's own key before the engine's 401. The proxy now applies the
engine's own rule first (measured on the live engine: bearer in any case, one space,
the key exactly) and answers the engine's own 401, before the body and before an
Expect: 100-continue invitation; /health and /metrics stay open. The test harnesses
decide which key their proxy holds, whatever HOME holds: those that give it one
present it, as every real client does, and those whose clients send none give it
none (the CI's offline step gives HOME a key). The cockpit knows the new outcome.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:01:56 +02:00
Hasan BasbunarandClaude Opus 5.5 802ffcfbf4 video lane: the image lane's idle-loop patch, so an idle lane no longer holds a core
SGLang Diffusion's scheduler polls its request socket without ever
waiting, so a video lane with nothing to do held one CPU core at 100%.
On the reference box (2026-10-06) the box's CPU sat near 6 % through an
evening with the lane loaded and idle, against near 1.3 % on quiet hours
the day before, and its hottest zone near 61 C at rest against 43 C with
no lane loaded: enough to keep the fans loud. py-spy put the core in
recv_reqs() under event_loop(), every other thread idle.

The image lane has carried scheduler-idle-poll.patch since it was
measured there; this lane was left on the cookbook's code by choice
(2026-09-25), reversed now that the cost is measured. Applied by hand to
the box's video source first, 3 min after ready: 1.05 cores -> 0.05, the
hottest zone 67 C -> 54 C; a 4 s 480P request picked up in the second it
arrived, done in 691 s (592 to 760 s before), MP4 h264 864x480 with aac
audio; the scheduler idle again after it; a stop at rest 0.24 s.

install-video.sh now applies the patch as install-image.sh does (one
file in image-sglang/ for both lanes, at the same SGLang commit):
applied, already applied, or a note when a new pin no longer fits it,
taken off before a new pin's checkout; its at-rest measurement notes a
lane past half a core. The CI step that checks the patches against the
real upstream file now covers both lanes, each at its own pin. The test
that held "no local patch on this lane" now holds this patch and no
other; TheIdlePatch runs the installer's own lines against a throwaway
tree. Four hand-made mutants (never applied, the HTTP patch too, no
take-off before a new pin, no note) each fail the suite.

An update does not restart a serving video lane: the patch takes effect
at its next start, so that no video being made is ended.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 01:11:56 +02:00
Hasan BasbunarandClaude Opus 5.5 780e7d7c7c pin-watch: its report goes under TMPDIR, and the gate reads every workflow
tests/test_check_pins.py runs pin-watch's "pins" step as written, and
that step wrote /tmp/pins.txt: every run of the suite left it there
(the CI's /tmp audit, 2026-10-03). The step and the issue step after it
now keep pins.txt and pin-body.md under "${TMPDIR:-/tmp}", /tmp on a
runner, which sets no TMPDIR, so the two steps still meet there.

The step that refuses a fixed path in /tmp read ci.yml only; it now reads
every workflow (checked: it passes on this tree and names
pin-watch.yml's line with one path put back).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 19:04:39 +02:00
Hasan BasbunarandClaude Opus 5.5 72fe49f5cb ci: the offline suite is judged by what its own processes leave running
The step compared every listener of the machine before and after the
suite, and failed twice on the reference box on 2026-10-03 for ports
opened or closed while the suite ran: VS Code's own log named one of the
first two, and a per-second log of every listener and its owner named
VS Code for both of the second, a run in which the suite left nothing.

The suite now runs under tests/suite_reaper.py, a child subreaper
(prctl PR_SET_CHILD_SUBREAPER): every process it starts stays its
descendant whatever session or environment it gives itself, so what is
still running once the suite is over (after a 5 s grace) is the suite's
own: named with its listening sockets, stopped, and fatal to the step,
a process left running without a socket included. Other programs'
listeners are shown with their owner, and fail the step on a GitHub
runner only, where nothing else runs.

tests/test_suite_reaper.py: 8 tests, an orphaned listener, one under
setsid with an empty environment, a process without a socket, one on
its way out, another program's listener; they fail with the subreaper
bit or the grace taken out. The step passed on the reference box with
VS Code connected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 18:06:40 +02:00
Hasan BasbunarandClaude Opus 5.5 77a25c2930 ci: the workflow's own scratch files go under TMPDIR too
Twelve fixed names in /tmp were written by the steps themselves (the
two coverage reports, the rendered units and flash launchers, the pin
blocks, an error capture, the opencode test config): every local run
left them there, and two runs side by side wrote over each other's.
They now go under "${TMPDIR:-/tmp}", the step's own directory under
ci-local.sh and /tmp on a runner, which sets no TMPDIR. A new step fails
the workflow on any fixed path in /tmp; it passed on this tree and
failed, naming the line, with one path put back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 17:32:18 +02:00
Hasan BasbunarandClaude Opus 5.5 17c37aff79 ci: a test file that fails in the offline suite says how
The offline-suite step ran each tests/test_*.py with its output thrown
away, so the first run of v1.22.5 on GitHub said only
"tests/test_proxy_hold.py failed" and left nothing to read. The same
file then passed 82 times: 48 on the reference box (16 of them squeezed
on two cores), 32 on two GitHub runners (16 runs each, 4 at a time), the
run again and the first CI of this change. What failed is not known. A
file that fails now prints the last 60 lines of its output; one that
passes prints nothing, as before. CHANGELOG v1.22.5 says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 14:32:07 +02:00
Hasan BasbunarandClaude Opus 5.5 2274ea2adf keepalive-proxy v6.31: a stream the engine has not started is kept open, and its caller watched
SGLang sends a stream's status and headers with its first chunk, after
the queue and the prefill (_handle_streaming_request, in the images of
both lanes). The proxy relayed them when they came, wrote nothing
before, and did not watch the caller of a stream meanwhile. With eight
agents whose contexts outgrew the KV pool (2026-10-03), requests waited
past opencode's 300 s for headers; opencode gave up and sent them again,
and every request it gave up on stayed queued in the engine until its
turn, had its prompt computed for nobody and was aborted at the proxy's
first write: 704 in a night, 163 requests in the queue at the end.

Until the engine answers, the caller of a stream is now watched as the
caller of a non-streamed answer was (that watch's ending is shared, as
_end_upstream): its leaving aborts the request by rid where the engine
allows it and closes the upstream, which SGLang sees within 4 s. Past
KEEPALIVE_S from the request going out, the stream is opened (200 and
its headers, as a hold opens it) and role 1's keepalives go into it;
past MAX_SILENCE_S without the engine's first byte the request is
dropped, as a silent stream is. A quick answer stays the relay's,
headers and status included.

tests/test_proxy_engine_withholds_headers.py: 10 tests against a fake
engine that holds its headers back as SGLang does; 7 fail on v6.30.
Measured with the real opencode 1.18.32 and on the flash lane: see the
CHANGELOG entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 12:32:35 +02:00
Hasan BasbunarandClaude Opus 5.5 2d0677d07e ci, pin watch: a named runner image, and checkout on Node 24
GitHub's notices on the run of 2026-10-02: ubuntu-latest moves to
Ubuntu 26 from 2026-10-19, and actions/checkout@v4 targets Node 20,
which the runners deprecate (they force it onto Node 24 already). Both
workflows now name ubuntu-24.04, the image ubuntu-latest gives today
(the run's "Runner Image" says so), so a new image is moved to on
purpose, in a commit of its own; and checkout@v5, whose only change
from v4 is the Node 24 runtime (its 5.1.0 tightens pull_request_target,
which neither workflow uses).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:53:01 +02:00
Hasan BasbunarandClaude Opus 5.5 2ff9db4847 browser checks: the update banner and monkey checks own a cockpit and run in CI
update-banner-check.mjs drove a live cockpit by functions the redesign
of 2026-09-30 renamed (banners(), rUpdate(), #upd) and failed 7 of its
9 checks on every cockpit since; monkey-check.mjs documented a run on
port 30091, a box's agent relay. Neither ran anywhere, so nobody saw.
Both now own a dry-run cockpit, like the resilience and touch checks: a
key of their own, the engine, proxy and image lane on a closed port, a
PATH whose box commands answer nothing, a browser over a pipe that
resolves no name. The update banner check puts each state into the page
and reads it back in one evaluation (11 checks); the monkey check is the
one that found the fields fixed in the commit before, 61 of 61 now on a
cockpit of its own and 58 of 58 on a dry-run cockpit reading the
reference box. Both run in CI.

The four checks that own a cockpit left it running when they ended
early (the cockpit never healthy, the login refused, no browser):
process.exit() skips every finally, and the cockpit is spawned detached.
Their exit handler now signals what is still alive, the browser with
SIGKILL so it writes no profile back into the directory it removes
(checked by forcing the early exit: the old touch check left its child
behind, the new ones do not).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 15:49:40 +02:00
Hasan BasbunarandClaude Opus 5.5 711810138c pin watch: ask the GitHub API with the workflow's token (issue #34)
Both tries of the scheduled run of 2026-10-02, ten minutes apart, got
HTTP 403 from the GitHub API with the rate limit spent, and filed issue
#34: an anonymous caller gets 60 requests an hour per address, and a
runner's address is shared with other jobs. The pins step now gets
GITHUB_TOKEN (the workflow's own token), and check-pins.sh sends it to
the GitHub API on stdin, as it sends HF_TOKEN, never on a command line.
Without the variable nothing changes. The two new tests fail on v1.22.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 14:48:23 +02:00
Hasan BasbunarandClaude Opus 5.5 c30fb75de7 proxy v6.29: a request whose body never arrived whole is not sent on
The proxy's fuzz suite failed about one run in ten on its relay
simulation, on v1.20.5 already (2 of 15 runs; 1 of 15 on v1.21.0), and
it failed the check of pull request #30. A caller that closed before the
last byte of its body left the proxy a short read, and the proxy sent
the engine what had come: of 300 requests closed with a reset at once
after sending, 11 were read short and sent on all the same. No engine
can serve that, so nothing was generated from one, but no request
should go out so: the proxy now ends it "CLIENT GONE before its body"
and asks the engine nothing.

The suite's own engine also fell over a body cut short, which is what
an engine sees when the proxy closes its side as a request goes out,
its caller gone, by design: it now counts that as the request it never
had, and still requires that a caller who left never gets a whole
answer. Over 30 runs each the simulation no longer fails, on either
proxy. tests/test_proxy_short_body.py pins the short read; two of its
three tests fail on v1.21.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 11:58:36 +02:00
Hasan BasbunarandClaude Opus 5.5 ba22beb0ad check-pins: a pin it could not ask about is not called dead, and the watch asks twice
The scheduled run of 2026-10-01 13:08 got 504s from the GitHub API on
its three GitHub requests and filed issue #33; the opencode release
line read "no such release or asset, or no answer", and every pin
resolved when checked again. check-pins.sh now tells an answer that
says gone (a 404, a digest that changed) from no answer, a 5xx,
GitHub's rate limit or no registry token ("..., so not checked"), and
ends with "N of M pins could not be asked about ... run it again" when
that is all it saw; both still exit 1. The pin watch asks again ten
minutes later before it files an issue. The tests for both fail on
v1.20.5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:20:35 +02:00
Hasan BasbunarandClaude Opus 5.5 dbf649932b v1.21.0: an engine restart no longer ends a session, and no engine starts on memory still held
Issue #26 reported a 27B engine dying about once a day with "CUDA error:
operation not permitted", systemd starting it again 17 s later, and the
fear that the restart lands in the window sglang#40948 blames for a DGX
Spark frozen 9.5 h. Measured on the reference box: a crashed engine's
memory is back 2 to 5 s after it dies, about 15 s before the restart.

engine-preflight.sh runs before every engine (27B, flash, image, video)
and refuses a start while what is left of an engine holds GPU memory,
while the driver holds more than 16 GiB that no process accounts for,
or while nvidia-smi does not answer; systemd tries again every 15 s.

The proxy (v6.28) holds a request while its engine comes back, through
a restart's stop half too, up to 1200 s: a streamed one gets its 200
and the keepalives at once. On a 503, opencode gave up after 151 s and
Claude Code after 325 s; both wait on a held stream (900 s measured).
An engine's mid-stream cut is passed on as a cut: the error event sent
in its place made Claude Code retry without a stream, give up on it
after about 330 s, and end with no answer.

The cockpit restarts an SGLang server left without its scheduler, once
it has been so for 2 min (COCKPIT_ZOMBIE_RESTART), tells one crash of a
serving lane from a boot that keeps dying, and says why a start waits
or was refused.

Tested end to end on the reference box: the flash lane's server sent
SIGQUIT under the real opencode and Claude Code, twice. The runs found
four faults the unit tests could not (a zombie probe docker refused, a
watched boot read as a boot again, a restart that ended the waits, the
cut's error event), each fixed with a test that fails without the fix.
After 632 to 1,068 s held, both clients got their whole answers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 23:20:35 +02:00
Hasan BasbunarandClaude Opus 5.5 430ad23ab5 oc-limits.sh: the flash lane's opencode window is 205,000 tokens at eight requests too
The concurrency tier gave opencode 100,000/16,000 so that eight sessions
at their largest would fit the KV pool together. Measured live on the
reference box, eight opencode subagents held 60 to 68 % of the 474,816
pool at that window and nothing waited, while a documentation agent
compacted at 88,520 tokens. The tier now gives the context tier's pair,
205,000/32,000: one request fits exactly as there, and eight that outgrow
the pool together queue in the engine rather than fail. The operator's
call. The installer's compaction line now uses opencode's own rule
(limit.input minus min(20,000, limit.output)); it said 80,000 where
opencode compacted at 84,000.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-01 12:25:42 +02:00
Hasan BasbunarandClaude Opus 5.5 556325a3e7 install.sh: the lane not being installed keeps its checkpoint's name in opencode
A flash install wrote the 27B entry a generic "Qwen3.8-27B NVFP4+DFlash2" whatever
its unit served, and the next switch back to the 27B renamed it after its target: so
the first update after every switch rewrote opencode.json and restarted opencode-web
for a name, cutting whatever the Agent view was doing (seen on the reference box on
2026-09-30, an update that changed nothing else, on a box whose 27B serves the
abliterated build). The entry of the lane that is not being installed is now named
from the checkpoint its unit serves, through the same table oc-point-default.py
applies to the served one, for the 27B and the flash entries alike.

Held by two installer-block tests (abliterated 1M, FP8 native), both failing on the
previous installer, and a case in the CI step that runs the generator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 21:22:18 +02:00
Hasan BasbunarandClaude Opus 5.5 06b3391421 cockpit on a phone: the rail answers a tap, fullscreen covers the head, the screen's edges are kept
On a phone no rail item could be tapped (found on the reference box's phone,
2026-09-30). .shell carried z-index:1, which made it a stacking context: the
drawer inside it (z-index 60) stacked as a whole at 1, under the veil its own
opening draws (body::after, 55). Every tap landed on the veil, whose click closes
the drawer, so the view never changed. The same trap held the Agent's fullscreen
frame under the head, over its own exit button, on every device; the view's entry
animation, left filling in both directions, kept a second stacking context after
it ended. Neither z-index nor fill mode is there now, the drawer sits over its
veil and both over the dock, and fullscreen drops the entry animation that would
trap the frame for half a second.

The drawer was also as tall as its items: the desktop rule's align-self:start
made the fixed drawer size to its content instead of stretching between top and
bottom, so on a short screen (a phone on its side) it never scrolled and its last
four items sat below the screen. It stretches and scrolls now.

The page asks for the whole screen (viewport-fit=cover) and kept none of what an
iPhone reserves: the head, the rail, the page, the dock, the toasts, the sheets
and the fullscreen frame now keep clear of the notch in landscape and of the home
indicator, with opencode inside the frame held to the safe area.

Smaller, found on the way with the live box on four phone sizes: the inline Agent
frame was sized on a guess of 150 px above it and left opencode's composer below
the fold on a phone, a tablet and a laptop (it now fills what is left, or takes a
screen and scrolls under the head when too little is); the request log put each
request's outcome three columns past the edge of a phone (one card per request
now), and the Library's wide tables stack into labelled cards; long facts were
cut with no way to read them on a finger (they wrap); every dense table's first
cell sat 12 px right of its header (a padding shorthand of equal specificity);
the proxy's state pill stretched across its row; empty tags drew empty pills; the
lane rack and the Lanes view called the last recorded boot's pool "this boot"
beside a live 491,136 (400,384); the drawer had no Escape and a closed dialog left
the focus on the body.

Held by: touch-check.mjs, new and in CI, drives a cockpit of its own with real
touch events on five touch screens and a laptop: 244/244, and 114/242 on the
previous revision (every rail item covered on every touch device, fullscreen on
all six). mobile-check.mjs now taps instead of calling click() from script and
checks both Agent modes: 236/236 against the live box. Page tests for the
stacking rules, the focus, the cell labels and the live pool, each failing on the
previous revision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 17:40:53 +02:00
Hasan Basbunar e2f1f324b6 cockpit redesign: the one-page front, its tests, and the one-click load
The monolithic app.js and the tab <select> become a rail of views:
index.html plus css/cockpit.css and nine scripts sharing one scope
(base, now, lanes, ops, agent, decide, image, video, boot). Every
regression the swap left behind is fixed here, not papered over.

The one-click lane change (the point of the redesign): the page walks
switch, stop, start as one journey, one job per step, stopping at the
first gate that refuses. In dry run the state never moves, so the wait
for the engine to go down was a 90 s stall against a wall; dry run now
skips that wait and the sheet says up front that a later gate can
refuse because the box still reads as it was.

Tests that read app.js read the page the browser loads instead:
pagejs concatenates the nine scripts in the order index.html asks for
them, and the CI target step reads LANE_TARGETS from base.js, the one
list the UI actually keeps. No assertion was weakened or deleted to
get here; the app.js readers were moved to the new markup, and the
video journal gained an end-to-end class over the real 12-minute
journal captured 2026-09-29.

House style reached the new files before they were tracked: five en
dashes in ops.js became the ellipsis the rest of the page already
uses for no-data cells.

Held by: ci-local 40 ok 0 fail (5 skip = missing packages on this
runner), ruff F/E9 clean, page tests 4/4, mobile-check 184/184 on four
iPhone viewports against this front, monkey 58/58, lifecycle mutation
93.4% over the 91% floor.
2026-09-30 12:00:59 +02:00
Hasan Basbunar 197a3b1a92 video lane: MiniMax-H3 as a fourth lane, served from the cookbook recipe with no local patch
./install.sh --with-video adds text-to-video with joint video-and-audio
(MiniMaxAI/MiniMax-H3, pinned rev), driven like the other three lanes:
switcher, stop, start. The unit serves the cookbook's MiniMax-H3 recipe
exactly as upstream wrote it (fl2va variant, no placement flags, loopback
behind the cockpit's Video tab, which holds the async call to completed
and refuses outside the cookbook's bands). Measured on the reference box:
boot 11 min, 4 s 480P in 592 s with download proven (h264 + aac stereo,
inspected), fl2va conditioning proven from a keyframe.

Each addition comes with the tests that hold it; the whole offline suite
and ci-local.sh are green with and without it.
2026-09-26 00:10:47 +02:00
Hasan Basbunar 5c287e7d1d Merge branch 'worktree-agent-a41077fa2a7fb7b24' into fix/revue-v1.18.6
# Conflicts:
#	tests/test_suite_isolation.py
2026-09-25 12:12:27 +02:00
Hasan Basbunar 509c6488f0 Merge branch 'worktree-agent-a2025cf2721ad6703' into fix/revue-v1.18.6 2026-09-25 12:11:32 +02:00
Hasan BasbunarandClaude Opus 5.5 5cbb81d9fc CI: the knob gate reads a refusal that exits
6a69dea made a bad FLASH_REPLAYSSM_SPEC exit instead of returning, so that the ERR
trap's "Install failed at line 278 (command: return 1)" no longer follows the refusal,
and the gate's helper, which printed the status after the call, printed nothing for it:
"a bad knob value must be refused" failed. It runs the function in a subshell now, which
reads an exit and a return alike, and a test pins the refusal: by name, rc 1, and no
trap line after it (a return makes it fail).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:15:45 +02:00
Hasan BasbunarandClaude Opus 5.5 780b9bd166 engines: the key comes through a config file SGLang merges in memory, on no command line
--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>
2026-09-24 23:42:45 +02:00
Hasan BasbunarandClaude Opus 5.5 2f88eff628 CI: ruff sees every script, no test file leaks its environment, one run of each suite less
- ruff F,E9 ran over a hand-kept list that left out engine-inputs.py and oc-merge-limits.py,
  both run by install.sh: the list comes from the tracked .py files now (the vendored
  flash-sglang/ overlay excepted), with a floor. An undefined name in either passed before.
- The isolation test ran one file and compared HOME alone, while four files left UPSTREAM,
  KEEPALIVE_S, CLIENT_IO_S, MAX_SILENCE_S, PROMPT_CEILING_TOKENS or SGLANG_API_KEY set for
  every module after them. Every unittest file now runs in a process of its own (four at
  a time, about 20 s here) and must hand back the whole environment, and the four restore
  what they set when their class is done. A class that moved HOME, or set UPSTREAM, and
  never put it back passed before.
- TheRender in test_lean_level.py needs jinja2, which no step installed: it ran only
  because the runner's python ships it, and without it the lean step reported OK with
  the render skipped. The discovery step installs it, and the TypeSafe SDK.
- 17 steps only re-ran a unittest module the discovery step already runs (combined, then
  each file directly) and the offline step runs again: four runs of each, no assertion
  added. They are gone, with the two installs they carried moved into the discovery step
  (one of them had a name YAML cut at its " #").

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 23:41:00 +02:00
Hasan BasbunarandClaude Opus 5.5 290ac515d8 CI: a dash check that works in any locale, pin checks per test, a label pin-watch needs
- In a locale that is not UTF-8, grep -P refuses the \x{2014} escapes with exit 2, and the
  `if` took that for "no dash": the grep runs in C.UTF-8, after proving on a real em dash
  that it sees one. A planted dash passed under LC_ALL=C before and fails now.
- `[ -n "$UNC_REV" ] && [ -n "$STOCK_REV" ] && [ ... ]` could fail the step on its last
  test only under bash -e: two empty revisions got through that line (the pin blocks above
  it still caught them). One test per line, each naming what is wrong.
- pin-watch filed its issue with --label pin-watch, which fails the whole call when the
  label does not exist, and nothing created it: the first dead pin would have ended in a
  red run and no issue. The label is created (--force: a no-op when it exists) first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 23:30:33 +02:00
Hasan Basbunar e85a71e506 Merge branch 'fix/revue-v1.18.6' into worktree-agent-a41077fa2a7fb7b24 2026-09-24 23:23:33 +02:00
Hasan Basbunar 9d1b3ebe9d Merge the tests zone of wave 2 (Q22 to Q37, Q52 to Q55) 2026-09-24 19:26:37 +02:00
Hasan BasbunarandClaude Opus 5.5 35ad345389 resilience-check: owns its cockpit, its key and its browser, and runs in CI
It copied the box's API key into a temporary directory it never removed (run with a
decoy key, the copy was still there after 16/16), and its dry-run cockpit read the box
it ran on. It now writes a random key, gives its cockpit loopback, closed engine
endpoints and a PATH whose box commands answer nothing, removes everything it made on
exit, drives the browser over --remote-debugging-pipe (no WebSocket client, so any Node
18+ will do) with no name resolution, and takes the browser from CHROME. Traced: no
program of the box, no connection outside itself, nothing left in /tmp. The dashboard
browser checks ran nowhere; this one is a CI step now, and all six are parsed there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 19:11:03 +02:00
Hasan BasbunarandClaude Opus 5.5 58eb1bcc1d CI: skips, the relay simulation and serving-port contact are checked, not assumed
- The declared-against-ran counts took a skipped test for a run one: a skip decorator on
  a whole class stayed green, and so did the TypeSafe SDK round trip whenever its install
  failed. The unittest runs are verbose now and a skip passes only for a reason the step
  lists as what the runner cannot have (the reference box, its cache, its units,
  opencode; the SDK's absence only off the runner). No cockpit test may skip.
- 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 of 15 of its 16 checks. A staying client must see [DONE], a stream
  closed under the engine without an abort first is a failure (after the last step too),
  aborts are checked against every rid a request ran under, and all 16 must run. Proved
  with an abort that never reaches the engine and a relay that drops streamed answers:
  green before, red now.
- "The offline suite touches nothing" compared listening sockets only, blind to a
  connection to a port that was already listening, the engine's on the box running
  ci-local.sh. Every python the suite starts now carries an audit hook recording a
  connect() to a serving port, with the test line that made it. It finds 47 today, all
  from dashboard/tests/test_cockpit_collectors.py (to :30000 and :30020), so this step
  stays red until that file stops reaching the box.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 18:58:44 +02:00
Hasan BasbunarandClaude Opus 5.5 70352bcc40 install.sh: OVERLAY_FLASH=1 is refused, not rendered into a lane that cannot boot
The documented flash rollback rebuilt the v1.5 to v1.7 overlay image and served it with
the launcher of v1.8, which does not fit it: the overlay's model code keeps the 47.7 GiB
PLE table in pinned host RAM unless SGLANG_QWEN4_PLE_MMAP_DIR is set, and the launcher
sets no such thing and passes --ple-offload-backend file (sglang#37068, newer than the
overlay's base) with none of the backends and sizes the overlay was validated with.
Nothing had booted the pair since v1.8 and the CI checked only the pins. The switch is
refused with the rollback that holds together (v1.7.2, which shipped the overlay with
its own launcher and pins), the build, the base image pin and the rollback notes go, the
overlay tag is offered for reclaiming like the others, and flash-sglang/ stays as the
record of what upstream replaced. Found in review, 2026-09-24 (T9).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 18:41:29 +02:00
Hasan BasbunarandClaude Opus 5.5 893ff1f653 CI: a cockpit test file that fails on its own fails the step
The per-file loop ran each dashboard test file directly with || true and compared the
'Ran N' count only, so a file that failed alone, and passed in the full run after the
modules that set its environment, went through. Its exit status is checked now (a
mutant test that only passes after the modules before it: green before, red now).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 18:39:14 +02:00
Hasan BasbunarandClaude Opus 5.5 80814f019c CI and installers: a leftover placeholder with a digit in its name is caught
`__[A-Z_]*__` cannot match `__DRAFT2_REPO__`, a shape the templates already use, so a
placeholder such as `__PROXY2_PORT__` that nothing renders passed every gate and would have
landed in /etc verbatim. The three CI render steps, the image lane's test and the three
installers' own last checks use `__[A-Z][A-Z0-9_]*__`, as recipes.py already did.
Proved with four such placeholders (keepalive and cockpit units, flash launcher, image
unit): green before, red now, green without them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 18:29:40 +02:00
Hasan BasbunarandClaude Opus 5.5 cea2958e69 check-pins.sh: a deleted repo is a dead pin, not a gated one; an unasked pin is not resolved
Hugging Face answers an anonymous request with 401 for a gated repo and for one that
does not exist, and only x-error-code: GatedRepo tells them apart: every 401 or 403 was
filed under "gated" and never counted, so a deleted pinned repo kept pin watch green.
The code and that header are read together now, HF_TOKEN is sent (on stdin, not argv)
as the advice promised, and an image whose registry token could not be fetched fails
instead of counting in "all resolve". Found in review, 2026-09-24 (T2).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 18:04:35 +02:00
Hasan BasbunarandClaude Opus 5.5 9a11ceadd8 proxy: the flash lane's prompt ceiling follows the lane that serves; a switch cuts nothing
- L4: the proxy applies FLASH_PROMPT_CEILING_TOKENS while the served model
  is the flash lane's (an unknown lane gets it too); PROMPT_CEILING_TOKENS
  stays a ceiling on any lane. The unit carries both whatever lane was
  installed; the cockpit and oc-fit-limits.py read the same rule
  (ceiling_from_env with the served model). switch-model.sh moved the
  ceiling at switch time with a proxy restart while the old lane still
  served: a 27B serving 1M refused every prompt past 250,000 until the next
  boot. It now leaves a proxy of the new unit alone (old units keep the old
  way until ./install.sh rewrites them)
- L5: a switch restarts opencode-web only when the limits it reads change;
  the switch's header, the README, ARCHITECTURE.md and the image lane doc say
  what it restarts and rewrites

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 17:48:48 +02:00
Hasan BasbunarandClaude Opus 5.5 7a8d0afdd7 v1.18.7: a full review of v1.18.6, and the defects it found fixed with a test each
- cockpit: a non-digit Content-Length is a 400 before any read (-1 read an
  unlimited body before login)
- proxy v6.24: the identity wall covers every route and method but /health;
  a path still escaped after one decode is refused; relayed /server_info loses
  the engine key fields; an unreadable keys file says so
- docs/clients.md: the keys file is installed owned by the user, the engine
  key goes in an EnvironmentFile
- image unit: After= on the text units, so a switch stops before it starts
- lifecycle: a down unit with a live container is an orphan, busy for the gate
- cockpit: its own /health probe no longer counts as activity (the canary
  never ran)
- install.sh: sudo asked at step 1 and renewed at step 8 with a prompt;
  CONTEXT_MODE=1m refused on a flash box after the convergence; the flash
  engine bind is read from the launcher
- switch-model.sh: downloads into the cache the installed unit mounts
- uninstall.sh, install-image.sh: remove only venv/ and sglang/ of the lane
- opencode limits hold the engine window (205000/32000 flash,
  173000/64000 native), fit() and the cockpit's verdict and autofit use the
  same rule, the 27B entry of a flash install comes from the table;
  collect_opencode has its @guard back
- Setup's Fit button has a click handler
- bench-agent: the TTFT slope is in the unit it prints
- CI: negated grep, generated script lists, exact sudoers argv, flash flags
  read from install.sh

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 13:40:38 +02:00
Hasan BasbunarandClaude Opus 5.5 917ad94100 install: restart the engine only when something it reads changed
Every ./install.sh restarted the engine, a full boot per update (7 to 8 min
on the 27B, 12 on flash) even when the update touched only the cockpit, the
proxy or opencode. engine-inputs.py finds what the engine reads at start from
its unit (unit, drop-ins, the flash launcher, config files named directly or
through /out, checkpoint configs, image IDs) and tells whether the running
engine already has it. Step 9 keeps the engine when it does, the run changed
none of it by content, and it answers /health; the real smoke test still
runs. RESTART_ENGINE=1 forces a restart, and every restart says why.

The unit, the flash launcher and the patched template are now written only
when their content changes: an identical rewrite dated them after the
engine's start and made every second run restart it.

Reference box: a plain ./install.sh on the serving 27B, 28 s twice in a row,
engine start time unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 21:09:53 +02:00
Hasan BasbunarandClaude Opus 5.5 21ecc040e4 Fixes found by a real uninstall and a real first install on the reference box
- oc and the Agent tab load the box's generated opencode config through
  OPENCODE_CONFIG: on a box emptied and installed with the published
  one-liner, both answered with opencode's hosted free model (big-pickle),
  not the model the box serves.
- uninstall.sh --yes takes the providers that read the API key out of
  opencode's config before deleting the key (opencode refused to start at
  all: "bad file reference"); a file with nothing else of the user's goes to
  a backup (oc-merge-limits.py --remove-providers).
- The uninstall inventory knows the image lane's checkpoint (31 GB), and the
  CI gate on inventory pins reads install-image.sh too.
- The docker room check asks only for the container's room when the image is
  already here (an update with 36 GB free was refused for want of 40).
- A commented-out opencode PATH line no longer counts as one.
- uninstall.sh says when there was nothing to remove.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 17:43:37 +02:00
Hasan BasbunarandClaude Opus 5.5 f89f4f31c2 install: a fresh box's opencode gets a config, and a lane added later its provider
- A box with no ~/.config/opencode/opencode.json gets this repo's (it was a
  printed cp: a first install left opencode answering "Provider not found:
  qwen38"). A config that exists is never overwritten.
- A config with one of this repo's providers gains the provider of a lane
  installed since (oc-merge-limits.py --add-providers: targeted edit, backup,
  read back and compared, restored if anything else moved). The 27B first and
  the flash lane later left opencode sending the 27B's limits to the flash lane.
- A missing opencode is said plainly where a first-time user meets it: the
  installer's step 7 and last lines, the oc launcher, the cockpit's Agent tab.
- The last lines name a command the user's shell can run, and the config
  opencode actually reads.
- CI: the unittest step prints what failed instead of dying silently.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 15:17:30 +02:00
Hasan BasbunarandClaude Opus 5.5 caa596ad79 opencode is pinned: the same tested version on every box, and it stops drifting
Until now the repo installed no opencode: it took whatever was on PATH, and
opencode installs its own patch releases unless "autoupdate" says otherwise
(read out of its binary: only false, "notify" or a minor/major release stop
it), 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 the repo does were read out
of one opencode binary and checked against its behaviour: the compaction
threshold oc-fit-limits.py sizes for, the hidden 32,000-token output cap the
oc launcher lifts, the overflow phrases the proxy answers with so a refusal
makes opencode compact, and --yolo / OPENCODE_PERMISSION for the Agent tab.

OPENCODE_VERSION=1.18.32 with OPENCODE_SHA256, GitHub's digest of
opencode-linux-arm64.tar.gz. Checked against 1.18.27 before pinning: the 21
overflow phrases and 3 exclusions verbatim in both binaries; max_tokens
182,000 with the launcher's variable and 32,000 without, on both, recorded
on a fake OpenAI endpoint with isolated config, data and cache; the code
around compaction and OPENCODE_PERMISSION identical once the bundler's chunk
names are set aside; serve --hostname and the hidden --yolo on both.

install.sh, step 7: none found, the release asset is downloaded, checked
against its sha256 and installed where opencode's own installer puts it,
with its PATH line in ~/.bashrc; an older one there is replaced the same
way; an older one from npm, brew or bun goes through `opencode upgrade`,
which knows its method; a newer one is kept and said so, because going back
a version can leave sessions a newer opencode wrote unreadable. A download
that does not match is not installed, a version without its checksum is
refused, and nothing about opencode fails the rest of the install.
OPENCODE_PIN=0 keeps whatever you have. The generated config and the user's
get "autoupdate": "notify" (oc-merge-limits.py --autoupdate, a targeted edit
that keeps comments; a stricter false is kept).

The Agent tab says when the opencode it serves is not the pinned one, read
from install.sh so the two cannot disagree. uninstall.sh lists an opencode
this repo installed and leaves it. CI downloads the pinned asset and checks
its sha256 on every run (and fails with a wrong one, checked).

docs/opencode.md said the 1M starting pair sits under the worst measured
pool; it does not (832,993 to 922,094 over sixteen boots), which is why it
is fitted after each boot.

Tests: eleven on the installer's own lines in a throwaway HOME with a fake
curl and fake opencode binaries (absent, pinned, older in place, older from
npm, newer, bad checksum, pin off, version without checksum), the merge, and
the cockpit's read of the pin. The checksum, no-downgrade and opt-out guards
were each undone once and their tests failed. CI 61/61.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 14:40:19 +02:00
Hasan BasbunarandClaude Opus 5.5 e0953f0d25 Image lane: a generation can be cancelled, and a Stop during one is clean
On 2026-09-23 a call for ten 2048x2048 images at 60 steps (about 47 minutes)
was running when the image lane was stopped to switch lanes. The runtime's
HTTP server waits on shutdown for every open connection, and a generation
holds one for as long as it runs: 60 s in "stopping", then systemd killed the
lane and the unit ended failed (Result=timeout), shown as "Qwen-Image failed,
read its journal". SGLang Diffusion cannot abort a request, and the page had
no Cancel, so the Stop was the only way out.

image-sglang/http-graceful-timeout.patch, the second local change to the
pinned source: uvicorn.run(..., timeout_graceful_shutdown=5). Proved in a
transient systemd unit with uvicorn 0.53 holding a ten-minute request:
without it, "stop-sigterm timed out, Killing", Result=timeout; with it,
stopped in 5.2 s, Result=success. install-image.sh applies every patch of
image-sglang/ from one list, recognises them, and takes them all off before a
new pin; the CI step fetches each patched file at the pin and checks it, and
fails when a patch in the repo is not in the installer's list.

The Image tab's Cancel shows while a generation runs (this page's or another
tab's) and restarts the lane, the only abort this runtime has, through the
same action API, gates and confirmation as the Engines card. It starts and
stops nothing, so the Image tab rule holds: its test now asserts the tab
sends no Start or Stop and exactly one restart, the cancel. A request cut by
Cancel, the lane's Stop or a restart reads as cancelled, not as a lane that
failed to answer.

A call may not ask for more pixels, all its images together, than the
largest call measured here (one 2752x1536 image, 44.8 GB at its peak): the
images of a call run as one batch (42 s per step for those ten, 4.6 for one),
their memory at that size was never measured, and running out of unified
memory hangs this box. Refused in the tab and on the server, with numbers.

The lifecycle carries systemd's Result, and a unit that ended "timeout" reads
"was killed while stopping, nothing broke while it was serving".

opencode's limits follow a boot after a switch: a switch writes the nominal
900,000 pair, and nothing fitted it after a switch and a Start from the page
(the Agent tab asked for 900,000 against 809,983 servable after the switch to
the uncensored target that morning). The cockpit now runs the Setup tab's
fit itself once the text engine is ready: once per activation, only when the
declared limits do not fit, never to raise one, as an audited job.
COCKPIT_AUTOFIT=0 turns it off.

Tests: pixel budget (the call that started this is refused before the lane
sees it, the largest measured call passes, the total counts, a size string
counts), autofit (once per boot, never while no text engine is ready, never a
raise, retried when the job lock is busy), Result in the lifecycle, the
cancel wiring, both patches through the installer's own lines. Five guards
were undone once each and their tests failed. CI 60/60.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-23 12:31:22 +02:00
Hasan BasbunarandClaude Opus 5.5 b707d95c40 Image lane: idle costs 0.05 cores instead of 1, and a restart reads its own journal
AN IDLE LANE HELD ONE CPU CORE, FOR AS LONG AS IT SERVED. The diffusion
scheduler's loop never waits: recv_reqs() reads its socket with zmq.NOBLOCK
and, with the queue empty, the loop goes straight round again. The text lanes
avoid the same thing with --sleep-on-idle, which this runtime does not have,
and upstream main has the same loop as the pin. Measured on the box from the
unit's cgroup, 30 s at rest: 1.047 and 1.046 cores, one thread at 101.5 %.

image-sglang/scheduler-idle-poll.patch adds one branch: with nothing queued,
wait on the request socket for up to a second, which is what the LLM
scheduler's own IdleSleeper does behind --sleep-on-idle. poll() returns the
moment a request lands. With it: 0.045, 0.046 and 0.046 cores (the 27B lane
with --sleep-on-idle: 0.029). A fixed-seed request (768x768, 20 steps, seed
42, CPU generator) gave the same PNG byte for byte with and without it, in
10.2 to 10.7 s either way.

install-image.sh applies it after the checkout and recognises it on a re-run
(proved on the box: "applied", then "already applied"); it takes it off
before checking out a new pin, because git refuses to check out over a local
edit of a file the new commit changes, and without that the next pin bump
would have died at the checkout on every box that installed the lane (a test
runs the installer's own lines against a scratch repo, and fails with the
step removed). A pin the patch no longer fits is a note, not a failure. The
smoke test now prints what the lane costs at rest, from its cgroup, and says
so when it holds a core. A CI step fetches the scheduler at the pin and fails
when the patch stops applying: the signal to refresh it, or to drop it once
upstream waits on its own.

A RESTART READ THE LAST RUN'S JOURNAL. The boot stages came from the unit's
journal since the last "Starting server" line, and a new process takes about
8 s to print one. Until it did, the last one was the previous run's, which
had reached "fired up": a start read "warming up, ready" and a restart read
"degraded, ready" for those seconds (both seen on the box, 21:33:20 and
21:37:14). The journal is now read by the unit's systemd InvocationID, taken
from the same systemctl show the lifecycle already runs: this run's lines and
no others. After the fix, a restart watched every 0.5 s through the action
API went starting, starting the server, the encoder, the DiT, the VAE,
warming up, ready in 62 s, and the Image tab showed STARTING at +2.5 s and
LOADING WEIGHTS (the 13.3 GB DiT) at +25 s in a headless browser.

FACTS THAT HAD GONE STALE. The README's cockpit table said the Image tab had
"nothing yet"; it now says what it does, and Video keeps "nothing yet". The
image section called this "a second lane" one sentence before "a third
lane". The doc called cost "very nearly linear in pixels": 2048x2048 takes
190.9 s where four times 1024x1024 is 153, and the estimator the cockpit uses
is now written down. Startup is 60 to 72 s, not 77. A request "peaks at 34.8
GB on top of" the weights was wrong twice: 34.8 GB is the total, at
1024x1024, and 2048x2048 reaches 44.7. The installer's smoke step said it
starts and stops the lane when it leaves a serving lane serving, reported
"up after ~10 s" for a lane that answered the first probe, and blamed a
blocked checkout on a missing commit. image_call's docstring still described
a serving key it no longer sends.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-22 21:50:35 +02:00
Hasan BasbunarandClaude Opus 5.5 f01bc52dda The image lane is a lane: switched to, started and stopped like the other two
The first version gave the image lane its own Start button inside the Image tab.
It started the lane by a path neither text lane uses, and through the unit's
Conflicts= it stopped a serving text lane silently, where the cockpit's rule for
every other lane is to refuse and say "stop it first". It is now driven from the
same three controls as the 27B and flash lanes, the switcher, Switch, and the
action bar's lane button, and the Image tab has no lane control of its own.

A THIRD ENGINE TO THE LIFECYCLE. The collector was written for docker engines:
a container, docker logs, a pool guard, a wedge canary on the text port. The
image lane gets its own facts (the unit's state, its own /health, its journal)
and produces the same entry shape, so every generic view picks it up unchanged:
the lane pill, the lane button, the Engines card, the Overview card, the badges.
Its boot is read off its own journal in eight named milestones, matched on what
a line says rather than when (the engine and uvicorn write two timestamp
formats), and the component being loaded travels as `detail`: "the 13.3 GB DiT"
says more than "weights" for the half minute it takes. Its boot duration is
learned like the others' (70 s, recorded on the reference box).

THREE ENGINES, ONE RULE. blocked_reasons picked "the other engine" with [0],
which with three of them checked one neighbour in two and let the third
through. It now checks every other engine. Starting the image lane while the
27B serves answers 409 blocked, and so does starting the 27B while the image
lane loads. Conflicts= stays on the unit as a second belt for a systemctl start
typed at a terminal, which the cockpit never reaches.

A TEXT ENGINE IS NOT ANY ENGINE. servingReady() answered "is an engine up",
and four callers meant "is the TEXT engine up": Flush cache, Abort all and
Smoke were enabled while the image lane served and would have hit a closed
port, and the Overview kept the previous LLM's model, pool and window under an
image engine. textReady() is the question they ask now.

switch-model.sh image verifies the checkpoint from the lane's own venv (no
docker image to inspect) and makes the image unit the one enabled at boot. It
leaves the proxy and opencode alone: both are text clients, and pointing
opencode's default at an image lane would break every session it opened. A
switch to a text target now takes the image lane off the boot too.

Found by running the real cycle through the cockpit's own action API, not by
reading the code:

  - The image unit was installed 0600. mktemp creates 0600 and cp keeps the
    mode, so the unit was readable by root alone. systemd did not mind; every
    other reader did, and failed quietly: switch-model.sh could not find the
    runtime, and the cockpit's reads of the port, the bind and the model all
    fell back to their defaults, which happened to be right on the reference
    box and would not have been on one installed with IMAGE_PORT= or
    IMAGE_BIND=. Installed with install -m 644 now, and an already-installed
    unit is chmod-ed even when its content has not changed.
  - The image branch of switch-model.sh ran before install.sh's pins were
    evaluated, so HF_CACHE was unbound under set -u.
  - A plain ./install.sh on a box switched to images fell through to "27b",
    enabled the 27B unit beside the image one, and left two engines set to
    start at the next reboot, with the order systemd pulled them in deciding
    which came up. That undid the operator's switch on a routine update, the
    one thing install.sh promises not to do. It now brings the text lane up to
    date without enabling or starting it, and the image lane stays the boot
    lane.
  - install-image.sh's smoke test stopped the image unit on the way out
    unconditionally, so re-running the installer on a box whose image lane was
    serving ended with it stopped. It now leaves the lane as it found it.

What the user saw during the two waits, fixed from screenshots taken in a real
browser at laptop and iPhone widths:

  - The progress bar sat under the frame of the coming image, and a square
    1024 frame at the panel's width is taller than a laptop screen: the bar was
    below the fold for the whole generation. It now lives inside the frame,
    where the eye already is, and the frame and the image are capped to the
    viewport so the result and its facts are on screen. On a phone the result
    panel is scrolled into view below the sticky bars at their real height.
  - The bar was a node that moves into the frame, and emptying the output
    panel detached it, so the second generation would have appended null. It
    is held by reference.
  - "Use a sample" ran for twenty seconds behind a one-line status with both
    buttons live; a second click was a request the cockpit refused with 409 and
    a toast that read like a failure. It waits like any generation now, timed
    against its own 20 steps rather than the form's 40.
  - The sample is a red teapot and the "Local edit" example asked to change a
    book cover. The example is now the cookbook's own edit prompt, which is
    about that teapot.
  - Six strings said "about 9 minutes" to ready; the image lane takes about
    70 seconds. Each lane now reports its own, learned from its boots once it
    has some.
  - Before a lane has booted in front of the cockpit, its bar used the
    measured duration instead of reading "learning the duration".
  - The estimate was linear in pixels and 20% short at 2048x2048 (153 s
    against 190.9 measured). It is a power law fitted to nine measurements,
    within 6.5% of every one of them.
  - A target whose lane is not installed is marked so in the switcher and
    cannot be picked, with the command that installs it. The image lane is
    opt-in, so most boxes would otherwise offer a switch that fails a second
    later.
  - The opencode banner compared against the usable share of the pool, a
    number printed nowhere else on the page, beside a panel showing the pool:
    it read as the cockpit contradicting itself. It names both now.

Known and documented, not fixed: when the image engine wedged, its /health kept
answering 200. The lifecycle would read such a wedge as ready; the text lanes
have a generation canary for that and this lane does not yet.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-22 21:03:49 +02:00
Hasan BasbunarandClaude Opus 5 5d6738fd59 install: the engine and the proxy can answer on localhost only (v1.16.0)
Both listened on every interface, and this 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 laptop
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, 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. 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. An installed choice wins
over the default in both directions, which is the part that matters, because a
box hardened to localhost that a plain ./install.sh reopened would be the worst
of the three outcomes: nobody would have a reason to look. A bad value is
refused by name before a unit is written, not by a unit that fails to start
minutes later on a box whose engine has just been stopped.

The proxy is v6.21 for it. The version gate added in v1.15.2 earned its place
on the first try: the bind changed the shape of the startup line, the banner
stopped matching the history block, and the test failed before this could ship.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 12:56:29 +02:00
Hasan BasbunarandClaude Opus 5 63a49ccfa9 merge main: the docs reorganisation, and this branch follows it
main turned the README into a 509-line entry point with seven sections moved
to docs/, added evals/ and fixed the cockpit's fit verdict. This branch was
written against the README that preceded it, so the merge is not only textual:

  * the System One section moves to docs/systemone.md, the way the other seven
    did, leaving the summary, the one call that shows it and the headline
    numbers in the README, plus a row in the index table
  * the proxy's new refusals were landed by git in the middle of the GB10
    memory trap, which is where their old neighbour used to be; they belong
    with the proxy, which now lives in docs/clients.md
  * the cockpit's tab table gains System One, Image and Video, and the three
    places that said "eight tabs" no longer do
  * docs/cockpit.md gains the System One tab's own section
  * evals/ is NEW on main, not removed by it: the CI lint and compile lines
    keep it and add this branch's two tools

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 10:30:54 +02:00
Hasan BasbunarandClaude Opus 5 9d6967687c proxy: refuse the request fields SGLang dies on, and close three holes of this route's own (v6.20)
Reading logprobs is what /v1/systemone does, so an 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 hands it to
logprobs.topk(max_k), where a number past the vocabulary raises "selected index
k out of range" INSIDE the scheduler. One request from one client ends the
engine for everybody, and this box needs about nine minutes to come back
(sglang#40076, open). It was then reproduced the hard way here, by relaying one
such request during a test of the refusal meant to prevent it.

sglang#31597 catalogued the same family in July with reproductions, and both
PRs that bounded them were closed without being merged, which is why the first
had to be reported again in September. Checked one by one in the served
v0.5.19: stop_token_ids indexes a scatter_add_ out of bounds whenever
min_new_tokens > 0; input_ids indexes the embedding, and the validator that
would stop it has zero callers; n becomes parallel_sample_num unbounded. All
reachable from an ordinary chat request.

So the proxy refuses them, on the three relayed routes that carry the logprob
count under three names, element by element when a batch sends a list. The two
id fields need the vocabulary, which the engine publishes nowhere, so it is
asked for the only way it is offered: an out-of-range logit_bias is refused
with a message that names it. One probe an hour, built to be refused, never
reaching the scheduler; it matched the checkpoint's config.json to the digit.
A negative id is refused whatever happens, and a probe that fails stands the
rest of the guard down rather than refuse traffic it cannot judge.

Three defects of this route's own, found in the same audit and in review:
  * the retry that asks a second, wider time went straight to the engine
    without the door, and ignored SYSTEMONE_TOP_K_MAX, the clamp an operator
    sets because their build refuses a wide top-k
  * a percent-encoded non-ASCII byte in any path decoded to something
    http.client encodes as ASCII, raising UnicodeEncodeError, a ValueError no
    arm here catches: an empty reply and a traceback, before any key is checked
  * a lone surrogate outside the state cost a full fan-out and returned 500;
    the check now runs over the whole parsed request, before any inference, and
    never echoes the text it cannot encode
  * a branch still queued for a slot was aborted with a rid the engine had
    never seen, then sent anyway when a slot freed

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, and on the
ordinary path it does not. Only the 1.0 this route sends makes the two agree.

keepalive-proxy.py at 84% branch coverage, floor raised to 83.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 10:22:37 +02:00
Hasan BasbunarandClaude Opus 5 719c17b947 docs: the README becomes an entry point, and its numbers are checked against the record
1,045 lines, one door, and the only way to find anything was to scroll. It is 509
now: 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 the question 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.

The split was checked line by line against the file it came from. Of 1,045 lines,
the only ones with no verbatim equivalent in the new README or in one of those
files are the 32 rewritten on purpose, and each of those is a correction:

- the headline said 65 tok/s for the 27B lane, which is 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. Title, target table
  and speed section now say 71.4 and name the campaign behind each number.
- the memory section read as though the installed fraction were 0.50, which is the
  native-mode and ./run.sh value. The 1m mode has been the default since v1.12.1
  and runs 0.76. Both are stated now, each with its mode.
- the KV pool comparison published three boots against two. The engine journal has
  eleven for that day, six and five: 517,184 to 566,016 against 482,560 to 510,592.
  The ranges still do not overlap, by 6,592 tokens at their closest, but the gap on
  the means is 9.6% and not the 6% published from the subset. README, BENCHMARKS and
  the v1.14.1 entry all carry the full set now.
- two citations pointed at text that is not there: the README claimed a flat-memory
  result was "quoted elsewhere in this README" when it lives in BENCHMARKS.md, and
  keepalive-proxy.py justified 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 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,
  conc-check 40/40 serial and 80/80 at four concurrent.

evals/ ships the two drivers, because two of those numbers could not be reproduced
from this repo. 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 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. docs/flash-lane.md 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.

Local CI: 56 steps, 55 ok, the socket gate failing on this serving box because
other processes cycle ephemeral listeners during the suite, which is the case its
own message describes. Both suites green: 223 and 370.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-19 12:55:10 +02:00
Hasan BasbunarandClaude Fable 5.1 cb7f14b31e systemone: measured against the hosted Jev, and the defaults the numbers chose
Byte-identical payloads to this box (27B lane, SGLang 0.5.19) and to api.typesafe.ai
(jev-1.13.0, 3.46 million input tokens, 14.5 cents) on six public tasks at pinned
revisions. TypeSafe's own 20 public cases, 408 questions with two frontier references:
the lane with two option orders 93.5%, the hosted model 93.2%, raw readout 91.3%.
BoolQ 3,270: 89.3% against 91.9%, ECE 1.2% against 2.4%. MMLU-Pro 1,000, ekzhang's
rows: 62.1% against 83.8%, the gap a single forward pass of a 27B does not close on
calculation; with a 1,024-token thinking budget on the first 200 rows, 80.0% against
84.0%, an interval that holds zero, at 8.8 s a question. French: XNLI 71.4% against
78.2%, MMMLU 74.6% against 87.4%. The cookbook's 13 GDPR questions: 50 of 50 both
sides, 1.1 s a call alone against the hosted 1.04 s.

Three claims of the draft did not survive measurement and are gone. The readout does
not repeat to the digit: five identical calls at concurrency 1 moved an uncertain
yes/no by a standard deviation of 0.11 (settled ones by under 0.01), because this
engine's kernels are not batch-invariant. The warm-first send lost every comparison
(13 questions on a never-seen 10,800-token state: 14.9 s with it, 5.4 s without) and is
off, SYSTEMONE_WARM_CHARS=0. The option cap of 64 was caution without a number: asked
for 255 top_logprobs the build returned 255, so Choice takes Jev's 255.

The two-order lever (SYSTEMONE_PERMUTATIONS=2) earned its place on four tasks: it
never hurt, it added 2.6 points on BoolQ and 4.0 on MMLU-Pro where position bias
lives, and it took the ECE from 4.7% to 1.2%, 8.3% to 4.2% and 9.8% to 4.3%. It stays
opt-in: it is an average, not a readout, and the repo ships lossless-by-construction
or opt-in. A fitted temperature fixes the rest of the over-confidence on the held-out
half without moving one answer. A new lever, SYSTEMONE_THINK_TOKENS, thinks first in
the model's native mode and reads the label off the continued turn (a message with
reasoning_content would be closed as history by this build's continue_final_message,
so the thought is appended as the assistant prefix after the template's own
"<think>" opener). The defensive branches, the oversize guard on the longest branch
and the invariant that no body ever carries token_ids_logprob are now tested.

Also read off the hosted model and written down: its probabilities are sample
frequencies, it spends 17 + about 7 output tokens per option, its live answers match
its saved public ones at 99.8%, and its calibration does not travel to French (a
temperature of 1.70 halves its ECE there).

50 offline tests, proxy coverage 82% (floor 74), the local CI green on every step
with a test venv present, ruff F,E9 clean, no em dash in any file. The measurement
files live in bench-systemone-data/ (gitignored); the protocol and every table are in
BENCHMARKS.md "Typed decisions".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 01:47:47 +02:00