Skip to content

Mitts 0.3.7

Choose a tag to compare

@alex09x alex09x released this 27 Oct 09:37
· 398 commits to main since this release

Mitts 0.3.7 follows an independent review of the 0.3.6 benchmark series: every finding that was real is fixed here, the benchmark harness measures what its field names say, and one macOS-only loss of cache sharing is gone.

Correctness (e43d598)

  • A poisoned store object is no longer resealed. With store hardlinks (the default where reflink is unavailable) a workspace file shares the store object's inode; chmod u+w plus a write changed the object, and the trusting restore relinked and resealed it. A restore now re-hashes any object that carries a write bit, removes it when the hash mismatches, and reseals it when it matches. The ordinary read-only path still reads no bytes.

macOS (2a55e39)

  • Linked binaries are shared across checkouts. ld64 records every linked object's absolute path in the output's N_OSO stabs, which --remap-path-prefix does not reach; the dependency rlibs restored under a checkout's target/ put the checkout path into every binary, so a second clone relinked it (ripgrep's rg: 2 s on macOS against 20 ms on Linux). Mitts passes -oso_prefix with the workspace root, the stabs become target/mitts/debug/deps/…, and a second checkout restores the binary. Start a debugger in the workspace root for it to find the object files.
  • The config start directory is chosen on real paths, so a project under /var (reported as /private/var) no longer skips a member's .cargo/config.toml (d266166).

Performance (e43d598)

  • mitts explain now uses the toolchain probe cache like the builder; it used to spawn rustup and rustc on every call.

Knobs

  • MITTS_FAST_LOCK=0|1 overrides the fast build lock's default of "on only for the default cache root", so a benchmark with an explicit --cache-dir can measure it.

Benchmark harness (e43d598, 392e736, 2a55e39)

  • The T4 copy ablation sets MITTS_STORE_HARDLINKS=0, so the copy arm copies bytes; in series up to 0.3.6 it compared reflink against a read-only store hardlink.
  • T2 gains s2_fast_lock_noop_ms (fast-lock hits on mitts build, with a hit counter) next to s2_fast_noop_ms, which is the plan + action-cache no-op.
  • T0 warms the probe cache before timing and reports the metrics of a warm run.
  • Disk-usage deltas are sampled after the filesystem settles; the known limits of du, device write counters and df deltas are written down in docs/benchmarks-execution-plan.md.

Checked

Full isolated suite green on Linux and macOS, per-target store isolation probe clean, clippy clean. Both findings the review got wrong (a cache purge that supposedly missed directories, an invariant supposedly hardcoded) were checked against the code and rejected.

Install or update:

cargo install mitts --version 0.3.7 --locked

Full history: v0.3.6...v0.3.7