Commit Graph
16 Commits
Author SHA1 Message Date
Hasan BasbunarandClaude Opus 5.5 cdcc7f1267 cockpit: the lane that serves says its engine's window
Two findings of the code review of v1.45.2:
- The window a lane's words said came from its unit file. A unit staged
  again while its lane served (FLASH_LOCAL_CONTEXT=1m and --units-only)
  made the page say 1M tokens of context of an engine still serving
  262,144, and the reverse. The lane that serves now says its engine's
  window (engine_info, kept with the engine's version), and the others
  the one their unit starts with.
- engine_table read each unit file twice every 30 s: once for its window
  and once in engine-inputs.py. inputs() now takes the text already read.

Both new tests fail on the old code and pass on the new one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 14:01:43 +01:00
Hasan BasbunarandClaude Opus 5.5 a0bfd603e1 cockpit: a lane says the window its unit runs, 1M on the FP4-Local lane when FLASH_LOCAL_CONTEXT=1m
The lane's words were written for its native window and said "262K tokens of context" of a lane
serving 1,048,576 (discussion #63). The engine table reads each unit's window (--max-model-len or
--context-length), and the bay in Now and the card in Lanes say 1M tokens where the unit runs it.
Tests: the window read from a unit file, and the FP4-Local bay both ways.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 13:14:32 +01:00
Hasan BasbunarandClaude Opus 5.5 757f5070a8 cockpit: the third review's fixes to the engines' labels
Code review of v1.45.0, third pass:
- the engine table reaches the page by its collector alone (engine_table, the
  first time at the cockpit's start): two copies could disagree for 30 s;
- the engine's reported version is cleared where the lanes' states arrive,
  once its lane no longer serves, not checked again in every label (which
  also left the engine facts on the pin's label for a frame);
- a unit that names the pin's moving tag (IMAGE=lmsysorg/sglang:v0.5.22, as
  install.sh offers when the digest cannot be pulled) runs the pin.

Tests: test_engines (the moving tag, read back from install.sh), the collector
in test_cockpit_code, the page tests fed by engine_table. 325 node page tests
pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 23:05:16 +01:00
Hasan BasbunarandClaude Opus 5.5 60b0e1a928 cockpit: the review's fixes to its names and its engines
Code review of v1.45.0:
- "the Flash FP4-Local lane" stayed in the cockpit's own sentences (the page's
  b12x lane names, its reasons, the server's B12X_LANE_NAME and refusals): it
  says "the Qwen3.8 Flash-Next FP4-Local lane" now. A test finds no old name in
  the cockpit's strings, and fails on the cockpit before. The installers'
  messages and the docs follow with the docs (decision 1182).
- a lane installed on an image of the operator's was given its pin's version:
  engine_table() reads each unit file the installer wrote (engine-inputs.py)
  and says whether it starts the pinned image, by digest or by a build tagged
  with its digest's first hex digits (engines.runs_pin); such a lane says
  "vLLM, another image".
- the serving lane says its engine's version even when engine_info names no
  target (a checkpoint no pin names): its unit is then the one that serves.
- a version's button read its words in another order than its name
  ("NVFP4 abliterated" for "abliterated NVFP4"): "Abliterated NVFP4 · edp1096".
- the capsule's second line counts in tabular digits, the capsule, sized to
  its text, kept still as they change each second.

Each has a test that fails before (engines.runs_pin, the operator's image on
the page, the buttons' order, the cockpit's strings). 318 node page tests,
test_engines, test_cockpit_code and test_target_names pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:44:15 +01:00
Hasan BasbunarandClaude Opus 5.5 7b306043bf cockpit: each lane's engine and its version in the capsule, the bays, the Lanes cards and the Library
Decision 1178. The capsule's second line says the engine first ("SGLang
0.5.22 · idle, ..."), each bay's facts begin with it, each Lanes card has an
Engine row, and the Library's recipe column, now named Engine, says it when
the recipe runs the image its lane pins: an image of the operator's is named
by itself, never given the pin's version (page_table() carries the pin for
that). A cockpit without the table leaves all of it unsaid.

Tests: EachLaneSaysItsEngine (the capsule test fails on the page before), and
the config the cockpit serves carries engines.py's table (test_cockpit_code).
The page-behaviour and page-details files pass whole (219 tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:44:15 +01:00
Hasan BasbunarandClaude Opus 5.5 b05c0636d6 cockpit: the page gets each lane's engine and its version, and each module of its own is watched
The config the page reads carries engines.page_table() (decision 1178).
CODE_FILES now lists engines.py, and engine_metrics.py, which cockpit.py
imported and did not watch: a change to it alone left the old code running,
and nothing said so. A test reads cockpit.py's imports and fails when one of
its own modules is not watched (it fails on the list before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 19:44:15 +01:00
Hasan BasbunarandClaude Opus 5.5 6de66c92a0 Remove dead cockpit files
dashboard/mockups/design-directions.html is the static mockup of two visual
directions the redesign did not take. dashboard/tests/headless-check.mjs
reads ids the page no longer has (#rcptable, #lanestate, #connlabel and the
like) and nothing runs it; the CI step that parses dashboard/tests/*.mjs
now counts two manual checks. fmtClock in base.js has no caller. The copy
of the dashboard tree in test_cockpit_code.py stops skipping mockups/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 02:11:24 +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 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 e85a71e506 Merge branch 'fix/revue-v1.18.6' into worktree-agent-a41077fa2a7fb7b24 2026-09-24 23:23:33 +02:00
Hasan BasbunarandClaude Opus 5.5 a9fd08eb83 dashboard tests: no temp dirs left, pages told apart, two checks that could not fail
- The property checks left a relay-cred-* directory per generated example, 300 per run
  and 7,200 in the reference box's /tmp; the recipes suite and the cockpit loader one each.
  Counted in a TMPDIR of their own: 302 per run before, none now. Nothing was removed
  from the box's /tmp.
- The root-page tests looked for "<" and "Spark Cockpit", which both pages carry: each
  now looks for what only its page has (the login form, the lane selector) and for the
  other page's absence. Swapping the two pages passed before.
- The Logs allowlist check asserted that a non-empty union is truthy: it compares both
  sets now, so a unit that is not this repo's cannot join them unseen. And "the server is
  still answering" could not fail (ThreadingMixIn isolates a dead handler thread; every
  login raising left it green while the per-input test caught it): removed.
- parse_feed's timestamp test claimed a mutant it did not kill and read back the first
  character of a string it wrote: a dangling start before a line with no timestamp must
  still turn unknown.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 19:33:53 +02:00
Hasan BasbunarandClaude Opus 5.5 f532eac3d5 dashboard tests: every module hands the next one the environment it found
test_cockpit_jobs left HOME on a directory it had deleted and COCKPIT_DRY_RUN=0 behind
it, and five other modules left the cockpit's settings pointing at their own temporary
directories: unittest runs them all in one process, so every later module started from
that. Each restores os.environ in tearDownModule, and test_env_isolation runs one test of
each module (all of its fixtures) and fails on any variable left changed; on the old
modules it lists 16.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 18:32:56 +02:00
Hasan BasbunarandClaude Opus 5.5 d163cc4c1f tests: thirteen that could not fail now see the defect they are named for
Each was reproduced by a mutant that left the suite green, and now fails on it:
- the uninstall inventory read the last assignment of each pin (the help text's moving
  tag, a later "$CUR_DRAFT"), matched images by substring and units and containers by
  presence anywhere in the file: it reads the pins, matches whole entries, and checks the
  disable, rm and docker rm lines themselves, the flash launcher's container included;
- the fake systemctl printed an epoch whatever it was asked, so a dropped
  --timestamp=unix went unseen;
- the native-restore guard's fixture carried a --context-length no native unit has, and
  its exit code was thrown away, so a dropped `|| true` stayed green;
- the 27B opencode block's own numbers were the table's, so which one was used could not
  be seen;
- needle.sh's 1/1 pass tolerated rc 1;
- the System One cancel was set before the call, so a check above the slot wait passed;
- the image lane's root refusal was a substring, the cockpit step's wiring too: both run
  now, the step against stub installers under install.sh's own shell options;
- job pruning was called by a name that did not exist, behind a hasattr;
- the audit test never read the argv it is named for;
- "importing binds nothing" looked for a name nothing defines: it measures threads and
  sockets around a fresh import;
- the static directory's containment was a string prefix, so a sibling named static.bak/
  was served before the session check: it compares path components, with a test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 18:22:38 +02:00
Hasan BasbunarandClaude Opus 5 13f4719d66 cockpit: a System One tab that exercises the whole contract, and two tabs that say what is not there yet
The endpoint answered typed decisions and the only way to see one was curl.
The tab is the console: five prefilled examples, an editor for all three
question types with their options and levels, the answer drawn as the
distribution it is, the headers the contract has no room for, the same call as
a curl that updates as you type, and the measured comparison against the
hosted Jev.

The serving key never reaches the page. The browser chooses the state and the
questions; the path, the key and the timeout are the cockpit's, and a test
asserts that a body naming its own path or upstream changes neither.

Availability is probed rather than assumed, with a request that cannot reach
the model (no state, which a proxy that serves the route refuses at the schema
and a proxy that does not relays to an engine with no such path), so a box
whose proxy predates v6.19 is told why instead of looking broken.

Image and Video say Coming soon, which is the honest state of both.

A gate holds the three lists that describe a tab together: the rail's buttons,
the panels they reveal and the router's own array, plus the two browser checks
that walk them. Adding a tab to two of the three is a button that opens nothing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 10:23:10 +02:00
Hasan BasbunarandClaude Opus 5 f43fad1fa7 tests: the diagnostics bundle's masking, the job layer, and a gate for "offline"
THE SECRET IN THE BUNDLE. job_diag_bundle collects journals, container logs, the
launch script and the engine's server_info into a tarball a user is meant to
attach to an issue, and every one of those sources carries the serving API key:
SGLang prints api_key=... in its ServerArgs banner, which lands in the docker log
and the journal, and the launcher passes it on its command line. The bundle masks
it, that masking has been wrong before, and it was committed as "key masked,
verified". This suite does not trust the word: it plants a known key in every
source (stubbed run() and http_json, a real launch script on disk), builds a REAL
tarball and greps every member. Two tests close the holes in that check: one
requires the <masked> marker in at least three members, because a grep for the key
also passes when the bundle collected nothing, and one requires the launcher to
still contain --port 30000, because gutting the file would also pass.

THE JOB LAYER. flush_cache, abort_all and smoke speak HTTP and let a connection
error propagate on purpose; run_job is what turns any raise into a failed job with
the exception named and releases the single-job lock in its finally. My first
version of these tests called the job functions directly and therefore asserted a
contract that lives one level up, and reached the engine actually serving on this
box in the process. They now drive run_job with both endpoints on a closed port,
and assert what matters: a failed job, an explanation, the lock released, and an
audit line carrying the status. Plus the bookkeeping: the log tail is bounded at
2000 lines and each line at 500 chars, ids are 16 hex chars and unique over 500
draws, and every summary is JSON-serializable at every stage.

"OFFLINE" IS NOW A CHECKED PROPERTY. These tests run on the machine that serves
production, so intention is not enough. A new CI step gives the suite a witness
HOME, hashes every file in it before and after, and compares the listening
sockets on both sides. It earned its place on the first run by catching
test_cockpit_code.py writing cockpit-secret into the developer's own
~/.config/qwen38: importing cockpit.py persists an HMAC secret so a service
restart does not log every browser out, and that suite had not redirected
COCKPIT_CONFIG_DIR. Fixed there, and the diag-bundle suite now sets HOME per test
and asserts its tarball lands inside it.

Also verified today, unchanged but never run in this session: resilience-check
16/16 (the cockpit tells the truth when it loses its server and recovers without
a reload) and monkey-check 43/43 (38 clicks of a storm queue exactly one job).

cockpit.py coverage 55 -> 61%, dashboard total 84 -> 87%, floors raised to match.
448 offline test functions. CI local 35/35.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 13:15:52 +02:00
Hasan BasbunarandClaude Opus 5 e2091d89d6 flash: the official image, a reduced draft vocabulary, and a seventh target (v1.8.0)
The flash lane serves lmsysorg/sglang:dev-qwen38-next-local by digest and builds
nothing: the file-backed PLE table (#37068), the merged KDA QSA sm_121 decode
kernel (#36845), the root cause of the wall of `!` (#36811) and the
mixed-precision loader (#38121) are all upstream now. The vendored overlay stays
as the rollback, OVERLAY_FLASH=1 ./install.sh. The 27B lane deliberately does
not move: the official DFLASH2 image predates the mrope fix our overlay carries
and its v0.5.19 kernels stop at sm_120, both verified inside the image.

--speculative-token-map is the lever upstream already had: the draft reads a
65,536-row slice of the shared lm_head instead of all 248,320 rows, which takes
2.6 GiB out of every engine step on a bandwidth-bound lane. One boot each, three
repeats after a discarded warm-up: code 39.8 to 47.9, math 39.0 to 47.1, prose
EN 23.4 to 29.3 tok/s, agent loop 30.3 to 27.0 ms/tok, acceptance unchanged,
needle 2/2 exact at 120K, canaries 4/4. The target still verifies every drafted
token over the whole vocabulary, so the reachable outputs are unchanged by
construction. build-token-map.py builds the list inside the serving image, and
the three flash checkpoints have byte-identical tokenizers, which is what makes
one map valid across them.

Two new targets, seven in all. flash-uncensored serves dealignai's
ABLITERATED-NVFP4, chosen because 205 of its 206 shards are byte-identical in
size to the stock export, so every serving flag transfers: 0 refusals of 5 blunt
probes, canaries 4/4, needle 1/1 at 120K, 45.4-46.4 tok/s on code. flash-nvda
serves nvidia's MIXED_PRECISION export with no --quantization and
flashinfer_cutlass pinned, and ties stock inside the spread. Each target now
resolves its own checkpoint flags AFTER MODEL_CHOICE converges, because a plain
./install.sh wrote a launcher with no --quantization modelopt_fp4 and died ten
minutes in, inside a Restart=always loop. The installer refuses to render rather
than write that file again, and CI asserts the resolution order.

opencode follows the switch. oc-limits.sh is one table, read by install.sh by
tier and by switch-model.sh from what the box actually serves, so switching a
1M 27B box to the flash lane no longer leaves a 700,000-token context limit
against a 200,000-token ceiling: the proxy would refuse mid-session, before
opencode ever decided to compact. FLASH_TIER picks between the cookbook's three
cells (4 requests keeping the context, 8 for latency, 24 for throughput), the
one-prompt ceiling goes to 200,000 tokens now that #37068 trims the table's
resident set, and --max-total-tokens is unpinned because a big pool is no longer
the dangerous outcome.

Six bugs found by testing rather than reading, each with a gate: switch-model.sh
dropped the draft quantization and the 27B fp8 KV cache (half its pool) on every
switch, and both rewrites are sourced awk functions CI executes; run.sh and
switch-model.sh counted the installer's pins instead of naming them, so adding
one broke them; the cockpit reported "image missing" about the image it was
running, because a digest-pinned image has no tag and docker hides it without
-a; PIN_MODELS did not know the new targets, so their presence read "unknown";
and a cockpit left running across a git pull served new controls backed by old
logic, which is now reported as stale code and fixed by install.sh restarting
the unit.

Tests: CI 27 gates (five new, all mutation-tested), 160 offline unit tests
(test_registry.py and test_cockpit_code.py new, 58 in test_recipes.py), HTTP
smoke 32, headless suites 43 monkey + 16 resilience + 7 targets rendered with no
console error, agent relay 30. Verified live on the box: a switch to
flash-uncensored and back from the cockpit API with the labels and limits
following, a restart from the cockpit, 13 pinned revisions and digests
resolving, and every error path of the three scripts refusing cleanly.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 22:51:54 +02:00