JS-073 HIGH: ingest.add rewrites the refs ULOG non-atomically + restamps the reflog

ingest.add lands a re-get pack into an existing shard and updates refs (ingest.js:108-128). It drains the old reflog then rewrites the WHOLE file via writeUlogwriteBytes, which does io.resize(fd,0) then io.writeAll(fd,b) IN PLACE (ingest.js:24-32) — no temp file, no sync, no rename. A crash in that window leaves refs empty, losing every tip; the re-get path reaches it (get.js:126). The crash-safe ulog.write (temp+sync+rename) exists and is bypassed. Worse, writeUlog re-feeds rows with NO ts (ingest.js:37), restamping every surviving reflog row. Method: Issues.

Input

Context

Goals

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome