diff --git a/README.md b/README.md index e30c7fd..1a7a170 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ > | M7 โ€” Hardening: `devbox doctor`, reconnect/backoff, rescan fallback, name-clash, release builds | โœ… done โ€” **doctor/stop/hooks + share-name guard + dead-watcher rescan fleet-verified** ๐Ÿ›ก๏ธ | > | M7.5 โ€” Adversarial security/data-loss audit + fixes (path-traversal, blob integrity, never-clobber, safe GC) | โœ… done โ€” **26 findings, all promise-breakers fixed, race-clean** ๐Ÿ” | > | M7.6 โ€” Hardening: fsync durability ยท DoS caps + timeouts ยท pidfile PID-reuse guard ยท join proof-of-possession | โœ… done โ€” fleet-verified on arm64 ๐Ÿ›ก๏ธ | -> | ๐Ÿ”ฎ **M8 โ€” v2 Foundations**: migration runner ยท per-`(share,id)` snapshots ยท control socket + `pause`/`resume` ยท principals/roles + write enforcement | ๐Ÿ”จ in progress โ€” **migration runner, control socket & M8a role enforcement shipped; both migrations verified on a copy of the real hub DB** ๐Ÿ—๏ธ | +> | ๐Ÿ”ฎ **M8 โ€” v2 Foundations**: migration runner ยท per-`(share,id)` snapshots ยท control socket + `pause`/`resume` ยท **M8a teams** (principals/roles/invites + write enforcement) | ๐Ÿ”จ in progress โ€” **M8a complete & cross-machine fleet-verified** (Pi `.13` owner invited an editor, Pi `.15` redeemed & pushed); 3 migrations verified on a copy of the real hub DB ๐Ÿ—๏ธ๐Ÿ‘ฅ | --- @@ -329,6 +329,9 @@ container automatically. ๐Ÿช„ | `devbox hook edit ` | ๐Ÿช Scaffold/open a hook in `$EDITOR`; `hook list ` shows installed | | `devbox doctor` | ๐Ÿฉบ Diagnose watcher limits, perms, bash, hub connectivity + bearer | | `devbox pause` / `resume` | โธ๏ธโ–ถ๏ธ Suspend/resume the running daemon's syncing via its control socket (M8) | +| `devbox invite ` | โœ‰๏ธ Mint an invite token granting a role (`--reshare` for `+s`); attenuation-enforced (M8a) | +| `devbox members ` | ๐Ÿ‘ฅ Show who can access a share, or "legacy share" (M8a) | +| `devbox-hub member set/rm/list` ยท `principal` | ๐Ÿ›ก๏ธ Hub-side role admin (M8a) | | `devbox peers` | ๐ŸŒ *Planned โ€” needs a hub peers endpoint (M10)* | @@ -534,7 +537,7 @@ flowchart LR | โœ… | **M7 โ€” Hardening** ๐Ÿ›ก๏ธ | `devbox doctor`, `stop`/pidfile, `hook edit/list`, SSE backoff+jitter, **60s rescan fallback** (survives dead/limited inotify watchers โ€” PRD risk #1), share-name guard, release builds โ€” fleet-verified | | โœ… | **M7.5 โ€” Audit hardening** ๐Ÿ” | adversarial security/data-loss audit + fixes: blob-hash **path-traversal** blocked, **download blob-integrity** check, manifest-path **containment**, secret-guard **case-insensitive** + more patterns, **never-clobber** ignored/guarded files, **GC made safe** vs cross-share refcount undercount โ€” all with regression tests, race-clean, fleet-verified | | โœ… | **M7.6 โ€” Hardening complete** ๐Ÿ›ก๏ธ | ๐Ÿ’ฝ **fsync durability** on atomic writes (power-loss safe), ๐Ÿšช **request size caps + server timeouts** (DoS), ๐Ÿ†” **pidfile PID-reuse guard** (start-time token), ๐Ÿชช **join proof-of-possession** (ed25519 signature, token not burned on a bad request) โ€” fanned out to parallel worktree agents, regression-tested, race-clean, fleet-verified | -| ๐Ÿ”จ | **M8 โ€” v2 Foundations** ๐Ÿ—๏ธ | ๐Ÿ”‘ **schema migration runner** (`PRAGMA user_version`, transactional, `VACUUM INTO` backup, refuses a newer DB) ยท ๐Ÿ”ข **per-`(share,id)` snapshots** (fixes the cross-share refcount undercount; GC + head-backfill reworked) ยท ๐ŸŽ›๏ธ **daemon control socket** (Unix socket, HTTP/1.1, `0600`) wiring `devbox pause`/`resume` + live-socket-aware `status` ยท ๐Ÿ‘ฅ **M8a: principals + per-share roles + write enforcement** (`devbox-hub member`/`principal`; legacy shares = v1, first grant flips to deny-by-default; roleโ‰ฅeditor AND the writable clamp). **Both migrations verified on a copy of the real `.10` hub DB** (counts preserved, 3 legacy heads repaired, chains 0โ†’1โ†’2). ๐Ÿ‘€ **read side: `GET /v1/members` + `devbox members `**. **Next in M8:** device-facing invites with privilege attenuation (M8a cont.), conflict sidecar + `restore`/`deploy` conflict-copy (M8-3) | +| ๐Ÿ”จ | **M8 โ€” v2 Foundations** ๐Ÿ—๏ธ | ๐Ÿ”‘ **schema migration runner** (`PRAGMA user_version`, transactional, `VACUUM INTO` backup, refuses a newer DB) ยท ๐Ÿ”ข **per-`(share,id)` snapshots** (fixes the cross-share refcount undercount; GC + head-backfill reworked) ยท ๐ŸŽ›๏ธ **daemon control socket** (Unix socket, HTTP/1.1, `0600`) wiring `devbox pause`/`resume` + live-socket-aware `status` ยท ๐Ÿ‘ฅ **M8a: principals + per-share roles + write enforcement** (`devbox-hub member`/`principal`; legacy shares = v1, first grant flips to deny-by-default; roleโ‰ฅeditor AND the writable clamp). **Both migrations verified on a copy of the real `.10` hub DB** (counts preserved, 3 legacy heads repaired, chains 0โ†’1โ†’2). ๐Ÿ‘€ read side (`GET /v1/members` + `devbox members`) ยท โœ‰๏ธ **device-facing invites** (`POST /v1/invite` + `devbox invite`, privilege **attenuation** server-enforced via pure `meta.MayGrant`, self-seed on the legacyโ†’explicit flip) โ€” **cross-machine fleet-verified on arm64 Pis**. **Next in M8:** conflict sidecar + `restore`/`deploy` conflict-copy (M8-3, deferred โ€” needs base-awareness); read-side ACL gating is M9 |
๐Ÿ”ฎ still ahead in M8 / genuinely v2 diff --git a/docs/V2-SPEC.md b/docs/V2-SPEC.md index 99906c2..60c9a44 100644 --- a/docs/V2-SPEC.md +++ b/docs/V2-SPEC.md @@ -141,10 +141,15 @@ The highest-leverage theme โ€” and the **membership layer E2E + P2P both need un > owner); the first `devbox-hub member set` flips it to **explicit/deny-by-default**. The push gate now > enforces `EffectiveRole โ‰ฅ editor AND the writable clamp` (legacy shares reduce to the v1 writable bit > exactly). Admin populate path: `devbox-hub member set/rm/list` + `principal`. Verified chaining 0โ†’1โ†’2 on -> a copy of the real hub DB. โœ… Plus the read side: `GET /v1/members` + a `devbox members ` client -> command. **Still ahead in M8a:** the device-facing **invite** flow (bind `(principal, share, role)` via the -> existing `/v1/join` PoP, with privilege *attenuation* โ€” a member can only grant โ‰ค their own role, and only -> with `+s`) + `POST /v1/members/role`. **Read-side gating stays M9.** +> a copy of the real hub DB. โœ… Read side: `GET /v1/members` + `devbox members`. โœ… **Device-facing invites**: +> `POST /v1/invite` + `devbox invite [--reshare]`; the invitee redeems through the +> existing `/v1/join` PoP and lands as the bound principal with the bound role. **Privilege attenuation** is +> enforced server-side via the pure, unit-tested `meta.MayGrant` (never grant above your own role, never touch +> a superior, viewers can't grant, editors need `+s`); minting an invite on a legacy share **self-seeds the +> inviter as owner** before the explicit flip so they never lock themselves out. **Cross-machine fleet-verified +> on arm64 Pis** (owner on `.13` invited an editor, `.15` redeemed and pushed). **M8a write-side is complete.** +> Still optional later: `POST /v1/members/role` (re-grade in place โ€” `devbox-hub member set` already covers it +> admin-side). **Read-side gating stays M9.** - **Principals.** Insert a *principal* (person/account/service) above the device: `devices.principal_id`. The **device stays the auth + revocation unit** (its ed25519 key never @@ -279,7 +284,7 @@ flowchart LR | Milestone | Ships | Gated by | |---|---|---| -| ๐Ÿ—๏ธ **M8 โ€” Foundations** ๐Ÿ”จ | โœ… migration runner (`PRAGMA user_version`) ยท โœ… per-`(share,id)` snapshots + reworked GC (refcount undercount fixed) ยท โœ… daemon **control socket** + real `pause`/`resume` ยท โœ… **M8a: principals/roles + write enforcement** (admin CLI; invites/`GET /members` still ahead) ยท โฌœ conflict sidecar + `Entry.Binary` + pin + conflict-copy on `restore`/`deploy` (M8-3) ยท โฌœ `snapshot_chunks` edge table (deferred to M9 โ€” no consumer yet) โ€” **both migrations verified on a copy of the real hub DB, chaining 0โ†’1โ†’2** | โ€” | +| ๐Ÿ—๏ธ **M8 โ€” Foundations** ๐Ÿ”จ | โœ… migration runner (`PRAGMA user_version`) ยท โœ… per-`(share,id)` snapshots + reworked GC (refcount undercount fixed) ยท โœ… daemon **control socket** + real `pause`/`resume` ยท โœ… **M8a teams COMPLETE**: principals/roles + write enforcement + members read + **device-facing invites with attenuation** (admin CLI + `devbox invite`/`members`) โ€” **cross-machine fleet-verified on arm64 Pis** ยท โฌœ conflict sidecar + `Entry.Binary` + pin + conflict-copy on `restore`/`deploy` (M8-3) ยท โฌœ `snapshot_chunks` edge table (deferred to M9 โ€” no consumer yet) โ€” **3 migrations verified on a copy of the real hub DB, chaining 0โ†’1โ†’2โ†’3** | โ€” | | ๐Ÿ” **M9 โ€” Trust & durability** | **read-side ACL** (deny-by-default) ยท **E2E** per-share keyed-convergent encryption ยท **S3/R2** blob backend + **Litestream** HA | M8 (membership, migration runner, refcounts) | | ๐Ÿค **M10 โ€” Cluster & merge** | **LAN peer chunk-exchange** (P2P, hub-authoritative) ยท **interactive conflict resolver** + **diff3 3-way text merge** | M8 sidecar ยท M9 convergent-encryption co-design | | โœจ **M11 โ€” Polish** | **full TUI** dashboard ยท **power** sanity (battery/metered/windows) ยท groups ยท packfile batching | M8 control socket |