fix(train): no row's ID tells the instance a date: the days' IDs are keyed by the account (ADR 0030, D57)

A day's, night's and heart chunk's ID was a UUID of version 5 of the
person and the date, which the instance can hash for every date itself:
each ID told it which days the band was worn. halkyon_keys' keyedRowId
hashes the name under the account's X25519 secret key (BLAKE2b, a UUID of
version 8), the same on every device of the account and unreadable
without its keys; ContentCipher.rowId and TrainKeys.rowId hand it on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-30 16:12:00 +01:00
commit 839d49c4cc
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -101,7 +101,7 @@ void main() {
person: 'person',
);
await profile.save(body);
days = DayRepository(MemoryDayGateway(), keys, person: 'person');
days = DayRepository(MemoryDayGateway(), keys);
workouts = WorkoutRepository(MemoryWorkoutGateway(), keys);
now = DateTime.utc(2026, 10, 28, 9);
day = today;
@ -344,7 +344,7 @@ void main() {
);
addTearDown(keyless.dispose);
await keyless.refresh();
days = DayRepository(MemoryDayGateway(), keyless, person: 'person');
days = DayRepository(MemoryDayGateway(), keyless);
platform.days.add([summary('2026-10-27', 9876)]);
final loop = await setUpBand();
await settled(loop);