You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[test] Android VaultStoreTest has no regression test for setCoverArt's finalize-rename failure path #322
Found while reviewing iOS VaultStoreTests.swift on feat/ios-vault-store-orchestration (unit test coverage pass, 2026-08-19).
VaultStore.kt's importFile has a dedicated regression test for the crash-safety ordering (encrypt-to-temp → rename → update-manifest) — the doc comment at VaultStore.kt:216 explicitly says this ordering was a bug an earlier review caught. setCoverArt (VaultStore.kt:314) has the identical structure (check(tmp.renameTo(finalFile)) { "Failed to finalize cover art" } at line 329) and identical cleanup-on-failure logic, but VaultStoreTest.kt has no matching test that forces the rename to fail and asserts the manifest/old-cover-art are left untouched.
The iOS port (feat/ios-vault-store-orchestration) added the equivalent test — testAFailedRenameDuringSetCoverArtLeavesTheManifestAndOldCoverUntouched in VaultStoreTests.swift — using a predictable injected newFileId plus pre-occupying the target path, mirroring the existing testAFailedRenameDuringImportLeavesNoManifestEntryBehind technique.
Ask
Port that same regression test to core/vaultstore/src/test/kotlin/xyz/libravault/core/vaultstore/VaultStoreTest.kt for setCoverArt, using the same "inject a predictable random: SecureRandom, pre-occupy the rename target" pattern the existing import regression test already uses.
Not a known live bug — this is a missing-test finding, not a reported failure.
Activity
fix(ios): VaultStore VMK-scrub bug + 3 test-coverage gaps in Encrypte…