2. Atomic bulk move via single Room transaction
MoveItemsToVaultUseCase rewraps and persists items one-at-a-time. If item K fails mid-loop, items 0..K-1 are already moved — partial-success state.
Cleaner approach: collect all rewrapped Passwords first, then a single database.withTransaction { ... } upsert. Eliminates the partial-failure window. Requires either a new PasswordRepository.bulkUpsert(passwords: List) API, or wrapping the loop in a higher-level transaction.
Out of scope for the initial PR because the partial-failure case is rare (crypto failures don't normally occur after vault validation has passed) and the bulk-transactional path is a meaningful refactor.
2. Atomic bulk move via single Room transaction
MoveItemsToVaultUseCaserewraps and persists items one-at-a-time. If item K fails mid-loop, items 0..K-1 are already moved — partial-success state.Cleaner approach: collect all rewrapped Passwords first, then a single
database.withTransaction { ... }upsert. Eliminates the partial-failure window. Requires either a newPasswordRepository.bulkUpsert(passwords: List)API, or wrapping the loop in a higher-level transaction.Out of scope for the initial PR because the partial-failure case is rare (crypto failures don't normally occur after vault validation has passed) and the bulk-transactional path is a meaningful refactor.