docs: record UI-first rule and deploy/integration lessons

AGENTS.md gains the invariant that servers, credentials, notebooks, chat and setup are all doable from the web UI. Project mind records #7-#10 status and the pct exec, TUN, path-convention and watcher-timing gotchas.
This commit is contained in:
Florian Schmidt
2026-11-16 10:32:37 +01:00
parent 27be03d79a
commit 4fe64ee110
5 changed files with 18 additions and 6 deletions
+2
View File
@@ -3,5 +3,7 @@
- [2026-11-15] **Approach:** marimo in LXC 501 + Fabric/asyncssh helpers, Claude via marimo's ACP agent panel. **Outcome:** ACP panel superseded by marimo pair; sidebar chat is API-key only. **Now:** dropped.
- [2026-11-15] **Approach:** marimo pair (Claude Code CLI in terminal) writing Python notebooks. **Outcome:** worked technically, but notebooks became Python wrappers; commands not readable/copyable, chat only in bottom terminal. **Now:** custom app (ShellBook) with shell-first format.
- [2026-11-16] **Approach:** 5 parallel Codex agents in worktrees (core/server/web/terminal/auth) against fixed contracts, orchestrator merges. **Outcome:** worked; conflicts only in app.ts, server package.json, lockfile (regenerate with pnpm install). Integration bugs surfaced only across branches (event order, env var names, auth vs. other tests). **Now:** keep contracts-first + integration test after merge.
- [2026-11-16] **Approach:** first spec delivered config-file-driven host setup (hosts.yaml) and terminal-only Claude. **Outcome:** user expected everything from the UI (servers, passwords/keys, chat, notebook management, setup). **Now:** UI-first invariant in AGENTS.md; #7–#10 delivered via 4 parallel Codex delegates + orchestrator review fixes.
- [2026-11-16] **Approach:** reuse old marimo CT 501 for ShellBook, keeping the existing `claude` login (scratch `reuse-ct.sh`: snapshot `pre-shellbook`, copy ~/.claude to shellbook user). **Outcome:** two deploy bugs (TUN dev0 conflict, PATH/uid in pct exec) fixed in df489fa/4fe7e4e. **Now:** rerun update on CT 501.
## Archive
+5
View File
@@ -9,5 +9,10 @@
- [2026-11-16] **Notebook root symlinks (#9):** validating only child components after realpath(root) permits a symlinked notebooks root. Notebook reads and mutations validate the root itself before walking children; regression-covered. Workspace CLI/filesystem writers remain trusted against concurrent path swaps.
- [2026-11-16] **Chat CLI permissions (#8):** allowedTools only auto-approves; tools + restricted mode (2.1.248+) enforce the file/tool boundary. Synthetic fixture tests never invoke the real CLI; deployment must verify installed-version/login compatibility.
- [2026-11-16] **`pct exec` PATH** is `/sbin:/bin:/usr/sbin:/usr/bin` (no /usr/local/bin) and root `tar` keeps archive uids; install/update scripts set PATH and use `tar --no-same-owner`. Deploy tests in `deploy/test/`.
- [2026-11-16] **CT TUN passthrough:** a CT with manual `lxc.mount.entry` for /dev/net/tun fails to start if `devN: /dev/net/tun` is added too (autodev hook status 17); `ct-config.sh has_tun_passthrough` detects both forms.
- [2026-11-16] **Path conventions:** web/API notebook paths are relative to `notebooks/`; chat protocol paths are workspace-relative (`notebooks/...`). Convert at the ChatPanel boundary.
- [2026-11-16] **Watcher timing tests:** full parallel test run on Windows delays fs events >100 ms; keep watcher test debounce/quiet windows generous.
- [2026-11-16] **HTTP errors:** server httpError messages (4xx/502/503) are user-facing and shown by the web client; 500 messages are not. Keep 4xx/502 messages free of secrets.
## Archive
+6 -5
View File
@@ -2,8 +2,8 @@
> Always-loaded. Everything else is on-demand. Update TOC when files change.
## Current Focus
- [2026-11-16] M0–M3 done and closed (#1–#4); M4 (#5) and M5 (#6) code merged, issues open pending Linux verification.
- [2026-11-16] Next: first deploy to CT 501 (deploy/README.md), then verify tmux + `claude` live-reload loop there and close #5/#6.
- [2026-11-16] M0–M3 (#1–#4) and the UI-first follow-ups (#7 hosts/credentials, #8 chat, #9 notebook management, #10 settings/setup) closed.
- [2026-11-16] Open: #5/#6 need a real CT 501 deploy (update.sh, setup token, real SSH run, tmux terminal). Not yet verified in a real browser or against real OpenSSH.
## Invariants
- Displayed script == executed script (one substitution path).
@@ -12,9 +12,10 @@
- Strict SSH host key checking with explicit TOFU.
- `check` steps are side-effect free.
- Notebooks stay plain, readable Markdown.
- Everything doable from the web UI; files are storage, not the only way in.
## Table of Contents
- `architecture.md` — 8 entries — why custom app, stack, AI integration, workspace split
- `attempts.md` — 2 entries — marimo + marimo-pair trial and why it was dropped
- `open.md` — 2 entries — open design questions
- `gotchas.md` — 6 entries — integration foot-guns (CRLF scripts, host-key event order, tmux vs systemd, env names)
- `attempts.md` — 4 entries — marimo + marimo-pair trial and why it was dropped
- `open.md` — 2 entries — open design questions (sudo password, chat history)
- `gotchas.md` — 11 entries — integration foot-guns (CRLF, host-key events, tmux/systemd, env names, pct exec PATH, TUN, chat paths, watcher timing)
+1 -1
View File
@@ -1,6 +1,6 @@
# Open Questions
- [2026-11-15] Optional chat-style UI (stream-json headless `claude`) in addition to the terminal? Would bill to the Agent SDK credit on subscriptions — decide after M4.
- [2026-11-16] Chat panel stores only conversation titles + CLI session ids; restore message history after reload (from CLI transcripts) or keep it ephemeral?
- [2026-11-15] sudo with password (`type: secret` + `sudo -S`) or require NOPASSWD sudo only? Spec v0.1: `sudo -n` only.
## Archive