devbox/internal
shoemoney f1a6ac226f fix(syncer): stop pull from clobbering an edit made during the pull window
manifest.Build snapshots `ours` once before Pull applies any writes. A local
edit landing after that snapshot but before writeEntry looked unchanged
(oursCh false) and got overwritten with the hub version verbatim, with no
conflict copy — the edit's bytes ended up in no file and no snapshot.

Re-stat/re-hash the on-disk file right before a hub-only write would apply
and compare it against the entry manifest.Build captured. A mismatch routes
through the existing preserve-as-conflict path instead of clobbering. Only
checked when hub is about to write over a path `ours` already knew about —
a pure hub-only add has nothing on disk yet to race with.

This narrows the window, it doesn't close it: a rename at pull.go:424-451
still isn't atomic with this check. A real fix needs a filesystem-level
lock or lease around the whole pull, tracked separately.

Includes the untracked repro (zz_repro_stale_ours_test.go) that found this.
2026-08-05 02:35:12 -05:00
..
chunk feat(device): --json output, streaming chunker, pause --for, per-mount exclude, rescan knob ✨ 2026-06-30 12:29:02 -05:00
config fix: CLI honors secrets.extra_patterns; SaveState uses a unique temp file 2026-06-30 19:27:22 -05:00
control round4-client: surface last sync error per mount in status 2026-06-30 14:23:42 -05:00
daemon round9-client: log swallowed hook failures, doctor free-disk check, validate devbox ignore pattern 🩺⚠️🙈 2026-06-30 18:07:53 -05:00
hooks refactor(M7): cmp.Or for editor env, share hooks.Executable (ponytail) ♻️ 2026-06-23 01:32:22 -05:00
hub round9-hub: add device id to --access-log lines (and make the auth ctx comment true) 2026-06-30 18:07:53 -05:00
identity feat(M2): wire protocol foundation 🔌 2026-06-22 23:30:01 -05:00
ignore feat(cli): doctor --json, conflicts --rm, status sync-age, opt-in default ignores 🧰🙈 2026-06-30 13:26:24 -05:00
manifest fix(syncer): stop pull from clobbering an edit made during the pull window 2026-08-05 02:35:12 -05:00
secret chore: prep for public release — MIT license + github.com module path 🌍⚖️ 2026-06-23 19:19:09 -05:00
syncer fix(syncer): stop pull from clobbering an edit made during the pull window 2026-08-05 02:35:12 -05:00
transport fix(transport): SSE Events reuses c.hc so a hung connect can't wedge the daemon 🔌 2026-06-30 17:27:00 -05:00
watch fix: foundation hardening from review pass 🛡️ 2026-06-22 23:24:55 -05:00