Repository navigation
feat(os): 1bit OS boots Lemonade with the engine as its onebit backend - #324
Conversation
PR Reviewer Guide 🔍(Review updated until commit 2f25773)Here are some key observations to aid the review process:
|
db0c79d to
343e25f
Compare
|
Persistent review updated to latest commit 343e25f |
343e25f to
09819ec
Compare
|
Persistent review updated to latest commit 09819ec |
09819ec to
ea3d696
Compare
|
Persistent review updated to latest commit ea3d696 |
14f48a3 to
40a179e
Compare
f87d5fe to
2f25773
Compare
|
Persistent review updated to latest commit 2f25773 |
lemond serves Lemonade's own UI from resources/web-app when it is built. The default stays as before (no web app, no node needed); 1bit OS asks for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lemonade leads (owner, 2026-10-03): the image now starts lemond with Lemonade's defaults (localhost:13305), its web app and every Lemonade backend that runs on Strix Halo Linux without ROCm, instead of a bare `1bit serve` from /data/1bit.conf. - mkimage.sh ships lemond, the lemonade CLI and the web app (built from third_party/lemonade when LEMONADE= has none), Mesa RADV for Lemonade's Vulkan backends, CA certificates and /etc/hosts. It installs Lemonade's backends ahead of time with Lemonade's own installer (lemond's /api/v1/install on the build machine, cached per pin) into Lemonade's cache directory on the data partition, and adds the system libraries they link. LEMONADE_BACKENDS picks them; ROCm backends stay Lemonade's download (their runtime is per GPU architecture, with absolute paths). - The data partition holds Lemonade's config directory (config.json: extra_models_dir=/data/models, models_dir on the stick; all else Lemonade's defaults), its environment file lemond.conf (LEMONADE_API_KEY, ...), its cache and downloads. Host, port and auth are Lemonade's settings there. - init.sh registers each model on the stick for the onebit recipe in Lemonade's user_models.json (<name>-1bit, local_path) and starts lemond. `1bit serve` stays on the shell for debugging; 1bit.conf is not read. - vmtest.sh: restricted (offline) network, Lemonade host 0.0.0.0 + API key on the stick; checks the web app (200), 401 without the key, /api/v1/models, a chat answered by Lemonade's llamacpp backend, and the onebit entry in Lemonade's registry (Lemonade hides it in the VM: no gfx1151 or NPU). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… by default os/LICENSES.md lists every third-party piece the image carries (Lemonade's backends, Lemonade, Mesa RADV, LLVM, BusyBox, Dropbear, the kernel, firmware and the Ubuntu system libraries) with its release, licence and source, reviewed from the licence files in each release archive, or the upstream repository at that tag where the archive has none. os/licenses/<recipe>/ holds, per backend, a SOURCE file (project, release, licences, source, "Ship: yes|no") and the licence texts its archive leaves out. mkimage.sh refuses a backend whose SOURCE does not say "Ship: yes", copies those directories to /data/lemonade/licenses, and puts /usr/share/licenses/1bit-os (LICENSES.md, LICENSE, NOTICE, Lemonade's licence, packages.txt with exact Ubuntu versions), the copyright file of every Ubuntu package it takes files from and /usr/share/common-licenses into the initramfs. It now copies only the listed backends from the seed cache, not everything earlier builds installed there. Removed from the default LEMONADE_BACKENDS: - thinksound:vulkan: pwilkin/thinksound.cpp has no licence at v0.1.2 or on main, so its binary may not be copied. - flm:npu: FastFlowLM v1.0.6 ships 26 closed NPU libraries and 231 xclbins with no source, under terms that disagree (README: free for any use; TERMS.md at the same tag: proprietary, patent-pending, under USD 10M revenue), and flm-real links them together with GPL-2.0+ FFTW. NOTICE also says the engine does not ship FastFlowLM's kernel binaries. Lemonade still downloads both on the stick when asked. VMTEST PASS on ryzen (CPU test image): img 3.33 -> 3.07 GB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e8005ba to
75c7b16
Compare
What
The 1bit OS appliance work: the image boots Lemonade, with the engine as its
onebitbackend. Recovered from an unreported branch (25 commits) and reduced to the 3 commits that are actually new — the other 22 were the security-audit fixes (now in #322) and the RFC #213 stage-3 strip (already inmainvia #306).Stacked on #322 (
1bit/security-audit-fixes-r2), because one of these commits supersedes that branch's OS boot config. Retarget tomainonce #322 lands.3 commits, 43 files:
1bit OS: boot Lemonade, with the engine as its onebit backend— shipslemond/lemonade/web app, Mesa RADV, CA certs,/etc/hosts; pre-installs Lemonade's backends via lemond's own installer into/data/lemonade/cache; the data partition holds Lemonade'sconfig.json(extra_models_dir=/data/models),lemond.confand cache;init.shregisters each/data/models/*.ggufand*/model.q4nxas<name>-1bitinuser_models.json, then startsexec lemond./data/1bit.confis no longer read — host, port and API keys are Lemonade's own settings, which is the intended contract (the engine holds no API key).vmtest.shchecks the web app 200, 401 without a key,/api/v1/models, and a onebit chat.1bit OS: licences for everything on the image—os/LICENSES.mdplusos/licenses/<recipe>/SOURCEwith aShip: yes|nogate;mkimage.shnow refuses a backend whose terms aren't cleared and ships/usr/share/licenses/1bit-os. Dropsthinksound:vulkan(no licence) andflm:npu(closed NPU binaries + GPL FFTW) from the default backends — both stay downloadable through Lemonade.build-lemonade.sh: LEMONADE_WEB_APP=1— opt-in build of Lemonade's web app (default off).Verified on the build box:
VMTEST PASS, image 3.33 → 3.07 GB.tools/copyright.py --checkpasses.Review notes
--device zincroute thatmaindeliberately refuses. Only the 3 genuinely-new commits are here.init.shsources/data/lemond.confas root (set -a; . ./lemond.conf) from a user-writable removable partition. The imagechmod 600s it, but on the stick it is editable — a USB-trust decision worth stating explicitly rather than a code bug.onebit_register()only escapes"and\when interpolating a filename intouser_models.json, so a filename containing a newline yields invalid JSON (DoS, not injection); itsgrep -qname test is also regex-sensitive.lemond.confhas the API key commented out whilehostislocalhost. Openinghostinconfig.jsonwithout setting the key exposes an unauthenticated network service — the docs warn, nothing enforces.Not to be merged: the release is on hold until the owner calls it.