Skip to content

fix(migration): harden RN setup + tag metadata waits for migration_1 - #219

Open
piotr-iohk wants to merge 2 commits into
mainfrom
ada/harden-migration1-rn-setup-and-tag-backup
Open

fix(migration): harden RN setup + tag metadata waits for migration_1#219
piotr-iohk wants to merge 2 commits into
mainfrom
ada/harden-migration1-rn-setup-and-tag-backup

Conversation

@piotr-iohk

Copy link
Copy Markdown
Collaborator

Summary

  • Harden Android RN setup used by migration_1: retry GRABSendSuccess, longer/more reliable ActivityShort-1 discovery before tagging.
  • Wait for RN metadata backup before uninstall on Android migration_1, and briefly after native restore before tag asserts.
  • Retry TagsPrompt / Tag-* in verifyMigration (shared iOS+Android) — balance can restore from Electrum before tag metadata arrives.
  • Bump migration_setup_* backup waits 20s → 40s (feeds iOS prepare-wallets).

Does not relax balance assertions (migration_3 100k-short / zero-balance mismatches stay as product/env signals).

Evidence

Android nightly E2E Migration 34427828554 (master, 2026-09-10)

Only migration_1-restore failed (v1.1.3 + v1.1.6); v1.1.4 mig1 and all mig2/3/4 green.

v1.1.3 job 102883890380:

  1. SendSuccess still not displayed after 30000ms (RN send swipe)
  2. ActivityShort-1 still not displayed after 30000ms (post-fund tag)
  3. ActivityShort-1 again after send

v1.1.6 job 102883890391:

  1. ActivityShort-1 after fund
  2. Full setup + restore + balance match 446184, then Tag-received still not displayed
  3. SendSuccess after GRAB

iOS E2E Migration 34431873300 (finished)

e2e-tests - v1.1.6 - migration_1-restore:

  1. Appium session create timeout (infra)
    2–3. Restore OK, balance 446184 matched, then ~Tag-received still not displayed after 30000ms

Classification: harness for SendSuccess / ActivityShort-1 (RN UI flake) and Tag-* timing after mnemonic restore; not a fake-pass of balance checks.

Test plan

  • Android CI / nightly migration_1 on older RN (v1.1.3 / v1.1.6)
  • iOS migration_1-restore after prepare-wallets
  • Confirm migration_3 balance mismatches still fail loudly

CI Migration (and other iOS restore flows) intermittently fail when
`mobile: setPasteboard` dies with `xcrun simctl pbcopy` exit code 60.
Retry setPasteboard, fall back to typeText if pasteboard/Paste menu is
unavailable, and wait explicitly for RestoreButton in restoreRnWallet.

Evidence: bitkit-ios E2E Migration run 34431873300 attempt 3
migration_1 — Appium session timeout, then pbcopy exit 60 in
pasteIOSText, then RestoreButton 60s timeout.
@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

Validation dispatch: bitkit-android E2E Migration with e2e_branch=ada/harden-migration1-rn-setup-and-tag-backuphttps://github.com/synonymdev/bitkit-android/actions/runs/34529852920

Android nightly migration_1 (v1.1.3/v1.1.6) flakes on SendSuccess,
ActivityShort-1 during RN setup, and Tag-received after native restore.
iOS migration_1 attempt on run 34431873300 also hit Tag-received after
balance matched. Retry GRAB/SendSuccess, wait longer for ActivityShort,
backup before uninstall, and retry TagsPrompt until Tag-* appears
without relaxing balance assertions.
@piotr-iohk
piotr-iohk force-pushed the ada/harden-migration1-rn-setup-and-tag-backup branch from 9750b7f to 4788829 Compare September 10, 2026 21:22
@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

Rebased onto #218 (pasteIOSText) so iOS prepare/e2e can validate both.

@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

Iteration 1 Android Migration result (4788829): https://github.com/synonymdev/bitkit-android/actions/runs/34529852920 — mig1 v1.1.4 ✅; v1.1.3/v1.1.6 ❌ (post-send ActivityShort-1 / transfer 100 000). SendSuccess retries helped. Pushed ActivityShowAll fallback (73e8ae2); re-dispatching Android Migration.

@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

Iteration 1 classification (run 34529852920, commit `4788829`)

Job Result First actionable
mig1 v1.1.4
mig1 v1.1.3 post-send `ActivityShort-1` (45s) ×2; then transfer expect `100 000`
mig1 v1.1.6 attempt1/3: Balance mismatch Expected ~446k got ~346k (exactly 100k short) after our backup/restore waits; attempt2: transfer `100 000`
mig4 v1.1.4 HeaderMenu / GRAB / DrawerSettings (RN setup nav flake; SendSuccess retry logged)

Harness wins: `SendSuccess` GRAB retries fired; setup often reaches uninstall/restore.
Do not fake-pass: 100k-short balance is product/env (same family as known mig_3 signal).
Next: `73e8ae2` ActivityShowAll tagging fallback — Android re-dispatch 34532902697. If v1.1.6 still 100k-short after clean setup, stop iterating balance; leave assertion loud.

@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

BACK OUT iteration 2 (`73e8ae2`)

Android re-dispatch 34532902697 regressed: ActivityShowAll does not exist on RN; extra `dismissSheetRN` + scroll-down before tag made `ActivityShort-1` fail even on the post-fund tag (was often OK in iteration 1). Force-pushed branch back to `4788829`.

Keep (iteration 1): SendSuccess GRAB retry, backup/restore waits, openTagFilter retries, longer ActivityShort wait — evidence in 34529852920.
Do not chase tonight: 100k-short balance after successful restore (product/env); stubborn ActivityShort without a real RN selector fallback.

@piotr-iohk
piotr-iohk force-pushed the ada/harden-migration1-rn-setup-and-tag-backup branch from 73e8ae2 to 4788829 Compare September 10, 2026 21:55
@piotr-iohk

Copy link
Copy Markdown
Collaborator Author

iOS Migration FULL GREEN: https://github.com/synonymdev/bitkit-ios/actions/runs/34531814945 (openTagFilter retries visible on mig1 attempt2; attempt3 Migration verified). Android iter1 https://github.com/synonymdev/bitkit-android/actions/runs/34529852920 — SendSuccess retries help; 100k-short remains product/env. ActivityShowAll iter BACKED OUT (branch at 4788829).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant