Record round 6 proofs and the Round 7 handoff (documentation only)

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Dan
2026-11-21 12:31:15 -08:00
co-authored by Claude Fable 5.2
parent 65260911ae
commit 09e21f6368
3 changed files with 224 additions and 0 deletions
+125
View File
@@ -65,3 +65,128 @@ turns in Pepper's history, in their own session.
- Backups of `/var/lib/hermeven`, log rotation, monitoring, and an upgrade procedure.
- The service was started with these hardening options and loaded the model, but no option was
tested by trying to violate it.
## Later the same day
### The static phone page was replaced twice
The bridge on the server is still commit `f02715f`. Only the static page in `/opt/hermeven/www`
changed, and it was built from client code that Cody has not reviewed:
| When (UTC) | Page built from | Why |
|---|---|---|
| 19:5x | `f02715f` | First deployment |
| 20:1x | `e5559dc` | A host-detection change made on a wrong diagnosis (below) |
| after this record | the commit that adds this section | Shorter detection wait; corrected comments |
### What happened on the phone, and a correction
Dan opened `https://hermeven.xylo.gg` on his Android phone, paired with a code from the server,
and typed a question; Pepper answered (bridge log: device paired, one text turn, `succeeded`,
2.1 s in the agent). **The page had been opened by scanning the QR code with the phone's camera,
so it was running in Chrome, not in the Even app.** Its Diagnostics said "Browser preview: no
glasses, no microphone", and the browser line had no WebView marker.
Before that was understood, the implementer (Claude) wrongly concluded that the Even app provides
its connection late, told Dan that the Even app had loaded the page, allowed its network calls
and confirmed storage writes, and shipped a change to wait for the connection. None of those
three statements was supported: nothing has yet run inside the Even app. They were retracted
the same day. What the phone run does show is phone browser -> HTTPS -> bridge -> Pepper.
### Loading the page in a desktop browser
Chrome on the development desktop, `https://hermeven.xylo.gg/`: the page rendered the pairing
form with the bridge address preset to `https://hermeven.xylo.gg`, and Diagnostics reported
`Page origin: https://hermeven.xylo.gg`. `HERMEVEN_ALLOWED_ORIGINS` on the server is empty: the
page and the API share one origin, so no cross-origin allowance exists or is needed.
Through the server's Caddy 2.6.2, from outside:
| Request | Result |
|---|---|
| `GET /` | 200 `text/html` |
| `GET /assets/index-<hash>.js` | 200 `text/javascript`, 296,329 bytes |
| Headers on both | `strict-transport-security: max-age=31536000`, `x-content-type-options: nosniff`, `referrer-policy: no-referrer`, no `server` header |
| `GET /v1/device` with `Origin: https://evil.example` | no `access-control-allow-origin` header |
| `OPTIONS /v1/turns` preflight from that origin | 404, no `access-control-allow-origin` header |
## Clean-host proof of the written guide (not this server)
The guide's server-side steps were run from an empty `/opt/hermeven` on a disposable Ubuntu 24.04
host: a privileged Docker container with systemd as PID 1, on the development desktop
(`tests/deploy/runbook-proof.sh`). Hermes is not present there, and the hostname is `localhost`
with a certificate from Caddy's local CA, so this proves the install sequence, ownership, the
unit and the Caddy configuration. It does not prove a public certificate or a second real server.
The first attempt failed at `npm ci`: a clean Ubuntu has no compiler, and the SQLite library
builds from source there. The guide and `install.sh` now require `build-essential` and `python3`.
(The real server already had them, which is why the first deployment did not show this.)
Output of the passing run:
```
### host image
Ubuntu 24.04.5 LTS
/opt/hermeven does not exist
id: 'hermeven': no such user
### step 2: packages (Caddy, git, Node.js with checksum)
node-v22.23.5-linux-x64.tar.xz: OK
v22.23.5
2.6.2
### step 3: get the release onto the server (git clone of 65260911ae907846ea7febd933e8c0e37c471c22)
65260911ae907846ea7febd933e8c0e37c471c22
### step 4: deploy/install.sh
==> 1/7 user and directories
==> 2/7 copy the release to /opt/hermeven/app.new
==> 3/7 npm ci as the unprivileged user
==> 4/7 build the phone page for https://localhost
==> 5/7 hand the tree back to root
==> 6/7 install the phone page into /opt/hermeven/www
==> 7/7 activate the new tree and install the unit
Installed 65260911ae907846ea7febd933e8c0e37c471c22 to /opt/hermeven/app
Phone page installed to /opt/hermeven/www
Not started. Next: configuration, speech model, then 'systemctl enable --now hermeven-bridge'
### ownership and permissions after install
DEPLOYED_SHA: 65260911ae907846ea7febd933e8c0e37c471c22
app tree owner: root:root 755
not root-owned in app: 0 group/other-writable in app: 0
node_modules present: yes
hermeven cannot write the app tree
hermeven cannot create files in the source
www: root:root 755 index root 644 files=3
hermeven cannot write www
caddy can read www
state dir: hermeven:hermeven 700
secrets dir entries: 0 (install.sh wrote none)
models dir: not created by install.sh
### steps 5, 6: configuration and speech model
hermeven:hermeven 600 /etc/hermeven/bridge.env
Verified 7 file(s); downloaded 7.
Verified 7 file(s).
models owner: root:root
### step 8: start the bridge under systemd
systemd-analyze verify: ok
unit: active (running as hermeven, MainPID uid hermeven)
"msg":"Server listening at http://127.0.0.1:8787" "msg":"stt.loading" "msg":"stt.ready"
healthz (direct): {"status":"ok","schema_version":1}
state files: 700 hermeven 600 /var/lib/hermeven/hermeven.sqlite;hermeven 600 /var/lib/hermeven/hermeven.sqlite-shm;hermeven 600 /var/lib/hermeven/hermeven.sqlite-wal;
### step 9: HTTPS through Caddy (hostname replaced by localhost; certificate from Caddy's local CA)
caddy fmt --diff on the example: exit 0, 0 changed line(s)
Valid configuration
caddy: active
GET / -> 200 text/html; charset=utf-8
GET /assets/index-DqyTqNG5.js -> 200 text/javascript; charset=utf-8 296323 bytes
GET /healthz -> {"status":"ok","schema_version":1}
GET /v1/device -> 401 (no credential)
headers on /:
referrer-policy: no-referrer
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
headers on the asset:
referrer-policy: no-referrer
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
bridge address built into the page: 1 occurrence(s) of https://localhost
CORS for a foreign origin: 0 allow-origin header(s)
### done: 65260911ae907846ea7febd933e8c0e37c471c22
```