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:
parent
9b9b8d08ca
commit
839d49c4cc
1 changed files with 249 additions and 36 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue