tane/apps/app_seeds/lib
vjrj 2ea8d67cb4 fix(sync): re-seed HLC clock from stored rows so local edits win LWW
The repository clock started fresh at Hlc.zero on every launch and was
never re-seeded from the database. After a restart, if the device wall
clock lagged behind stamps already stored (e.g. rows imported from a
peer whose clock ran ahead), a local edit was stamped *older* than the
row it edited and silently lost last-writer-wins — so lot changes made
on one device did not update when the backup was imported on another.

Re-seed the clock lazily from the newest stored `updatedAt` before the
first local stamp of the session, mirroring what importInventory already
does with the incoming max. _stamp() is now async.

Tests: add a lot-level LWW re-import test (the variety case was covered,
the lot case was not) and a restart-regression test that reproduces the
lagging-wall-clock scenario.
2026-07-10 02:06:01 +02:00
..
data fix(sync): re-seed HLC clock from stored rows so local edits win LWW 2026-07-10 02:06:01 +02:00
db feat(inventory): photo-first drafts + on-device OCR (digitization R2+R4) 2026-07-09 21:23:46 +02:00
di feat(backup): sealed backups + printable recovery sheet 2026-07-09 22:32:13 +02:00
domain feat(species): derived verified reference links (GBIF/Wikipedia/Wikispecies) 2026-07-09 22:44:12 +02:00
i18n Merge branch 'main' into claude/trusting-shannon-ff64dd 2026-07-09 23:56:45 +02:00
security feat(backup): sealed backups + printable recovery sheet 2026-07-09 22:32:13 +02:00
services feat(backup): sealed backups + printable recovery sheet 2026-07-09 22:32:13 +02:00
state feat(inventory): local sharing — per-lot share terms, filter and printable catalog 2026-07-09 22:19:55 +02:00
ui Merge branch 'main' into claude/trusting-shannon-ff64dd 2026-07-09 23:56:45 +02:00
app.dart feat(inventory): photo-first drafts + on-device OCR (digitization R2+R4) 2026-07-09 21:23:46 +02:00
main.dart feat(inventory): photo-first drafts + on-device OCR (digitization R2+R4) 2026-07-09 21:23:46 +02:00