Files
LithosAnanke/demo
Claude 3bd81097e1 chore(license): an SPDX header on every source file that had none (LicenseRef-Starship-1.0) [skip ci]
The header scan (Captain Bob, 2026-11-10): 788 source files -- 351 with the
SL-1.0 header, 12 with the old name (docs/working/experiments, kept by
ruling), 31 under someone else's licence (tools/kconfig, Linux's, GPL-2.0:
kept), and 394 with none. Ruled: the SPDX form; capsules (.4th, .f18) and
proofs (.thy) left for a ruling of their own (mkcapsule's 64x16 block format,
content-addressed capsules).

253 files now begin
    SPDX-License-Identifier: LicenseRef-Starship-1.0
    Copyright (c) 2023-2026 Robert A. James
as a /* */ block (C, headers, assembly, linker scripts) or # lines (scripts,
Makefiles, Kconfig; below a shebang or a coding line); tools/mkcapsule.c,
which had the copyright line, gets the SPDX line only.

Not touched: docs/working/ (archive and old campaign material, as the
ruling kept the experiments); v4/system/post_cases.c (generated by
v4/tools/mkpost.py, "do not edit" -- the generator has the header).

Comments only: the kernel builds on amd64, aarch64, riscv64; make -C v4
test-32: 39 programs, 0 failures; every changed script parses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
2026-11-10 04:12:49 +00:00
..

demo/ -- StarshipOS in a browser

A public "Try it" console: each visitor gets a StarshipOS machine of their own, logged in as a Zuse minted for the demo, resumed at its prompt in under a second, gone when they leave. Milestone Public demo terminal (#111-#117).

XWiki "Try it" page (iframe) -> Apache: TLS, websocket -> ttyd -> start-session.sh
                                                                   -> QEMU amd64, resumed from the saved machine
                                                                   <-> console.py <-> the visitor's terminal

The pieces

File What it does
mint-zuse.sh Mints a Zuse of the demo's own -- never anyone's real one -- as a stick (#111, ruled 2026-11-06)
build-iso.sh Packs the amd64 ISO from a kernel build, as make qemu packs it
make-snapshot.sh Boots the machine once to [zuse@Hera] ok> and saves it (#113)
start-session.sh One visitor's session: resumes the saved machine, ends it on hang-up, close or time-out (#112)
console.py Joins the visitor's terminal to the machine only once it runs, discarding keys typed while it loads
qemu-args.sh The machine, shared by the two above: a resumed machine must match the saved one exactly
starshipos-demo.service ttyd as a systemd service, on localhost; two guests at once, a busy message for the rest (#114, #116)
DEPLOY.md Putting it on the server, step by step
apache-demo.conf Example vhost: TLS, the websocket, framing allowed for the .com only (#115)
xwiki-try-it.xwiki The "Try it" page, its own page on the .com XWiki (TryIt), in the landing page's style

What a visitor cannot do

Each session is a copy: the firmware variables are copied, the image is read-only, and the Zuse stick's writes are discarded (snapshot=on). The guest has no network device. QEMU runs under its seccomp sandbox (no spawning, no privilege changes), as an unprivileged user, inside a systemd unit that fences memory, CPU and the file system. A session lasts at most DEMO_SESSION_LIMIT seconds (1800).

Setting it up

From a checkout of the most recent green commit -- the latest that passed acceptance, master (or, once it is published, the nightly's StarshipOS.iso):

make ARCH=amd64 init INIT_DOCS=0
demo/mint-zuse.sh   /tmp/demo-zuse                     # once; keep the stick
demo/build-iso.sh   /tmp/StarshipOS.iso
DEMO_PROMPT='[zuse@Hera]' demo/make-snapshot.sh /tmp/StarshipOS.iso /var/lib/starshipos-demo /tmp/demo-zuse/zusestick.img

Then install starshipos-demo.service and apache-demo.conf (their headers say how), and paste xwiki-try-it.xwiki into the page TryIt on the .com XWiki. The {{html}} macro there needs a page author with script rights.

A new image means re-running build-iso.sh and make-snapshot.sh: the saved machine belongs to one image and one QEMU version. Sessions already running keep theirs.

Tested (2026-11-06, Ubuntu 24.04, QEMU 8.2.2, ttyd 1.7.4)

  • The Zuse minted: "genesis minted", then "identity confirmed" (logs/20261106-192626, -192739).
  • The saved machine: POST 538/538, "identity confirmed", [zuse@Hera] ok> after an 87 s boot.
  • A session, in a terminal and through ttyd's websocket: ready 0.2 s after it starts; 3 4 + . answers 7 ok, : SQUARE DUP * ; 7 SQUARE . answers 49 ok; keys typed before "Ready" are discarded, not half-delivered.
  • QEMU is gone 0.1 s or less after a hang-up or a closed terminal, and on time at the session limit.
  • Not tested here: Apache (none in the test container), several sessions at once (#116).