tane/apps/app_seeds/test/data/export_import
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
..
csv_import_repository_test.dart style: dart format reflow (no behavior change) 2026-07-09 22:19:43 +02:00
import_reconciler_test.dart feat(inventory): CSV/JSON export and JSON import with LWW reconciliation 2026-07-09 12:46:53 +02:00
inventory_csv_codec_test.dart style: dart format reflow (no behavior change) 2026-07-09 22:19:43 +02:00
inventory_csv_import_test.dart style: dart format reflow (no behavior change) 2026-07-09 22:19:43 +02:00
inventory_json_codec_test.dart style: dart format reflow (no behavior change) 2026-07-09 22:19:43 +02:00
inventory_round_trip_test.dart fix(sync): re-seed HLC clock from stored rows so local edits win LWW 2026-07-10 02:06:01 +02:00