devbox/cmd/devbox-hub
shoemoney 5440054a41 feat(hub): gc --dry-run, dashboard token auth, /healthz + /readyz 🛡️🧹
Three hub-side operability/security closures:

- 🧹 `devbox-hub gc --dry-run`: previews the exact snapshots + chunks the
  sweep would remove (computed from reachability — same set the real run
  deletes) without mutating a thing. Cheap insurance before a destructive GC.
- 🔐 dashboard token auth (`--dashboard-token`): a non-loopback bind was
  unauthenticated (warning only) and leaked device names/activity. Token is
  accepted via ?token=, Authorization: Bearer, or an HttpOnly cookie pinned
  on first ?token= — so EventSource/fetch authenticate with index.html
  untouched. Constant-time compare.
- 🩺 `/healthz` (liveness) + `/readyz` (DB-ping → 503 when unreachable): real
  probes for the compose selfheal profile / LBs, which only had /metrics.

Tests: TestGCDryRun (accurate + non-destructive), TestDashboardAuth.
2026-06-30 12:14:54 -05:00
..
gc_crossshare_test.go feat(hub): gc --dry-run, dashboard token auth, /healthz + /readyz 🛡️🧹 2026-06-30 12:14:54 -05:00
gc_test.go feat(hub): gc --dry-run, dashboard token auth, /healthz + /readyz 🛡️🧹 2026-06-30 12:14:54 -05:00
main.go feat(hub): gc --dry-run, dashboard token auth, /healthz + /readyz 🛡️🧹 2026-06-30 12:14:54 -05:00