Habit records from a sync response are now applied together, so habits sharing a name merge with their days instead of orphaning them. LegacyPaths now matches raylib's FilePathList so the legacy scan reads the real count.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Deleted encrypted records were serialised with a stray comma (invalid JSON), so deletions could not sync, and ciphertext hex was cut at 4096 characters.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Found by running the old storage tests as Ziran behaviour tests against real SQLite: encrypted habit/habit-day/session/list records were serialised without most fields (malformed JSON, so habits could not sync between devices); the remote habit apply SQL was truncated to 2048 bytes; check-in import queries lacked their SELECT prefix. Adds sync round-trip, payload, habit and import tests.
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>