From 7f9eef7b3c330ffcde066cf4af863e65c3a8b070 Mon Sep 17 00:00:00 2001 From: shoemoney Date: Tue, 23 Jun 2026 13:22:18 -0500 Subject: [PATCH] =?UTF-8?q?docs:=20plan.md=20=E2=80=94=20PRD=20for=20what'?= =?UTF-8?q?s=20next=20(releases+CI,=20M8a=20audit,=20dashboard=20depth)=20?= =?UTF-8?q?=F0=9F=97=BA=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plan.md | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 plan.md diff --git a/plan.md b/plan.md new file mode 100644 index 0000000..d43381b --- /dev/null +++ b/plan.md @@ -0,0 +1,120 @@ +
+ +# ๐Ÿ—บ๏ธ devbox โ€” What's Next (PRD) + +![status](https://img.shields.io/badge/status-%F0%9F%93%8B%20planning-blueviolet?style=for-the-badge) +![base](https://img.shields.io/badge/builds_on-v1%20hardened%20%C2%B7%20v2%20M8%20shipped-00ADD8?style=for-the-badge) + +
+ +> ๐Ÿ“‹ A short, honest backlog for what comes **after** the adoption push (installers + Docker + dashboard). +> Ordered by leverage, not by milestone number. Every item lists why it matters, its scope, and how we'll +> know it's done. M9โ€“M11 stay **demand-driven** โ€” captured, not committed. + +## ๐ŸŽฏ Where we are +v1 is complete + audited + hardened. **M8 (v2 foundations) shipped & fleet-verified**: schema migration runner, +per-`(share,id)` snapshots, daemon control socket + `pause`/`resume`, **M8a teams** (principals ยท roles ยท invites +with attenuation ยท members), and `restore` byte-safety. Plus an **embedded live dashboard**, **cross-platform +installers** with keep-alive services, a **hub Docker image** for NAS, and **macOS Full Disk Access** detection. + +```mermaid +flowchart LR + NOW["โœ… adoption tooling
installers ยท docker ยท dashboard"] --> P1["๐Ÿฅ‡ P1
Releases + CI"] + P1 --> P2["๐Ÿฅˆ P2
M8a auth audit"] + P2 --> P3["๐Ÿฅ‰ P3
dashboard depth"] + P3 -.demand-driven.-> LATER["๐Ÿ”ฎ M9โ€“M11
E2E ยท P2P ยท HA ยท TUI"] + style NOW fill:#1e5a2e,stroke:#51cf66,color:#fff + style P1 fill:#5a1e2e,stroke:#ff6b6b,color:#fff + style P2 fill:#5a4a1e,stroke:#ffd43b,color:#fff + style P3 fill:#1e3a5a,stroke:#4F9CF9,color:#fff + style LATER fill:#0d1117,stroke:#4F9CF9,color:#fff +``` + +--- + +## ๐Ÿฅ‡ P1 โ€” Releases + CI (close the adoption loop) + +**Why:** the `curl | sh` installer and the Docker image are built, but the installer's *primary* path โ€” +download a prebuilt binary โ€” **has nothing to download** (no published release), so it silently falls back to +`go build` / local `dist/`. A stranger can't adopt devbox without Go + the repo. This is the one gap between +"we built adoption tooling" and "someone can actually adopt it." CI also gives the whole v2 codebase the +**regression safety it currently lacks**. + +**Scope** +- [ ] `scripts/release.sh` โ€” tag โ†’ cross-build (reuse `build-release.sh`'s 8 targets + `SHA256SUMS`) โ†’ **upload to BOTH Forgejo and GitHub releases** via their APIs (Forgejo token at `~/.config/forgejo/token`; `gh` for GitHub). +- [ ] Asset names the installer already expects: `devbox__` / `devbox-hub__` (+ `.exe`) under a `latest` (or versioned) tag, so `install.sh` / `install.ps1` download cleanly. +- [ ] CI workflow (Forgejo Actions `.forgejo/workflows/` + mirror to GitHub Actions): `go vet` + `go build ./...` + `go test ./... -race` on push; `build-release` + draft release on tag. +- [ ] Publish the hub Docker image to the Forgejo container registry (`git.shoemoney.ai/shoemoney/devbox-hub:latest`) so compose can `image:` instead of `build:`. + +**Acceptance** +- โœ… On a **clean Pi with no Go**, `curl -fsSL โ€ฆ/install.sh | sh` installs a working `devbox` from a real release. +- โœ… `docker compose up -d` on the NAS pulls the published image (no local build). +- โœ… CI is green on `main` and blocks a red PR. + +**Gotcha to check first:** Forgejo Actions needs runners enabled. If they're not, ship `release.sh` as a +**local one-shot** (run by hand) and defer the on-tag automation. Don't block the release on CI infra. + +**Effort:** M ยท **Risk:** low (no product code changes). + +--- + +## ๐Ÿฅˆ P2 โ€” Adversarial audit of the M8a auth surface + +**Why:** M8a added real **privilege** code โ€” invite **attenuation** (`meta.MayGrant`), the push **write-gate**, +principal binding on join, token handling. It has unit + HTTP + fleet tests, but no dedicated *adversarial* pass. +This is the M7.5 treatment for v2's new attack surface, **before** anyone relies on it for multi-owner shares. + +**Scope (hunt for, with regression tests for each real finding)** +- [ ] **Invite replay / reuse** โ€” can a redeemed invite token be used twice? (`tokens.used` + the binding.) +- [ ] **Privilege escalation** โ€” any path where `MayGrant` is bypassed; self-invite to a higher role; granting `+s` you don't hold; touching a principal who outranks you. +- [ ] **TOCTOU** on the legacyโ†’explicit flip + self-seed (concurrent first grants; `publishMu` coverage). +- [ ] **Revoked-device bearer reuse** + whether revocation actually closes write access immediately. +- [ ] **Cross-share leakage** โ€” does a member grant on share A ever imply rights on share B? +- [ ] Join PoP edge cases under the new binding path. + +**Acceptance** +- โœ… Each confirmed finding has a failing-then-passing regression test; `-race` clean; fleet-verified where it matters. +- โœ… A short `docs/M8a-audit.md` recording findings + the residual single-owner-threat-model deferrals. + +**Effort:** M ยท **Risk:** medium (security-sensitive โ€” do it carefully, don't rush). + +--- + +## ๐Ÿฅ‰ P3 โ€” Dashboard depth (delight, not load-bearing) + +**Why:** the live dashboard wows already, but it only animates `join` + `push`. More flow types + a terminal +view would make it a genuinely complete ops surface. + +**Scope** +- [ ] Emit `pull` (head fetch / propagation), `gc` (sweep), and `conflict` flow events from the hub; animate them. +- [ ] A historical sparkline window persisted server-side (currently the frontend computes rates from the live stream only). +- [ ] *(Optional)* an **M11 TUI** over the daemon control socket (`devbox top`?) โ€” re-adds the `/events` SSE stream we trimmed, now with a real consumer (bubbletea). + +**Acceptance** +- โœ… A `gc` run and a multi-device `pull` both visibly animate; new event types fleet-verified on the SSE stream. + +**Effort:** Sโ€“M ยท **Risk:** low. + +--- + +## ๐Ÿ”ฎ Deferred โ€” demand-driven (per the v2 spec's own guard) + +Do **not** pre-build these โ€” there's no user who needs them yet, and the spec explicitly defers them: + +| Milestone | Trigger to build it | +|---|---| +| **M9 โ€” E2E (convergent encryption)** | a real **untrusted-hub** user appears (you self-host on your own NAS โ†’ you trust it) | +| **M9 โ€” S3/R2 + Litestream HA** | hub durability/DR becomes a felt need beyond NAS snapshots (slots behind the `blobstore.Store` seam) | +| **M9 โ€” read-side ACL gating** | a genuinely untrusted **multi-owner** share exists | +| **M10 โ€” LAN P2P chunk exchange** | the hub uplink actually hurts (today the hub is *on* the LAN) | +| **M10 โ€” conflict sidecar + diff3 resolver** | conflicts get frequent enough to want interactive 3-way merge | +| **M11 โ€” full TUI + power sanity** | on demand | + +--- + +
+ +**Recommendation:** start at **P1**. It finishes the adoption story you just set and hardens the build โ€” +highest leverage, lowest risk. ๐Ÿš€ + +