From 45fb7a365a52aab98f12204329adfac885a6bb8f Mon Sep 17 00:00:00 2001 From: shoemoney Date: Sat, 28 Nov 2026 00:22:46 -0600 Subject: [PATCH] =?UTF-8?q?docs:=20clarify=20unreleased=20reliability=20fi?= =?UTF-8?q?xes=20and=20current=20roadmap=20=F0=9F=9B=A0=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 +++++++++ docs/reliability-fixes.md | 56 +++++++++++++++++++++++++++++++++++++++ plan.md | 20 +++++++++++--- 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 docs/reliability-fixes.md diff --git a/README.md b/README.md index 1c82608..fe1230e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,11 @@ conflict copies, snapshot history, and structured tools for your AI coding agent --- +> ๐Ÿ› ๏ธ **Source-only reliability fixes (unreleased):** push-conflict retries preserve +> peer edits, hub push acceptance is atomic, and the shell installer preserves literal +> destination paths. Published binaries remain **v2.3.0**. See the +> [fixes and verification scope](docs/reliability-fixes.md). + ## ๐Ÿ”’ Built-in Tailscale, one hub binary Run your own sync hub on a NAS, Pi, server, or spare computer. **The hub can join @@ -158,6 +163,13 @@ supports amd64 and arm64; download the Linux arm binaries directly for 32-bit Pi The optional `devbox-mcpd-plugin` has matching platform binaries. Use `--release-url` / `DEVBOX_RELEASE_URL` to select a versioned release. +๐Ÿ› ๏ธ **Unreleased shell installer behavior:** in the source checkout, `--bin-dir DIR` +or `DEVBOX_BIN_DIR` treats the destination literally, expanding only a leading +`~/` to the home directory. Quote the value so your calling shell preserves spaces, +`$` signs, and backticks; the installer does not evaluate them. For example: +`sh ./install.sh --bin-dir '~/tools with spaces/bin' --no-service`. +This fix is not yet in the release-hosted installer linked above. + ## ๐Ÿš€ Tailscale quick start ### 1. Start your private hub diff --git a/docs/reliability-fixes.md b/docs/reliability-fixes.md new file mode 100644 index 0000000..ef0e493 --- /dev/null +++ b/docs/reliability-fixes.md @@ -0,0 +1,56 @@ +# ๐Ÿ› ๏ธ Reliability fixes โ€” unreleased source + +> ๐Ÿ“Œ **2026-11-28:** these three accepted fixes are integrated locally in source. +> Published binaries remain **v2.3.0**. This cycle has not released or deployed +> them, and release-hosted installers do not yet contain the path fix. + +## ๐Ÿ”ง What changed + +| Fix | Result | +|---|---| +| ๐Ÿ”„ Sync retry base | A rejected push retains the last locally applied base. The next pull merges the advanced hub head, preserving disjoint peer changes and same-path edits through conflict copies. | +| ๐Ÿ”’ Atomic hub acceptance | `meta.AcceptSnapshot` takes SQLite's write lock before reading the head. Parent validation, snapshot metadata, chunk refcounts, and head update share one transaction; a stale push is rejected with the winning head. | +| ๐Ÿ“‚ Literal installer destination | The shell installer no longer evaluates `--bin-dir` / `DEVBOX_BIN_DIR`. Only a leading `~/` expands to the home directory; spaces, quotes, dollar signs, backticks, and shell metacharacters otherwise stay literal. Quote values in the calling shell. | + +Replaying the current snapshot does not double-count chunk references or announce +a head advance. Reverting to an existing snapshot requires the current parent. +`DeleteSnapshot` rechecks head protection when deleting a candidate, preserving +metadata and refcounts if the candidate became the head in the meantime. +This metadata protection does not establish safe concurrent live blob sweeping. + +For the installer behavior, use the script from the source checkout: + +```sh +sh ./install.sh --bin-dir '~/tools with spaces/bin' --no-service +``` + +The same literal-path rule applies to `DEVBOX_BIN_DIR`; it does not expand `$HOME` +written inside the value or interpret command substitutions. These changes apply +to `install.sh`; this cycle makes no PowerShell runtime-verification claim. + +## ๐Ÿงช Verification scope + +Independent scoped verification and review accepted all three fixes. Each new +behavior regression failed against the original v2.3.0 source (`36690ee`) and +passed with its fix. Counts below describe those scoped checks, not a full-suite +total. + +| Scope | Accepted evidence | +|---|---| +| ๐Ÿ”„ Syncer | Race checks: 23 tests in one package; deterministic advanced-head retry covers disjoint additions, same-path edits, conflict-copy propagation, hooks, and convergence. | +| ๐Ÿ”’ Hub | Race checks: 50 tests across four packages, including subtests; concurrent stale-parent rejection, replay/revert, candidate head protection, pruned-snapshot restoration, and independent database connections. | +| ๐Ÿ“‚ Shell installer | Two top-level tests: ten literal-path subcases across flag/env inputs, plus existing optional-plugin cases. | + +๐Ÿ”จ **Combined validation is pending:** full vet/build/race, nine release fixtures, +and the two installer tests are running on dev3. No combined pass or full-suite +count is claimed here. This cycle does not establish production-tailnet behavior, +ARM runtime verification, or safe concurrent live blob GC. Earlier dated ARM +verification in [the project plan](../plan.md) remains historical evidence. + +## ๐Ÿ”Ž Source and regression references + +- ๐Ÿ”„ [Retry-base handling](../internal/syncer/pull.go) and [regression](../internal/syncer/conflict_retry_test.go). +- ๐Ÿ”’ [Hub acceptance](../internal/hub/server.go), [metadata transactions](../internal/hub/meta/meta.go), [HTTP race regression](../internal/hub/atomic_push_test.go), and [metadata regressions](../internal/hub/meta/atomic_push_test.go). +- ๐Ÿ“‚ [Shell installer](../install.sh) and [installer tests](../scripts/test-install.py). + +๐Ÿ“ฆ Source fixes today; published release status stays explicit. diff --git a/plan.md b/plan.md index 4791060..e41c126 100644 --- a/plan.md +++ b/plan.md @@ -14,6 +14,18 @@ > 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 @@ -48,10 +60,10 @@ download a prebuilt binary โ€” **had nothing to download** (no published release the v2 codebase the **regression safety** it lacked. **Shipped** -- [x] `scripts/release.sh` โ€” one-shot: cross-build (now **6 targets incl. `linux/arm64` + `linux/arm`** for Pi) โ†’ create/update the release โ†’ upload **de-versioned** assets (`devbox__`, `+.exe`) the installer downloads directly, plus a de-versioned `SHA256SUMS` so `shasum -c` matches. Idempotent. +- [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] **Deviation (approved):** the source repo stays private, so a public **`shoemoney/devbox-dist`** repo carries the installers + binaries as release assets โ†’ `curl|sh` works **with no token**. Separately, 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. +- [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`. @@ -121,7 +133,7 @@ Do **not** pre-build these โ€” there's no user who needs them yet, and the spec
-**Recommendation:** start at **P1**. It finishes the adoption story you just set and hardens the build โ€” -highest leverage, lowest risk. ๐Ÿš€ +**Next:** complete the combined validation of the unreleased reliability fixes above. +P1โ€“P3 are shipped; M9โ€“M11 remain demand-driven. ๐Ÿ› ๏ธ