Commit graph

126 commits

Author SHA1 Message Date
df33b5facd fix(hub): gc enumerates prunable manifest chunks before deleting blobs (cross-share double-prune leak)
Some checks are pending
CI / vet-build-test (push) Waiting to run
Content-addressed snapshots can appear as prunable in two shares simultaneously.
The old inline manifestChunks call inside the prune loop read the blob after the
first share's iteration had already deleted it, returning ErrNotFound → nil hashes
→ DeleteSnapshot decremented nothing → chunk stayed at refcount 1 and leaked
forever. Pre-enumerate all chunk lists once before the deletion loop so both
(share,id) decrements always fire with the correct hash list.

No change to dry-run path: it never deletes blobs so ErrNotFound cannot occur there.
2026-06-30 18:30:22 -05:00
c807ea8c91 docs: round-9 polish — doctor free-disk, access-log device id, ignore validation 🩺📝🙈
Some checks are pending
CI / vet-build-test (push) Waiting to run
2026-06-30 18:08:45 -05:00
4727d3d7f3 round9-client: log swallowed hook failures, doctor free-disk check, validate devbox ignore pattern 🩺⚠️🙈
Some checks are pending
CI / vet-build-test (push) Waiting to run
2026-06-30 18:07:53 -05:00
e05f4da87d round9-hub: add device id to --access-log lines (and make the auth ctx comment true)
- ctxKey/deviceKey *string holder pattern; AccessLogMiddleware allocates holder, injects into ctx, logs devID (or "-" for anon) as final field
- auth now sets the holder after resolving deviceID — comment updated to match reality
- TestAccessLogDeviceID: healthz logs "-", authed /v1/head logs the real device id; captures global log.Writer()
2026-06-30 18:07:53 -05:00
7688330fdf docs: note graceful shutdown drops SSE streams immediately (fast redeploy) 🛑
Some checks are pending
CI / vet-build-test (push) Waiting to run
2026-06-30 17:58:17 -05:00
73c3f309a5 perf(hub): drop SSE streams on shutdown so redeploys don't eat the 10s drain 🛑⚡
Some checks are pending
CI / vet-build-test (push) Waiting to run
Every connected client daemon holds a long-lived /v1/events SSE stream, and
http.Server.Shutdown waits for connections to go idle — which these never do —
so a graceful shutdown always burned the full 10s drain timeout (felt on every
hub redeploy with clients connected). RegisterOnShutdown now signals the broker
to return every active /v1/events handler, so shutdown completes near-instantly.

Test: TestCloseEventStreams (live stream returns promptly after the hook).
Round 8 was 0 GO — the codebase is mined out; this is the reversed no-go.
2026-06-30 17:57:55 -05:00
f4e50c4a40 fix(deploy): post-verify marker → /healthz (invite/revoke went stale once M8a shipped) 🎯
Some checks are pending
CI / vet-build-test (push) Waiting to run
The live hub already returns 401 for /v1/invite/revoke (M8a deployed), so that
marker no longer proves a swap took — it'd pass even on the old binary. /healthz
is the clean old→new discriminator (pre-round-1 hub 404s it; new code 200s with
version), plus a /readyz DB-ping check. Used this to verify the 7-round redeploy.
2026-06-30 17:48:27 -05:00
09fd944a12 docs: note backup is flocked against gc (consistent under concurrent sweep) 💾🔒
Some checks are pending
CI / vet-build-test (push) Waiting to run
2026-06-30 17:27:24 -05:00
f51e69839a fix(hub): flock gc against backup so a sweep can't strand a backup mid-copy 🔒💾
Some checks are pending
CI / vet-build-test (push) Waiting to run
`backup` does VACUUM INTO (DB snapshot) then copies the blob tree; a concurrent
gc sweep could delete a blob the snapshot references between those steps,
producing a backup that's internally inconsistent — a dangling ref you'd only
discover on restore. Now gc sweeps (the --gc-every ticker AND `gc`) and `backup`
take an exclusive flock on <data>/.lock, so they can't overlap. Dry-run gc skips
the lock (read-only, must not block a long backup). unix flock (auto-released on
crash); no-op stub on non-unix (the hub ships linux/darwin).

Test: TestDataLockMutualExclusion. Cross-builds clean for windows + linux/arm64.
2026-06-30 17:27:00 -05:00
d367e0ca8f fix(transport): SSE Events reuses c.hc so a hung connect can't wedge the daemon 🔌
Events() used a bare &http.Client{} (zero timeouts) — a black-holed TCP connect
blocked the daemon's reconnect loop forever (backoff only fires on stream
error/close, not a stuck connect). The bare client existed to dodge round-1's
30s TOTAL timeout on c.hc; round 2 removed that, so c.hc now bounds dial/TLS
with NO total timeout — exactly right for a long-lived SSE stream — and is
proxy-aware. One-line swap.
2026-06-30 17:27:00 -05:00
55e1e77fc6 docs: sync README for round-6 fsck dangling-refs + status liveness 🔬⚠️
Some checks are pending
CI / vet-build-test (push) Waiting to run
- fsck now also flags dangling snapshots (manifest → missing blob)
- status says when the daemon isn't running (no silent stale state)
(transport HTTP_PROXY regression fix restores standard env behavior — no doc knob)
2026-06-30 16:26:25 -05:00
0ab6a88627 feat(hub): fsck also detects dangling snapshots (manifest refs a missing blob)
Some checks are pending
CI / vet-build-test (push) Waiting to run
2026-06-30 16:25:06 -05:00
6cf8846544 round6-client: restore HTTP_PROXY support (transport regression) + status flags daemon-not-running
- internal/transport/client.go: replace bare &http.Transport{} with
  DefaultTransport.Clone() so HTTP_PROXY/HTTPS_PROXY/NO_PROXY, ForceAttemptHTTP2,
  IdleConnTimeout, and ExpectContinueTimeout are preserved; only intentionally-tuned
  fields (DialContext, TLSHandshakeTimeout, ResponseHeaderTimeout, DisableCompression,
  MaxIdleConnsPerHost) are overridden.
- cmd/devbox/main.go: statusCmd disk path now calls control.DialState once upfront;
  prints "⚠️  daemon not running — showing last-known disk state (run: devbox start)"
  when daemon is absent so users aren't silently misled.
- Tests: TestTransportHonorsProxyEnv asserts Proxy!=nil + ForceAttemptHTTP2=true;
  TestStatusDaemonNotRunning asserts warning appears on joined-but-no-daemon device.
2026-06-30 16:25:06 -05:00
f8fb8564b2 docs: sync README for round-5 fsck + share ls 🔬📑
Some checks are pending
CI / vet-build-test (push) Waiting to run
- devbox-hub fsck (at-rest blob integrity scan, non-zero exit on corruption)
- devbox-hub share ls [--json]
(push-integrity fix is internal — no user-facing surface to document)
2026-06-30 15:29:12 -05:00
f0fe810ab6 fix(hub): derive push chunk set from the manifest, not client-supplied req.Chunks
Some checks are pending
CI / vet-build-test (push) Waiting to run
Trust boundary: handlePush previously verified that every hash in req.Chunks
existed in the blob store, but it trusted req.Chunks as the authoritative list
of chunks the pushed manifest references.  A buggy or malicious client could:

  (a) Push a manifest referencing chunk C while omitting C from req.Chunks →
      hub commits a snapshot whose manifest references a blob that may not
      exist → every subsequent pull 404s on C (dangling snapshot).

  (b) Include in req.Chunks a chunk not referenced by the manifest →
      refcount is bumped for a blob GC can never safely collect (phantom ref).

Fix: after confirming the manifest blob is present, we now fetch + unmarshal
it and derive the DISTINCT chunk hash set directly from Manifest.Entries[*].Chunks.
Each hash in that set is verified to exist in the store; any missing hash rejects
the push with 409 (same status as before).  Only manifest-referenced hashes are
passed to db.AddSnapshot() for refcounting.

Size hint: meta.ChunkRef.Size is used only for metrics/dashboard totals and is
stored once (first INSERT; ON CONFLICT only bumps refcount, not size).  GC
decisions are made on refcount, not size.  We keep req.Chunks as a size-hint
lookup (reqSizes map): if the client is honest the size is correct; if a hash is
absent from req.Chunks the size defaults to 0, which is harmless.

Happy-path unchanged: an honest client (syncer.go) always derives req.Chunks
from the same manifest, so all hashes are present with correct sizes.

Tests: TestHubHappyPath updated to push a real manifest JSON (required now that
the hub parses it); TestPushManifestChunkIntegrity asserts the malicious pattern
is rejected and the head does not advance, then confirms an honest push succeeds.
2026-06-30 15:28:02 -05:00
132978e63d round5-hub: fsck (at-rest blob integrity) + share ls 2026-06-30 15:28:02 -05:00
a88056649a docs: sync README for round-4 status errors + hub serve hardening 🩺🛑
Some checks are pending
CI / vet-build-test (push) Waiting to run
- status now surfaces per-mount last sync error (+ last_err in --json)
- serve: version/dashboard in startup log, non-loopback --listen warning, graceful SIGTERM shutdown
2026-06-30 14:24:48 -05:00
3c15ae1260 round4-hub: non-loopback listen warning, version in startup log, graceful shutdown 🛰️🛑
Some checks are pending
CI / vet-build-test (push) Waiting to run
- warn when --listen is non-loopback (plain HTTP, cleartext bearer tokens)
- startup log now includes build version + dashboard on/off state
- serve blocks on SIGTERM/Interrupt; 10s drain window before exit
- hoist dashboard http.Server so shutdown also drains it
- table-test isLoopback (IPv4, IPv6, empty host, non-loopback variants)
2026-06-30 14:23:42 -05:00
3ea8df85aa round4-client: surface last sync error per mount in status
Track lastErr per mount (mirroring lastSync pattern), cleared on
success so a recovered mount shows clean. Errors from LoadIgnoreWith,
Pull, and Sync all land in the map and surface through StateSnapshot
into 'devbox status' (human ⚠️ warning) and --json (last_err field).
2026-06-30 14:23:42 -05:00
b8b9bd1f22 docs: sync README for round-3 hub admin + DR + doctor clock-skew 📚💾
Some checks are pending
CI / vet-build-test (push) Waiting to run
- hub: backup <dir> (DR), serve --metrics-token / --access-log, device ls [--json]
  (corrected the old aspirational `device list` row → real `device ls`), gc --keep-days
- client: doctor now also warns on clock skew vs the hub (>30s)
2026-06-30 13:55:24 -05:00
dd27af3cc2 round3-hub: backup, metrics auth, device ls, gc --keep-days, access log
Some checks are pending
CI / vet-build-test (push) Waiting to run
2026-06-30 13:53:16 -05:00
8f78f65d57 round3-client: doctor clock-skew check vs hub 2026-06-30 13:53:16 -05:00
70101e7308 docs: sync README for round-2 WAN hardening + new flags 📚
Some checks are pending
CI / vet-build-test (push) Waiting to run
- conflicts --rm, doctor --json, status sync-age rows
- /healthz version, /metrics counters
- config.toml: compress now both-ways, sync.ignore_defaults; WAN timeout/retry/parallel note
2026-06-30 13:27:32 -05:00
84a4ff53e8 feat(cli): doctor --json, conflicts --rm, status sync-age, opt-in default ignores 🧰🙈
- 🩺 `doctor --json`: structured check report for cron/monitoring; still exits
  non-zero on ❌ (collects checks into a slice, JSON path suppresses the human lines).
- 🗑️ `conflicts --rm`: delete every `.conflict-` copy after review (lazy cleanup,
  not a resolver). Only touches conflict copies — real files untouched.
- ⏱️ `status` shows per-mount last-sync age ("synced 12s ago" / "not synced yet")
  from a daemon-tracked timestamp (control.MountState.LastSyncUnix); also in --json.
- 🙈 the reversed no-go: `settings.sync.ignore_defaults` (opt-in, default off) layers
  a built-in junk set (node_modules, .git, target, dist, build, .venv, __pycache__,
  .next, .DS_Store) onto the matcher — don't ship gigabytes of regenerable junk over
  the now-live WAN. Reuses round-1 --exclude plumbing; honored by daemon + publish.

Tests: doctor --json valid+exit-code, conflicts --rm deletes only conflicts,
ignore.Defaults match. go test ./... -race + vet clean.
2026-06-30 13:26:24 -05:00
4333bba55b feat(hub): /metrics transfer counters + build version in /healthz 📊🩺
- 📊 /metrics gains real WAN observability counters beyond the 4 gauges:
  blob bytes in/out (the bandwidth signal now the hub is internet-reachable)
  plus pushes/conflicts totals for sync churn. Atomic, incremented at the
  blob + push handlers.
- 🩺 /healthz now reports the build version ("ok <version>") so a deploy can
  curl-verify the new binary is actually live (SetVersion wired in serve).

Test: TestMetricsCountersAndHealthVersion (version in healthz; bytes_in/out
move on a real PUT/GET).
2026-06-30 13:18:13 -05:00
963ece58b0 feat(transfer): harden the WAN sync path — timeouts, retry, parallel I/O, download gzip 🌐⚡
Now the hub is WAN-reachable, the transfer path needed real hardening:

- ⏱️  request timeout fix: replaced the 30s TOTAL http.Client.Timeout (which
  killed a 256MiB blob mid-transfer over a slow link) with granular dial / TLS /
  response-header timeouts + TCP keepalive. Body transfer is no longer wall-clocked.
- 🔁 retry + exponential backoff on transient blob transfers (network / 5xx),
  3 attempts; 4xx fails fast. Blob GET/PUT are content-addressed (idempotent),
  so retry is safe; control calls are left alone.
- 🚀 parallel blob uploads (push) and parallel chunk downloads (pull reassembly),
  bounded pools (8), sharing the existing rate limiter. WAN is RTT-bound — this
  keeps the pipe full instead of one-blob-at-a-time.
- 🗜️ download (response) gzip: round 1 compressed only uploads, but a clone is
  download-heavy. Client negotiates gzip explicitly (so the rate limiter counts
  wire bytes), hub streams the response through gzip, client decompresses
  bomb-safely. Gated by the same settings.transfer.compress flag.

Tests: retry transient-then-success + 4xx-no-retry, gzip download round-trip.
All existing push/pull round-trips green under -race (refactors behavior-preserving).
2026-06-30 13:15:17 -05:00
4168b2109f docs: sync README CLI reference with new flags + config.toml knobs 📚
Some checks are pending
CI / vet-build-test (push) Waiting to run
- device: status/log/conflicts --json, pause --for, mount --exclude, doctor exit
- hub: gc --dry-run, serve --dashboard-token, /healthz + /readyz
- new config.toml reference (transfer.compress, sync.rescan_seconds)
2026-06-30 12:36:25 -05:00
11fe999ca2 feat(transfer): opt-in gzip blob compression for WAN sync 🌐🗜️
The "changed my mind" feature: deferred as YAGNI on a LAN, but the hub is now
WAN-reachable (port-forwarded), so over-the-internet sync is a real path and
compression earns its keep.

- client (settings.transfer.compress, default off): gzip a blob upload only
  when it actually shrinks — incompressible chunks (media, encrypted) go raw so
  we never inflate the wire. Sets Content-Encoding: gzip. Wired into the daemon
  sync loop and the initial `publish` upload.
- hub: decompresses gzip uploads before hashing, so dedup + content-address
  integrity are unchanged. Bomb-safe — caps BOTH the compressed stream
  (MaxBytesReader) and the decompressed size (LimitReader), rejecting a gzip
  header over a non-gzip body.

Tests: client gzip-when-smaller / raw-when-not, hub decompress round-trip +
bad-gzip rejection. go test ./... -race clean, go vet clean.
2026-06-30 12:34:27 -05:00
8c5d576a72 feat(device): --json output, streaming chunker, pause --for, per-mount exclude, rescan knob ✨
Five device-side wins from the feature review:

- 🤖 `--json` on status/log/conflicts: machine-readable output for fleet
  scripting/monitoring. status prefers live daemon state (paused +
  base-snapshot), falls back to disk; not-joined → {"joined":false}.
- 🌊 streaming chunker: chunk.SplitReader feeds FastCDC from an io.Reader so
  the manifest build no longer slurps whole files into RAM — a multi-GB file
  can't OOM the daemon. Identical boundaries/hashes (proven vs fragmented reads).
- ⏱️  `devbox pause --for 2h`: control socket carries a duration; the daemon
  schedules an auto-resume timer. Re-pause replaces it; plain pause/resume
  cancel it (no surprise resume).
- 🙈 per-mount `devbox mount --exclude <pat>`: device-local ignore layered on
  the shared .devignore (LoadIgnoreWith) — skip a local build dir without
  touching the shared file. Honored by daemon sync, restore, and deploy.
- 🎛️  rescan cadence is now settings.sync.rescan_seconds (was a hardcoded 60s
  const) — tune the watcher fallback per machine without a rebuild.

#6 (doctor non-zero exit) was already shipped — doctor returns an error on ❌.
Tests: SplitReader-vs-buffered, PauseFor auto-resume + cancel, wire duration,
LoadIgnoreWith layering, status/conflicts --json. go test ./... -race clean.
2026-06-30 12:29:02 -05:00
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
7e13eca8ad docs: production TLS + safe-upgrade guide; extract safe-stateful-redeploy skill 📚🛡️
Some checks failed
CI / vet-build-test (push) Has been cancelled
README: hub deploy section gains a Production collapsible — front the hub with a
reverse proxy for TLS (client_max_body_size 0 + proxy_buffering off for SSE), and
the never-YOLO upgrade pipeline (dry-run on a copy → smoke → backup → rollback).
General pattern, no private hostnames (repo is public).
2026-06-24 17:47:51 -05:00
ad7ed674fe fix(deploy): stage smoke binaries on the dataset (TrueNAS /tmp is noexec) 🐳
Some checks are pending
CI / vet-build-test (push) Waiting to run
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.
2026-06-24 17:45:22 -05:00
d672dd2fda fix(verify): migration-verify robust to no-op + already-migrated DBs ♻️
Some checks are pending
CI / vet-build-test (push) Waiting to run
Compare before/after counts directly (captured pre-run) instead of via the
v1→v2-only .pre-v2.bak, so the dry-run passes on an already-migrated DB (steady
state) AND on a fresh v1→v3 jump. Backup check is now conditional on an actual
version bump. Verified on the real live .10 DB: 0→3, 13/12 devices/shares + 16
chunks preserved, 3 legacy heads backfilled (snap 13→16), orphans=0.
2026-06-24 17:41:44 -05:00
735b5b2c4b feat(deploy): hardened safe hub redeploy + reusable auth smoke 🛡️🚀
Some checks are pending
CI / vet-build-test (push) Waiting to run
- 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.
2026-06-24 17:36:21 -05:00
35820386cb docs: P1+P3 fleet-verified on real arm64 Pi (192.168.1.13) — caveat closed 🥧✅
Some checks are pending
CI / vet-build-test (push) Waiting to run
The Pi came back online. Ran the headline acceptances on real hardware:
- P1: anon curl|sh install on a clean no-Go arm64 Pi -> working devbox 0346995,
  devbox doctor reports linux/arm64.
- P3: dashboard-fleet-verify (remote mode) -> all 5 flow events (join·push·pull·
  conflict·gc) on the live SSE stream + history window, on the real Pi.
Upgraded plan.md wording from qemu/local to real-Pi fleet-verified.
2026-06-24 17:19:58 -05:00
74d8b79cd8 docs: P3 dashboard depth shipped — plan/README/CLI synced 📊✅
Some checks are pending
CI / vet-build-test (push) Waiting to run
plan.md: P3 row -> ✅ SHIPPED (pull·gc·conflict + server-side history; verified on
SSE + headless 0-errors). Roadmap mermaid all-green; status badge P1+P2+P3 shipped.
README: dashboard section now documents the 5 flow events + the reload-surviving
history sparkline + --gc-every; CLI table gains 'invite revoke' (P2) and
'serve --gc-every' (P3).
2026-06-23 20:53:59 -05:00
80380652cc feat(dashboard): P3 depth — pull/gc/conflict flow events + server-side history ✨📊
Some checks are pending
CI / vet-build-test (push) Waiting to run
- Hub emits 3 new flow events: pull (head fetch/propagation, handleHead), conflict
  (stale-parent push, handlePush), gc (in-process sweep). Opt-in periodic GC via
  'serve --gc-every <dur>' (default off) self-maintains the hub AND animates each
  sweep; runGC stays put (no risky refactor of mark-and-sweep).
- Server-side history ring: per-minute activity buckets (push/pull/conflict/gc +
  bytes), last 60 min, in /api/state — the sparkline now survives a page reload
  (was computed from the live stream only). Recorded under the Emit lock; race-clean.
- Frontend (index.html): pull = teal inbound pulse, conflict = red collision burst,
  gc = amber hub sweep + toast; stacked per-minute history sparkline seeded from
  /api/state and growing live. One file, no new deps.
- dashboard-fleet-verify.sh: rewritten — drives join·push·pull·conflict·gc and
  asserts all 5 on the SSE stream + the history window; adds LOCAL=1 mode (native,
  no Pi). Verified locally end-to-end. Tests: TestHistoryRing. go test ./... -race clean.
2026-06-23 20:45:31 -05:00
3c69a28057 docs: P2 (M8a auth audit) shipped — +s attenuation + invite revocation 🛡️📊
Some checks are pending
CI / vet-build-test (push) Waiting to run
2026-06-23 20:29:22 -05:00
f8135b9d07 feat(M8a): adversarial auth audit — close +s escalation + add invite revocation 🛡️
Some checks are pending
CI / vet-build-test (push) Waiting to run
P2 adversarial audit (6 finders + skeptic verification, 13 agents). Two real
findings fixed with regression tests; rest documented as single-owner residuals.

- FIX (+s attenuation): MayGrant never constrained the GRANTED reshare bit, so an
  invite could confer +s the caller didn't hold (req.Reshare copied verbatim).
  MayGrant now takes grantReshare and rejects conferring +s you don't hold (owners
  unconstrained) — attenuation is total over role + target + reshare.
- FIX (invite revocation): invites were unrevocable 24h bearer capabilities — no
  way to kill a leaked/regretted one. Added meta.RevokeInvite (token+binding in one
  tx), POST /v1/invite/revoke (only a caller who could mint it may revoke), and
  'devbox invite revoke <token>'.
- Tests: TestMayGrant (+5 +s cases), TestInviteCannotGrantReshareCallerLacks,
  TestInviteRevoke. go test ./... -race clean (18 pkgs).
- docs/M8a-audit.md: findings, confirmed defenses, accepted residuals.

Confirmed-defended under attack: single-use redeem (atomic CAS), role bounding,
revoke-at-auth (revoked=0 in bearer+role lookups), cross-share binding, PoP.
2026-06-23 20:27:12 -05:00
060e147112 docs: fix plan.md public badge MIT -> AGPLv3 ⚖️
Some checks are pending
CI / vet-build-test (push) Waiting to run
2026-06-23 20:02:12 -05:00
0293ebd1b0 docs: P1 shipped + repo public; LICENSE = AGPLv3 (matches open-core moat) 📦🌍⚖️
Some checks are pending
CI / vet-build-test (push) Waiting to run
- LICENSE: replace the placeholder with canonical GNU AGPLv3 — the README's
  open-core model (hosted tier = commercial) needs copyleft, not MIT. Fixes the
  earlier commit that mislabeled it MIT.
- plan.md: P1 row -> ✅ SHIPPED with the real outcome (arm64 targets, release.sh,
  CI, hub image, public devbox-dist, public GitHub mirror, two-method secret scan).
  Next pointer -> P2 (M8a auth audit). Badges: release live + public.
- README: status -> 'v2 P1 shipped · public', + release badge, install badge notes
  'go install'.
2026-06-23 20:01:32 -05:00
03469958d3 chore: prep for public release — MIT license + github.com module path 🌍⚖️
Some checks are pending
CI / vet-build-test (push) Waiting to run
- LICENSE: MIT (enables the adoption push; public repo was all-rights-reserved).
- go.mod + all imports: git.shoemoney.ai/shoemoney/devbox -> github.com/shoemoney/devbox,
  so outsiders can 'go install github.com/shoemoney/devbox/cmd/devbox@latest'. Forgejo
  stays the self-hosted home; the registry (devbox-hub) + public dist (devbox-dist) are
  unchanged. vet + build + go test -race all green after the rename.
- README: document the go install path.

Security: full git-history scan (manual blob sweep + gitleaks, 84 commits) found
ZERO secrets — Forgejo token never committed, no keys/passwords/private keys.
2026-06-23 19:19:09 -05:00
3a0ec9740e feat(release): publish to public devbox-dist repo (no-token curl|sh) 🌐📦
Some checks are pending
CI / vet-build-test (push) Waiting to run
Private code stays private; the public shoemoney/devbox-dist repo carries only the
install scripts + release binaries as release assets, so a clean Pi/box can:
  curl -fsSL .../devbox-dist/releases/download/latest/install.sh | sh
with no auth. release.sh now targets devbox-dist (tags hang off its branch),
uploads install.sh/install.ps1 alongside the binaries, and rewrites SHA256SUMS to
the de-versioned asset names so shasum -c matches. install.sh/install.ps1/README
point at the new public URLs.
2026-06-23 18:12:09 -05:00
9b1165a49a feat(release): arm64/arm targets + Forgejo release one-shot + CI workflows 📦🤖
Some checks are pending
CI / vet-build-test (push) Waiting to run
- build-release.sh: add linux/arm64 (Raspberry Pi!) + linux/arm targets — the
  curl|sh install on a clean Pi needs a real arm64 asset to download.
- scripts/release.sh: one-shot local release. Cross-compiles, then creates/updates
  the Forgejo release and uploads de-versioned assets (devbox_<os>_<arch>) that
  install.sh fetches directly. No CI runner required.
- .forgejo + .github CI workflows: go vet + build + test -race on push/PR;
  on vX.Y.Z tag, build-release + publish. GitHub's runs on hosted runners today.
- docker-compose: pull the published hub image by default; --build for local source.
2026-06-23 13:31:54 -05:00
7f9eef7b3c docs: plan.md — PRD for what's next (releases+CI, M8a audit, dashboard depth) 🗺️ 2026-06-23 13:22:18 -05:00
dfc952301f docs: sync — M8 ✅ in roadmap table, v2/dashboard/install badges 📊⚡✅ 2026-06-23 13:18:25 -05:00
cb6ea8d3c2 docs: Install & Run section — curl|sh, keep-alive service, Docker NAS, FDA ⚡📦 2026-06-23 13:11:50 -05:00
94f7d3e782 fix(docker): chown /data so the non-root hub can write its DB 🐳🔑
The image runs as uid 10001; the VOLUME /data was root-owned so sqlite/blob
writes failed and the container exited on boot. Create + chown /data to the
devbox user before VOLUME/USER (a named volume inherits the image dir's
ownership). Verified on real arm64 docker (.13): builds, runs non-root, serves
/metrics + dashboard /api/state, 31.9MB. Also made install.sh's service setup
non-fatal (a failing systemctl --user / launchctl over headless SSH warns +
continues instead of aborting the whole install) — fleet-verified: systemd
user service enabled w/ Restart=always, NRestarts proved self-heal.
2026-06-23 13:10:44 -05:00
44e142fdf0 feat: cross-platform install scripts + hub Docker + macOS Full Disk Access 📦🐳🔐
Maximum-easy adoption:
- install.sh (macOS+Linux): curl|sh friendly. Detects OS/arch, resolves the
  binary (env → local dist/ → download → go-build fallback), lets you pick the
  install dir (smart default + prompt on a TTY), and optionally sets up a
  KEEP-ALIVE auto-restart service — launchd KeepAlive (mac) / systemd
  Restart=always user unit (linux). Flags + env for non-interactive use.
- install.ps1 (Windows): copy exe + user PATH + optional restart-on-failure
  Scheduled Task at logon.
- Hub Docker: Dockerfile (multi-stage, static CGO-free, alpine, healthcheck-
  ready) + docker-compose.yml (restart: unless-stopped = self-heal, named
  volume, dashboard-ready, optional autoheal profile for unhealthy-restart) +
  .dockerignore — drop-in for TrueNAS/Synology/unRAID.
- macOS Full Disk Access: 'devbox doctor' now tests the ACTUAL protected mount
  paths (~/Desktop, ~/Documents, ~/Downloads, iCloud) and flags any it can't
  read, with the exact System Settings fix + a deep link; install.sh points to
  it on mac. Windows install.ps1 notes Controlled Folder Access (off by default).
  (TCC.db probe was unreliable across macOS versions — testing the real mounts
  is honest + version-proof.) shellcheck-clean; 18 pkgs -race green; win+mac build.
2026-06-23 13:05:16 -05:00
9f662cd476 refactor: drop unused param in dashboard online() (ponytail) 🦥 2026-06-23 12:47:50 -05:00