Commit Graph
5 Commits
Author SHA1 Message Date
Hasan BasbunarandClaude Opus 5.5 83994ad063 tests: an installer run stops at a wall, not at the refusal it trusts
Six test files ran install.sh or get.sh whole and counted on one refusal to stop the
run, from the real checkout and against the box's own units. With the refusal they stop
at disabled, the old tests ran step 1 on the box (nvidia-smi, docker, systemctl) and got
as far as sudo -v and docker pull of the pinned 27B image, three of the five stayed
green, and get.sh, started from a clone, went on to git fetch into it. They now run a
copy that exits at a wall before step 1 (after it for test_install_sudo, the one that
means to run it), reads its units from a directory the test owns, starts outside any
clone and has the commands that act on the box fenced; each run checks the wall was not
reached and nothing fenced was asked for. The same mutants now fail every one of them,
with no program of the box run. Both context-mode convergences are asked of fixture
boxes instead of the box running the suite, so the native one runs in CI too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 19:01:57 +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 a856bcac84 v1.12.0: one command, and the thing you open
The one-liner left an engine and an API port. The cockpit, which is the point
of the last four releases, sat behind a second command in a README nobody
reads after a 30 GB download. And the installer accepted being run as root,
which on 2026-09-13 produced a silent success into the wrong home: a clone in
/root, a new API key in /root/.config/qwen38, both units as User=root pointing
at it, the engine started, its own generation smoke test passed, success
reported, and every client on the box on 401 against a healthy engine. Nothing
failed, so nothing could be read from a log.

- get.sh refuses root before it clones, install.sh before it writes. With
  SUDO_USER set the refusal names the login, the key path that would stop
  working and the command that works, with no override; a genuine root login
  is refused by default and ALLOW_ROOT=1 gets through.
- The cockpit installs as step 10/10, after the engine answers a real
  generation. The Agent tab comes with it when opencode is on the PATH and is
  skipped with a note when it is not. A cockpit that fails to install never
  fails an engine that is already serving.
- The summary leads with the cockpit URL, read back from the installed unit,
  with a wildcard bind resolved into an address you can type.
- First install binds the tailnet address when there is one; a re-run
  converges on the installed unit. --no-cockpit persists in cockpit.off.

Three bugs the tests found while being written:
- getent exits 2 on an unknown user, and under set -e + pipefail that killed
  the sudo refusal itself: "Install failed at line 36" instead of the message.
- Four tracked test files were run by no CI step: test_install_preflight,
  test_install_sudo, test_proxy_tls, test_uninstall_inventory. Gate 8 covers
  dashboard/tests only, and tests/ had a hand-kept list they had fallen off.
- test_install_sudo declared 2 tests and ran 0 wherever it skipped, which is
  every runner: SkipTest from setUpClass is one skip with testsRun 0.

New gate "No test file in tests/ is left unrun": unittest modules discovered,
script-style files each named by a step, declared == ran in aggregate and per
file. Negative-controlled both halves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 11:19:41 +02:00
Hasan BasbunarandQwen3.8-flash-next via opencode c2246b4086 tests: the sudo-ticket test skips honestly when the pins are not cached
ci-local runs every root test file under a witness HOME with no caches on
purpose, and this test replays install steps 1-7 for real, which verify the
pinned bytes before anything else: under the witness it died at step 1
instead of reaching the step-8 refusal under test, failing the offline
suite's touch-nothing gate. It now checks for the HF cache dir and a local
sglang image first and skips with the reason named (the x86 skip for the
wrong machine class stays). The skip is observable: exit 0 with
"skipped=1", which is what the gate counts as a run, not a silence.

Co-Authored-By: Qwen3.8-flash-next via opencode <noreply@opencode.ai>
2026-09-13 20:03:27 +02:00
Hasan BasbunarandQwen3.8-flash-next via opencode 971c05eb16 installer: step 8/9 refuses by name when sudo has no ticket
The first of the 24 sudo calls was a bare `sudo cp` under set -e, so a dead
timestamp killed the install at the exact line where the real work starts
with no message at all: three times in one afternoon on the reference box,
background runs and passwordless contexts giving sudo no tty to ask on, the
ERR trap pointing at the cp line instead of the cause. One named refusal now
stands before anything privileged (`sudo -n true || die`, with the remedy in
the message), so the failure reads as what it is and the re-run resumes
where it should. tests/test_install_sudo.py stages the exact situation, a
sudo that always fails with everything else real and cached, and pins the
refusal's wording, its step, and that no backup was attempted; it fails both
its tests against the unfixed installer (negative control run on this box)
and skips off the reference class of machine. Rides the next release, no
behavior change for a normal install beyond one silent no-op check.

Co-Authored-By: Qwen3.8-flash-next via opencode <noreply@opencode.ai>
2026-09-13 19:33:48 +02:00