devbox/docs/reliability-fixes.md

3.6 KiB

🛠️ 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 ./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 remains historical evidence.

🔎 Source and regression references

📦 Source fixes today; published release status stays explicit.