Skip to content

[Core] 8 - Verify migrations and backup restore #468

Description

@KacperKozak

What to build

Create shared upgrade fixtures for every production-supported DB upgrade path and verify real Android-to-iOS and iOS-to-Android backup/restore behavior. Derive supported versions from current migration and restore contracts.

Part 8 of the approved cross-platform persistence reliability plan. Android and iOS remain separate native implementations with shared observable contracts. Local planning document: docs/persistence-reliability-plan.md; this issue is self-contained. Type: AFK.

Likely files

  • modules/vescape-core/ios/telemetry/DatabaseBackupManager.swift - production behavior or caller to inspect
  • modules/vescape-core/ios/telemetry/TelemetryMigrationTests.swift - existing verification seam
  • modules/vescape-core/android/src/main/java/expo/modules/vescapecore/telemetry/DatabaseBackupManager.kt - production behavior or caller to inspect
  • modules/vescape-core/android/src/test/java/expo/modules/vescapecore/telemetry/TelemetryBoardIdMigrationTest.kt - existing verification seam
  • modules/vescape-core/ios/telemetry/TelemetryDatabase.swift - production behavior or caller to inspect

Implementation hints

Keep Room on Android and GRDB on iOS. Native owns durable truth; JS renders state and sends intents. Follow bidirectional @parity links and preserve bridge payloads. Custom SQL is allowed for migrations and aggregate updates with real DB tests. Use existing error UI and avoid a generic persistence/recovery framework. Diagnostics transport follows ADR 0031; Sentry handles errors independently of local event persistence. Use bun commands and appropriate scoped verification.

Acceptance criteria

  • Real migrations preserve expected rides, Boards, settings, Favorites and other durable values across both runners.
  • Exercise actual backup/restore validation and migrations, including both cross-platform directions, not just queries on prepared final schemas.
  • Invalid/unsupported restores fail explicitly without replacing valid current data; no new support cutoff or automatic destructive reset.
  • Keep raw schema and driver differences explicit; fixture coverage catches missing platform migration implementations.

Blocked by

Related

Activity

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

    area:coreApp shell, storage, lifecycle, infraarea:dbTouches database / persistent storagearea:nativeTouches native side (modules/vesc-ble, Swift/Kotlin)complexity:highCritical paths, subtle correctness, native pipelines. Use opus.enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions