|
|
55175fa2ac
|
feat(M2): hub server + transport client + push engine + CLI 🛰️
- internal/hub: HTTP server (join/publish/have/blob/push/head/metrics), bearer auth,
blob hash-verify, hand-rolled Prometheus /metrics (no dep)
- internal/transport: device HTTP client for the full wire contract
- internal/syncer: device push engine (build manifest -> upload missing blobs ->
commit snapshot) + .devignore loader; in-process e2e test (join->publish->push)
- meta: idempotent AddSnapshot (content-addressed re-push advances head, no double
refcount) + busy_timeout for multi-process CLI access
- cmd/devbox-hub: serve/token/readonly/revoke; cmd/devbox: real join + publish/push
- config: persist bearer + device id
Verified end-to-end with real binaries: secret blocked, node_modules ignored,
re-publish dedups to 0 uploads.
|
2026-06-22 23:40:18 -05:00 |
|
|
|
3884f732b5
|
feat(M2): SQLite hub metadata store 🗄️
- internal/hub/meta: pure-Go modernc.org/sqlite (no CGO -> trivial cross-compile)
- schema: devices, tokens, shares, access(writable bit), snapshots, chunks(refcount)
- AddSnapshot in a tx: insert + bump distinct-chunk refcounts + advance share head
- single access knob = per-(device,share) writable; tokens redeem-once + expiry
- tests: device lifecycle, token redeem-once/expiry, writable default+override,
shares/snapshots/refcounts (dedup within + across snapshots)
|
2026-06-22 23:24:55 -05:00 |
|