# ๐บ๏ธ devbox โ What's Next (PRD)




> ๐ 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
> ๐ ๏ธ **Current status โ 2026-11-28:** published binaries remain **v2.3.0**.
> Forgejo and GitHub source repositories are public. Three accepted reliability
> fixes are integrated locally in source and **unreleased**; see
> [behavior and scoped regression evidence](docs/reliability-fixes.md).
> ๐จ **Next:** finish combined validation of the integrated fixes. Full vet/build/race,
> nine release fixtures, and the two installer tests are running on dev3; results
> are pending. No release or deployment has been performed for this cycle.
>
> ๐ The shipped milestones and fleet checks below are historical records; they
> do not establish fleet verification for these new fixes.
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.
**๐ P1 shipped (2026-06-23):** real published release (`latest`, 6 OS/arch incl. **linux/arm64** for Pi),
a one-shot `scripts/release.sh`, CI on Forgejo + GitHub Actions (vet ยท build ยท `-race`), the hub image in the
Forgejo registry, and a public **`shoemoney/devbox-dist`** repo so `curl|sh` works **with no token**. The
**GitHub repo is now public** (AGPLv3, module path `github.com/shoemoney/devbox` โ `go install` works) after a
clean two-scanner git-history secret sweep. Verified end-to-end on clean no-Go amd64 **and arm64** boxes.
```mermaid
flowchart LR
NOW["โ
adoption tooling
installers ยท docker ยท dashboard"] --> P1["โ
P1
Releases + CI
+ public repo"]
P1 --> P2["โ
P2
M8a auth audit
2 fixes + tests"]
P2 --> P3["โ
P3
dashboard depth
pullยทgcยทconflict + history"]
P3 -.demand-driven.-> LATER["๐ฎ M9โM11
E2E ยท P2P ยท HA ยท TUI"]
style NOW fill:#1e5a2e,stroke:#51cf66,color:#fff
style P1 fill:#1e5a2e,stroke:#51cf66,color:#fff
style P2 fill:#1e5a2e,stroke:#51cf66,color:#fff
style P3 fill:#1e5a2e,stroke:#51cf66,color:#fff
style LATER fill:#0d1117,stroke:#4F9CF9,color:#fff
```
---
## โ
P1 โ Releases + CI (close the adoption loop) โ **SHIPPED 2026-06-23**
**Why:** the `curl | sh` installer and Docker image were built, but the installer's *primary* path โ
download a prebuilt binary โ **had nothing to download** (no published release), so it silently fell back to
`go build` / local `dist/`. A stranger couldn't adopt devbox without Go + the repo. P1 closed that gap and gave
the v2 codebase the **regression safety** it lacked.
**Shipped**
- [x] `scripts/release.sh` โ cross-build (**6 targets incl. `linux/arm64` + `linux/arm`** for Pi) โ upload **de-versioned** assets (`devbox__`, `+.exe`) plus `SHA256SUMS`. **Current behavior:** versioned releases are immutable (an existing version is rejected); moving `latest` is replaced only after all replacement assets upload. v2.3.0 packaging includes 18 binaries, both installers, and the checksum manifest.
- [x] CI on **Forgejo Actions** (`.forgejo/workflows/`) **+ GitHub Actions** mirror: `go vet` ยท `go build ./...` ยท `go test ./... -race` on push/PR; release-on-tag workflow ready. **GitHub CI is green on every push** (Forgejo waits on a self-hosted runner โ per the gotcha, the local `release.sh` is the real path).
- [x] Hub image published to the Forgejo registry: `git.shoemoney.ai/shoemoney/devbox-hub:latest`; compose now `image:` by default (`--build` for local source).
- [x] **Original distribution deviation (approved):** ~~the source repo stays private~~ โ superseded: both Forgejo and GitHub source repositories are now public, as is **`shoemoney/devbox-dist`**, which carries installers + binaries โ `curl|sh` works **with no token**. The **GitHub mirror was made public** (AGPLv3 โ matching the open-core moat, module path `github.com/shoemoney/devbox` so `go install โฆ/cmd/devbox@latest` works) after a clean two-method git-history secret scan.
**Acceptance โ all met โ
**
- โ
Clean **no-Go** box, `curl -fsSL โฆ/install.sh | sh` installs a working `devbox` from the real release โ verified end-to-end on **amd64** and **fleet-verified on a real clean no-Go arm64 Raspberry Pi** (`192.168.1.13`): anon `curl|sh` โ `devbox 0346995`, `devbox doctor` reports `linux/arm64`.
- โ
`docker compose up -d` pulls the published image (no local build) โ verified on the NAS (throwaway stack, production hub untouched).
- โ
CI green on `main` (GitHub Actions) and gates PRs.
**Effort:** M ยท **Risk:** low โ landed without product-code changes (module-path rename only).
---
## ๐ฅ 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.
> ## โ
SHIPPED 2026-06-23 โ 13-agent adversarial pass (6 finders + skeptic verify), **2 real findings fixed**, rest documented as single-owner residuals. Full report: [`docs/M8a-audit.md`](docs/M8a-audit.md).
**Findings (hunted with regression tests for each real one)**
- [x] **Invite replay / reuse** โ โ
defended: `RedeemToken` is an atomic CAS; sequential + concurrent double-redeem both fail; PoP checked before redeem.
- [x] **Privilege escalation** โ ๐ ๏ธ **FIXED**: `MayGrant` never attenuated the granted `+s` bit (`req.Reshare` copied verbatim) โ now `MayGrant(โฆ, grantReshare)` rejects conferring `+s` you don't hold (owners unconstrained). Role bounding / no-demote-up / server-derived caller role were already solid.
- [x] **TOCTOU** legacyโexplicit flip โ โ
defended by `publishMu`; the push-gate micro-race is an accepted low-risk residual.
- [x] **Revoked-device bearer reuse** โ โ
defended: `revoked=0` filtered in both `DeviceByBearer` and `EffectiveMember` (denied on the next request).
- [x] **Cross-share leakage** โ โ
defended: redemption binds share/principal/role from the server-side binding, never the request.
- [x] **Join PoP** โ โ
defended; surfaced that invites were **unrevocable bearer capabilities** โ ๐ ๏ธ **FIXED**: added `meta.RevokeInvite` + `POST /v1/invite/revoke` + `devbox invite revoke `.
**Acceptance โ met โ
**
- โ
Both fixes have failing-then-passing regression tests (`TestInviteCannotGrantReshareCallerLacks`, `TestInviteRevoke`, +5 `TestMayGrant` cases); `go test ./... -race` clean (18 pkgs). The hub binary carrying these changes ran clean on the real arm64 Pi (via the P3 fleet-verify); the auth logic is platform-independent, so HTTP+race is the load-bearing verification.
- โ
[`docs/M8a-audit.md`](docs/M8a-audit.md) records findings, confirmed defenses, and the residual single-owner-threat-model deferrals.
**Effort:** M ยท **Risk:** medium (security-sensitive โ done carefully, not rushed).
---
## โ
P3 โ Dashboard depth โ **SHIPPED 2026-06-23**
**Why:** the live dashboard wowed already, but it only animated `join` + `push`. P3 made it a genuinely
complete ops surface.
**Shipped**
- [x] Hub emits `pull` (head fetch / propagation, `handleHead`), `conflict` (stale-parent push, `handlePush`), and `gc` (in-process sweep) flow events. GC runs in-process via opt-in `serve --gc-every ` (default off โ auto-deleting blobs on a timer is opt-in) so the hub self-maintains *and* each sweep animates.
- [x] **Server-side history window**: per-minute activity buckets (push/pull/conflict/gc + bytes, last 60 min) in `/api/state` โ the sparkline now survives a page reload (was live-stream-only). Recorded under the `Emit` lock; race-clean.
- [x] Frontend (`index.html`, one file, no new deps): `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.
- [~] *(Optional M11 TUI)* โ skipped, demand-driven (no consumer yet).
**Acceptance โ met โ
**
- โ
`gc`, `pull`, `conflict` (plus `join`/`push`) all visibly animate; **all 5 fleet-verified on the live SSE stream on a real arm64 Pi** (`192.168.1.13`) by `scripts/dashboard-fleet-verify.sh` (also a `LOCAL=1` mode). Frontend rendered headless with **0 console errors**; history sparkline + gc toast + all event feeds present. Tests: `TestHistoryRing`; `go test ./... -race` clean.
**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 |
---
**Next:** complete the combined validation of the unreleased reliability fixes above.
P1โP3 are shipped; M9โM11 remain demand-driven. ๐ ๏ธ