Skip to content

Add a device test that migrates an encrypted 2.3.x (schema 6) vault through unlock #127

Closed

Description

@pasichDev

Problem

The upgrade from 2.3.x is tested only in two halves:

  • EarlierReleaseVaultTest (device test) writes a vault with sqlcipher-android and opens it with the current database. It never migrates: the vault is created at schema 8.
  • VaultMigrationTest and AppDatabaseSchemaTest migrate 1 to 8 (also 6 to 8), but on an unencrypted database.

Nothing covers an encrypted 2.3.x vault (schema 6) that is migrated 6 to 7 to 8 through the real unlock path. If the migration failed under SQLCipher, every upgraded user would see "database error" on each unlock.

Proposed solution

Add a device test: create a schema 6 database through SupportOpenHelperFactory with the raw key (as 2.3.x did) with a tagged note, a trashed note and a task with a sub-task. Then call SecureDatabaseManager.unlockDatabase(dek) and check the schema 8 data: tags in note_tags, trashedAt set, sub-task kept.

Also use sqlcipher-android 4.19.1 in the test, as 2.3.1 shipped, instead of the 4.20.0 from the current catalog.

Security / privacy impact

None.

Activity

  1. added
    enhancement
    on Nov 19, 2026
  2. pasichDev commented on Nov 21, 2026

    @pasichDev
    OwnerAuthor

    Fixed in #135, released in 3.0.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions