commit 772bc45390f838d064a2ae46ef9054fa40cf9ba4
parent f4b64ae3494e9faff147bcfc3047a3974ade25af
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 16 Oct 2026 18:49:06 -0400
plans: release 32 lane R4 (services) as shipped
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
1 file changed, 95 insertions(+), 0 deletions(-)
diff --git a/plans/release-32/services.md b/plans/release-32/services.md
@@ -0,0 +1,95 @@
+# Release 32 — every feature in Docker, and both modes as services (as shipped)
+
+Operator ask (2026-10-16): "Could we have everything able to be run as a systemd service, supporting either on host or
+via Docker?" and "I want to make it as easy as possible for anyone to use all the features of Archilyzer, and I think
+Docker is a core component of that." Rulings followed: Docker is the first-class install with full feature parity,
+host mode the alternative, both run as systemd services from one command; on THIS machine the operator chose host-mode
+user units (written by hand 2026-10-16), which `service install --mode host` must reproduce and adopt; nothing in this
+lane installs, enables, starts or stops a unit here.
+
+## What
+
+- **`archilyzer service install|status|logs|restart|uninstall`** (`common/bin/service.ts`, units rendered by the pure
+ `common/lib/service/units.ts`). systemd USER units; Linux only (a sentence elsewhere).
+ - docker mode (default when `docker compose` answers and nothing is installed): ONE `archilyzer.service` running
+ `docker compose -f … --profile … up --no-build` in the foreground, `down` on stop, Restart=on-failure; two
+ ExecStartPre guards (wait ≤ 2 min for the daemon; refuse with the build line when an `archilyzer:` image is
+ missing). `--apps` = profiles (editor, umtool, site, homepage, ollama); overlays from `--overlays` or found
+ (anthropic when the key file EXISTS — never opened; storage when `docker-compose.storage.yml` exists).
+ - host mode: `archilyzer-editor.service`, `archilyzer-umtool.service` — byte for byte the operator's units for this
+ machine's paths (node directly, `next start -H <bind> -p 3001|3050`, UV_THREADPOOL_SIZE=16, explicit PATH with
+ `~/.local/bin`, ExecStartPre BUILD_ID refusal, StartLimit 5/300 s, KillMode=mixed, TimeoutStopSec 90/60,
+ MemoryHigh/Max from MemTotal: 7G/8G and 5G/6G at 16 GB) — and `archilyzer-site-<id>.service` per `--sites
+ <id>:<port>` (`serve-out.mjs` over the built bundle, HOST=127.0.0.1; how the private sites were served by hand).
+ - Adopt: an installed unit with identical text is left alone (no write, no daemon-reload); a different one is shown
+ as a diff and refused unless `--force`; a replaced running unit is not restarted. `--dry-run` writes nothing.
+ `--linger` runs `loginctl enable-linger`; `--no-start` enables only; `--idle-boot` adds ARCHILYZER_IDLE_BOOT=1.
+ - `status` (read-only): each unit's state/enablement/pid/since, an app's build id, its port's answer, the
+ transcription lane's held/armed state (host: settings.json; docker: `exec editor cat`), each container in docker
+ mode. `logs` wraps `journalctl --user`, `restart` / `uninstall` systemctl.
+- **`archilyzer service storage-overlay`**: writes `docker-compose.storage.yml` (gitignored): every location root,
+ every channel `media`/legacy `data` link and the saved-video store link no location covers, bind-mounted into the
+ editor and umtool at the same absolute path, `create_host_path: false`; `--corpus <dir>` mounts a host corpus at
+ `/data/transcripts`. Read by lstat/readlink on the corpus disk only.
+- **Image parity** (Dockerfile): a `runtime-umtool` target (trixie for ImageMagick 7; Pango coder asserted at build;
+ rsvg-convert, qrencode, zbarimg, chromium, `hyperframes@0.8.24` + its headless shell, telemetry off) run by the
+ umtool service; in every editor target gallery-dl (pinned 1.32.9, `GALLERY_DL_BIN`), Playwright's headless Chromium
+ (`--with-deps`, `/opt/ms-playwright` — the editor's report exports, Bluesky/Nitter/X/forum fetchers need it too),
+ espeak-ng, `REPORTS_DIR`, and links keeping TTS installs, the TTS cache and the generation ledger in volumes. The deps
+ stage pre-fetches node-datachannel's prebuilt (prebuild-install timed out from the build container, the source
+ fallback failed, and with it every image build since release 21).
+- **Compose**: `reports` and `ollama` volumes; an `ollama` service (profile, internal, `ARCHILYZER_OLLAMA_TAG`), `OLLAMA_URL`
+ defaulting to it; `ARCHILYZER_EDITOR_URL=http://editor:3001`; `host.docker.internal` on Linux. Overlays
+ `docker-compose.anthropic.yml` (the key file as a read-only bind — never an env value, so `docker compose config`
+ cannot print it) and `docker-compose.browser.yml` (Firefox profiles read-only); vulkan/gpu overlays give ollama the
+ GPU and no longer retarget umtool.
+- **Cookie spec `file:<path>`** → `--cookies <path>` for yt-dlp and gallery-dl (Chrome's keyring-encrypted cookies
+ cannot be read from a container; a cookies.txt can).
+- **Editor first run**: the dashboard's **First steps** while there is no channel (add a channel; each enabled
+ worker's model present or missing; sync and transcribe; publish).
+- **RUNNING_IN_DOCKER.md**: quickstart to a transcribed channel, Run it as a service, report → video, local models,
+ the Claude API, browser cookies, X posts, TTS, the MCP from the container, the storage overlay (now the media tier's
+ links), and the feature × install matrix.
+
+## Files
+
+`common/lib/service/{units.ts,units.test.ts}`, `common/bin/{service.ts,service.test.ts,archilyzer.ts}`,
+`common/lib/{cookiePolicy.ts,cookiePolicy.test.ts,envVars.ts,settingsSchema.ts,channelConfig.ts}`,
+`common/social/xGalleryDlFetcher.ts`, `common/publish/buildImage.test.ts`, `Dockerfile`, `docker-compose.yml`,
+`docker-compose.{vulkan,gpu,anthropic,browser}.yml`, `docker/entrypoint.sh`, `.env.example`, `.gitignore`,
+`editor/app/page.tsx`, `editor/app/components/dashboard/{FirstRunPanel.tsx,DashboardCockpit.tsx}`,
+`RUNNING_IN_DOCKER.md`, `AGENTS.md`; COMMANDS.md, ENVIRONMENT.md, CHANNEL.md, SETTINGS.md regenerated.
+
+## Gates
+
+On the branch after merging main `45c5a583`: tsc clean (all packages); common **4477** (4476 pass, 1 skipped; new:
+`service/units.test.ts` 9, `bin/service.test.ts` 9, `cookiePolicy` +1, `buildImage` +3); editor **327/327**;
+test:scripts **1045** (1041 pass, 4 skipped); `docs env`, `docs files`, `docs cli`, `settings example` checks clean.
+
+- **Host units vs the operator's live units** (read-only): `service install --mode host --dry-run` with the primary
+ checkout as root → both `= … already installed, identical — adopted`; `service status` against them → active,
+ enabled, build ids, `/` → 200 on 3001 and 3050, the transcription lane's state. No unit was installed, enabled,
+ started or stopped.
+- **Image** (capped builder, 8 GB): `runtime` 457 s, **2.60 GB**; `runtime-umtool` 529 s, **4.28 GB** (rebuilt after
+ the merge and the policy fix, 540 s). Not built: `runtime-vulkan`, `runtime-cuda` (their new lines — gallery-dl,
+ espeak-ng, Playwright `--with-deps` on trixie/ubuntu 24.04 — are unverified by a build).
+- **Container smoke** (`-p r32smoke`, fresh volumes, `ARCHILYZER_FETCH_MODEL=none`, `ARCHILYZER_IDLE_BOOT=1`, editor +
+ umtool, `down -v` after): `/api/pulse` 200; the dashboard shows **First steps** with "model missing"; `exec editor
+ pnpm archilyzer --help` lists the six `service` rows; gallery-dl 1.32.9, espeak-ng, yt-dlp, whisper-cli; the three
+ state links resolve into the volumes; headless Chromium launches in the editor (147.0.7727.15); `archilyzer doctor`
+ exit 0 (2 warnings: the skipped model; qrencode, which only the umtool image carries); umtool `/` 200, umtool →
+ `http://editor:3001/api/pulse` 200; ImageMagick 7.1.1-43 with PANGO, rsvg-convert 2.60.0, qrencode 4.1.1, zbarimg,
+ Chromium 155, hyperframes 0.8.24 + its headless shell, Playwright's shell.
+- **Renders in the umtool container**: chrome-deck (hyperframes frames), brand (pango/rsvg cards), deck-build,
+ chrome-posts, chrome-teaser, chrome-feed, audio-poster, av-sync: **99 tests, 98 pass, 0 skipped**. The one failure is
+ av-sync's CONTROL assertion (that the old unpinned graph drifts ~60 ms) — with Debian's ffmpeg 7.1 it does not drift;
+ the pinned assertion (the shipped behaviour) passes. Found and fixed on the way: Debian's ImageMagick policy refused
+ `pango:@file` (every text card).
+- `docker compose config -q` clean for the base file and each overlay (vulkan, gpu, anthropic, browser) with the
+ umtool and ollama profiles. The `ollama/ollama` image was not pulled.
+
+## Rulings followed
+
+Docker first-class, host the alternative, both as services from one command; host-mode units on this machine are the
+operator's and are adopted, never replaced without `--force`; nothing calls a model; the Claude key file is never
+read or printed by the command (existence only) and reaches a container only as a read-only mount.