GET-018: make be get's worktree update atomic stage-to-temp + atomic swap (or journal+rollback) so a mid-write failure leaves ref/wtlog/tree all unchanged

Split from GET-016 Part 1. be get's COMMIT POINT (sniff/GET.c:1338-1429) advances the local branch ref + wtlog BEFORE the non-crash-safe worktree write (WALKTreeLazy + drains + sub loop), deliberately the comment documents replay-via-be get --force ?<cur> as the recovery, and test/get/09-refuse-no-commit + test/get/10-partial-recovery pin that model (get/10 asserts the wtlog GROWS after a failing write and that --force replay is the fix). So the literal "advance the ref only after the write succeeds" reorder is rejected: it breaks that documented crash-safety model and both tests. True all-or-nothing atomicity needs a redesign stage the wt mutation to a scratch area then atomically swap + advance the ref, or journal each mutation and roll back on failure. GET-016 Part 2 (the --force full-reset that makes the replay recovery actually work) landed separately. See GET, GET-016, CLAUDE.

Repro (target behaviour)

Design fork (decide first this is why GET-016 split it out)

Design ruling (2026-07-11, gritzko-approved): PLAN/APPLY split + begin/seal rows (JS first)

The JS impl (be/verbs/get/get.js) is the live surface and had two incidents on 2026-07-11 proving the amplifier is actively lossy, not theoretical: GET-043 (conflict-abort dropped queued leaves in 3 worktrees) and the journal/be self-update crash (tip appended, zero files written, then a same-tip re-get CEMENTED the stale files as phantom "local edits" via weave3's theirs==base keep-ours). Ruling:

Constraints

Must not regress the crash-safety property test/get/09/10 protect either preserve replay-recovery as a fallback, or migrate those tests to the new no-drift model as a deliberate, reviewed step.

Planned

WIP

TODOs