ADR 0024 — The owner's phone writes through the Library
Status: proposed · 2026-10-20 · amends ADR 0022's consequence "a phone is a reader and a camera, never a writer"
Context. ADR 0022 made one machine the record's home and every other device a reader, and said of the phone that it is "a reader and a camera, never a writer, until the day a reader on it can write through the crossing". The Library (logbook serve) binds 127.0.0.1 and answers a form only from this machine's own pages (Site.write). The owner closes his days on the Day page, and travels for two weeks without the Air. On the Air, tailscale serve --bg 8765 already puts the Library behind HTTPS on his tailnet: tailscaled forwards each request to 127.0.0.1:8765 from loopback, the phone reads every page, and every form is refused because the browser's Origin is the tailnet name. #335 asked whether a second, explicit setting should let that one name write; the owner answered yes on 20 October 2026.
Decision.
- One setting, off by default.
logbook.jsonMAY carry"phone": {"origin": "https://<machine>.<tailnet>.ts.net", "login": "<tailnet login>"}. It is written bylogbook setup phoneonly, after a yes typed at a terminal, and removed by--off; never by the Library and never by an agent. A reader's setting, asday_startis: no line, hash or month file changes with it, and SPEC §1 already has writers keep keys they do not know. - The gate adds the phone, and takes away only what came through a proxy. A POST to
http://127.0.0.1orhttp://[::1]from this machine answered today is answered as today (decision 5 says which requests are this machine's). In addition, with the setting, a POST from loopback is answered when it carries exactly oneOrigin, equal to the setting's after normalisation; exactly oneHost, the setting's host; exactly oneTailscale-User-Login, the header Tailscale Serve sets from the device's tailnet identity, equal to the login; and noSec-Fetch-Destbutdocument. Anything else is a 403 with nothing written. - The writer is still the home. The phone holds no file, no key and no copy; the Library writes through the CLI's own functions under the writer lock, as for a click on the Air. ADR 0022's one home and one chain are unchanged. What changes is who may click: the owner's own phone, on his tailnet, by his login.
- Not the crossing. The policy's
writelist (ADR 0022, the MCP door) is the agent's door and is never read here. An agent never writes this setting. - A proxied request is the phone's or nothing. A request is proxied when its
Hostis not a loopback literal (127.0.0.1or[::1], any port) or when it carries anyTailscale-*orX-Forwarded-*header. A proxied POST is answered only through decision 2's checks and refused (a 403, nothing written) when the setting is off, whateverOriginit sends or leaves out; requests tohttp://127.0.0.1:8765orhttp://[::1]:8765from this machine (any port, no proxy header) are answered as before; a request naming any other host,localhostincluded, is treated as coming through a proxy.
Considered. Binding the tailnet address — the server would listen beyond loopback and every device on the tailnet would reach the port directly; refused. The Origin alone — any device on the tailnet, a shared-in user among them, could send it by hand; the login ties it to the owner. A token in the page — a secret the server would keep, and a second thing to get right where the Origin and Tailscale's identity already suffice.
Consequences. A phone is a reader, a camera, and, when the owner names it, the hand that clicks the Library's forms through Tailscale Serve. Tailscale's behaviour is now part of the gate: that serve forwards the Host it was asked for, sets Tailscale-User-Login from the device's identity and drops one the client sent, and sends none for a tagged device or a Funnel request. The setting assumes it and the docs say to verify it with one star from the phone before relying on it; the gate refuses a login header sent twice, in case it is ever appended rather than replaced. tailscale funnel on the port is never to be used: it would put the reading pages on the internet whatever this setting says. A process on the Air can forge every header, as it can already write today. A program on the tailnet that sends no Origin was answered as this machine before this ADR, since behind Tailscale Serve it arrives from loopback; decision 5 closes it (the owner's word of 21 October 2026), and rests on tailscaled sending the tailnet name as Host and adding X-Forwarded-*. A raw TCP forward of the port (tailscale serve --tcp, any port forward) adds no header and keeps the client's Host, so its requests read as this machine's: the Library is served through Tailscale Serve's HTTPS proxy only.