Skip to content

Maestro E2E test: rootkey persistence across app restarts #39

@gmaclennan

Description

@gmaclennan

Context

PR #36 introduced platform-native rootkey persistence (Android Keystore + iOS Keychain) and round-trip tests via RootKeyStore (Android instrumented test + iOS XCTest). The test coverage stops at "load → store → load returns same bytes" within a single process lifetime.

The promise the rootkey design makes is stronger: MapeoManager.deviceId must be stable across app restarts (and across device reboots, on Android also across FGS process kills). That's the thing that actually proves we're not regenerating identity.

Why deferred

Per PR #36 review: testing this in unit/instrumented tests would require either:

  • Manually killing + re-launching the app process from inside a test, OR
  • Comparing deviceId across separate test runs that share keystore state — fragile and order-sensitive.

Both are friction we don't need now. The Maestro end-to-end suite (separately planned) is the right place: full app boot, observe deviceId, kill app, relaunch, observe deviceId again.

Acceptance

  • Maestro flow: cold-launch app, read MapeoManager.deviceId, kill app, cold-launch again, assert deviceId matches.
  • Same flow on iOS and Android.
  • Bonus (Android): kill the FGS process explicitly between launches to exercise the FGS-restart path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions