The auth smoke ran the new binary from /tmp, but TrueNAS mounts /tmp noexec —
'Permission denied' on exec. Stage binaries under $DEST/.staging (the app dataset,
exec-ok) instead. The fail-safe worked perfectly: it aborted with prod untouched.
Then ran for real — live hub migrated v1→v3, all data preserved, P2 fixes + TLS live.
- scripts/hub-auth-smoke.sh: throwaway-instance smoke proving invite revocation
works + +s attenuation holds (admin without +s denied conferring it). No python/jq
dep (curl+sed). Reusable by redeploy + CI. Verified locally.
- deploy/redeploy-hub.sh: rewritten from build→scp→restart into a SAFE pipeline —
migration dry-run on a COPY of live data (live untouched) → auth smoke the new
binary on the NAS → back up binary+DB (stopped, WAL quiescent) → swap + sync unit →
post-verify (hub answers + /v1/invite/revoke=401 proves new code) → AUTO-ROLLBACK
on failure. The hub DB is canonical history; never YOLO a binary onto it.
- deploy/devbox-hub.service: add --gc-every 24h (self-maintain; blobs don't grow
unbounded). HTTPS via NPM note.
- deploy/devbox-hub.service: reboot-persistent systemd unit (the one live on .10)
- deploy/redeploy-hub.sh: cross-compile linux/amd64 + ship + restart hub
- deploy/redeploy-client.sh: build + push client to fleet macs
Captures the by-hand deploy flow so redeploys (every M3 endpoint) are one command.