# TRI memory — non-obvious gotchas

Long-lived facts that aren't recoverable by reading current code/state.

## Exposing a new rig host on `/browse/<name>_remote` (2026-06-08)

Adding a new sshfs-backed `/browse/` route is two steps, both gotcha-prone:

1. **sshfs mount on the lab server** at `/home/cameronsmith/mnt/<host>/`.
   Use the robust option set — the bare default occasionally wedges into
   `Transport endpoint not connected` after suspend/resume, and the
   browse pages 403/500 with no log signal:
   ```
   sshfs robot-lab@<host>:/home/robot-lab/ /home/cameronsmith/mnt/<host> \
     -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,\
     follow_symlinks,cache=yes,kernel_cache,compression=no
   ```
   `follow_symlinks` matters: without it, symlinks the rig's home points
   into (e.g. yukon's `~/cameron/puget/` puget mount) just return ENOENT
   over sshfs. If the mount is wedged, `fusermount -uz /home/.../mnt/<host>`
   first (lazy unmount; the non-lazy `-u` fails if any process has a fd open).

2. **Allowlist + symlink.** `serve.py:_BROWSE_ALLOWED_ROOTS` rejects
   symlinks whose resolved target isn't in the list — even if the symlink
   lives under `/data/cameron/`. So creating `/data/cameron/<host>_remote
   → /home/cameronsmith/mnt/<host>` is necessary but not sufficient: add
   `Path("/home/cameronsmith/mnt/<host>")` to the allowlist and restart
   serve.py in `agents:website` (~2 s outage).

   The serve.py reload restart is `Ctrl-C` then re-run `python serve.py
   --port 8090` from `/data/cameron/para/.agents/reports/`. No hot reload.

## russet → yukon (rig handover, 2026-06-08)

russet's `~/cameron/puget` placeholder is an EMPTY dir, not an active mount
— previous sshfs to puget dropped at some point. russet has no SSH key
into yukon (russet→yukon = password-only). Don't try to mount yukon FROM
russet for the "yam_remote/cameron/yukon/" pattern; russet is abandoned
as a hop. Mount yukon directly on the lab server instead (see above).

## Cross-mount copies via the lab box

When you DO need to copy between rigs (rarely), the lab server is the
only box that has sshfs of multiple rigs simultaneously. Cross-mount
rsync routes the bytes through the lab over tailscale twice (read from
rig A, write to rig B), but it Just Works without any per-rig key setup.
~30 MB/s observed lab↔rig.
