Fixed in https://github.com/badbundle/vault-app/pull/626 (merged as 15c099ed).
VaultStoreSession: an actor that implements every store protocol and forwards to.plain(store)or.locked.- When locked, reads return nothing and writes throw.
- Export also throws, so an empty export can never replace a real backup.
- Killphrase deletion returns
false(C2). switchTo(_:)andlock()wait for calls already in flight.
VaultRoot.vaultStore: now a session opened on the plain store (plainVaultStore). The rehash services still write to the plain store directly.VaultDataModel.purgeVaultContents(): forgets items, tags, the search and tag filter, and the item caches. A generation counter stops a reload that was in flight from putting anything back.- App lock: it now purges the vault contents when it locks, instead of only clearing the search.
- Everything else: unchanged. Nothing switches the session to another store yet; that comes with VAULT-46 and VAULT-47.
- Follow-up for VAULT-47 and VAULT-22: the lock hook is synchronous but
session.lock()is async, so an async lock step will be needed.