Files
VoelinClient/crates
faumarayandClaude Sonnet 5.5 526e59d5ca Test the sign-out of the account on the SQLite store
KeyStore::sign_out is voelin-identity's, generic over the trait, so the
store uses it as it is and these tests run it on the SQLite table, each case
of the protocol's section 13.6 as its own test:

- the account record and the synced copies are removed and the unsynced bound
  identities are left unbound, byte for byte;
- the device key is kept, unbound and byte for byte (the stored blob is
  equal, the key signs the same bytes), when the record says
  bound_existing_key, and deleted when it does not;
- DeviceKeyChoice::Forget(device uid) deletes the key it names in both
  cases and no other, and a uid that is not stored deletes nothing;
- a record without the flag keeps the key;
- an unreadable record (unknown version, damaged JSON, an empty object) is
  deleted before the error is reported; with Forget the named key is deleted
  even then; a second call completes without bringing the key back;
- a sign-out that stopped half way can be run again;
- the result is durable in the file, and the kept key's row has no account.

The five hand-made mutants of the protocol's own acceptance (Auto always
deleting, Forget keeping, a missing flag reading false, the unreadable record
left behind, Forget deleting only after the record was read) were applied to
a copy of voelin-identity through the documented [patch] recipe, and each is
caught by these tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 05:51:30 +03:00
..