diff --git a/README.md b/README.md index efb8db5..c655c3e 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**: schema migration runner ยท per-`(share,id)` snapshots ยท daemon control socket + `pause`/`resume` | ๐Ÿ”จ in progress โ€” **migration runner + control socket shipped; verified on a copy of the real hub DB** ๐Ÿ—๏ธ | +> | ๐Ÿ”ฎ **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** ๐Ÿ—๏ธ | --- @@ -534,7 +534,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) โ€” **verified on a copy of the real `.10` hub DB** (13 dev / 12 share / 16 chunk preserved, 3 legacy heads repaired) ยท ๐ŸŽ›๏ธ **daemon control socket** (`internal/control`, Unix socket, HTTP/1.1, `0600`) wiring `devbox pause`/`resume` + live-socket-aware `status`. **Next in M8:** conflict sidecar + `restore`/`deploy` conflict-copy (M8-3), principals/roles/invites (M8a) | +| ๐Ÿ”จ | **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). **Next in M8:** conflict sidecar + `restore`/`deploy` conflict-copy (M8-3), device-facing invites + `GET /members` (M8a cont.) |
๐Ÿ”ฎ still ahead in M8 / genuinely v2 diff --git a/docs/V2-SPEC.md b/docs/V2-SPEC.md index 3f3ec84..518808d 100644 --- a/docs/V2-SPEC.md +++ b/docs/V2-SPEC.md @@ -135,6 +135,16 @@ because `PRAGMA user_version=1` is the *last* statement (a crash rolls back to 0 The highest-leverage theme โ€” and the **membership layer E2E + P2P both need underneath them.** +> โœ… **Shipped (M8a write-side):** migration #2 adds `principals` + `devices.principal_id` (every v1 +> device backfills to one synthetic `owner` โ†’ byte-identical to v1), `members(share, principal_id, role, +> can_reshare)`, and `shares.acl_mode`. A share with zero grants is **legacy** (every device an implicit +> 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. **Still ahead in M8a:** the device-facing **invite** flow (bind `(principal, +> share, role)` via the existing `/v1/join` PoP) + `GET /v1/members` / `POST /v1/members/role` endpoints + +> `+s` reshare delegation. **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 leaves the box); the **principal becomes the authorization subject**. (Tailscale's identityโ†”node @@ -268,7 +278,7 @@ flowchart LR | Milestone | Ships | Gated by | |---|---|---| -| ๐Ÿ—๏ธ **M8 โ€” Foundations** ๐Ÿ”จ | โœ… migration runner (`PRAGMA user_version`) ยท โœ… per-`(share,id)` snapshots + reworked GC (refcount undercount fixed; verified on a copy of the real hub DB) ยท โœ… daemon **control socket** + real `pause`/`resume` ยท โฌœ principals/roles/invites + **write** enforcement (M8a) ยท โฌœ conflict sidecar + `Entry.Binary` + pin + conflict-copy on `restore`/`deploy` (M8-3) ยท โฌœ `snapshot_chunks` edge table (deferred to M9 โ€” no consumer yet) | โ€” | +| ๐Ÿ—๏ธ **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** | โ€” | | ๐Ÿ” **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 |