The on-device sign-up suite runs again, and the bug it found is fixed #149

Merged
paulhitt merged 3 commits from fix/instrumented-clears-a-release-build into main 2026-09-11 14:12:14 +00:00
paulhitt commented 2026-09-11 14:05:43 +00:00 (Migrated from gitlab.com)

Two halves. The suite could not run; once it could, it found a real bug on the first honest pass.

The suite (77ca69b)

Five stale things, each hidden behind the one in front, and none of them was the app. Sign-up works: the run that got through created andt34972750 on relay1, registered a device, and the Account screen showed both.

  1. The emulator still had a release-signed build, so the debug test APK could not install (INSTALL_FAILED_UPDATE_INCOMPATIBLE). Zero tests ran. The uninstall lived only in the "emulator already up" branch, on the reasoning that a cold boot starts clean - a cold boot starts with no snapshot; the disk image keeps what was installed. The script already printed the leftover package and carried on, which is a check nobody acts on.
  2. The sign-in form scrolls and toggle-register is below the fold. An off-screen tap is not an error in Compose, it just does not happen. Same for sign-out, the last section of a long Account screen.
  3. It waited for device-id after sign-up, but sign-up lands on Home and device-id is on Account. Two minutes on a screen that would never show it, then "never appeared" - which reads exactly like sign-up failing.
  4. performTextInput appends and only the relay field was cleared, so the second test typed 19901990 into the age gate. Submit needs exactly four digits; a disabled button swallows a tap.

The bug it found (4412c0a, closes #22)

Sign out normally, create a second account, and it was refused with "Your session expired. Sign out and back in to keep going." - advice nobody can act on, on the screen you sign up from.

authenticate reuses the device identity from the vault, and the comment above it says why: keeping the device is what stops signing out and back in costing every contact a fresh trust prompt. True for the same account. For a different one it reused a device belonging to the first account and registered it against the new one; the relay refused, correctly, and the refusal surfaced as a sentence about a session the person did not have.

The stored credential already carries userId and relayBaseUrl, so same relay + same user means the device is ours to reuse; anything else gets its own device.

This is the sequence a tester runs: sign up, look around, sign out, make a second account to message themselves.

Verification

SignUpFlowTest against relay1 on an emulator: VERDICT: PASSED on device, both tests, where it previously failed every run. JVM suites unchanged at 1294 tests, 0 failures. No new ktlint violations (30 at HEAD, 30 after).

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

Two halves. The suite could not run; once it could, it found a real bug on the first honest pass. ## The suite (77ca69b) Five stale things, each hidden behind the one in front, and **none of them was the app**. Sign-up works: the run that got through created `andt34972750` on relay1, registered a device, and the Account screen showed both. 1. **The emulator still had a release-signed build**, so the debug test APK could not install (`INSTALL_FAILED_UPDATE_INCOMPATIBLE`). Zero tests ran. The uninstall lived only in the "emulator already up" branch, on the reasoning that a cold boot starts clean - a cold boot starts with no *snapshot*; the disk image keeps what was installed. The script already printed the leftover package and carried on, which is a check nobody acts on. 2. **The sign-in form scrolls and `toggle-register` is below the fold.** An off-screen tap is not an error in Compose, it just does not happen. Same for `sign-out`, the last section of a long Account screen. 3. **It waited for `device-id` after sign-up**, but sign-up lands on Home and `device-id` is on Account. Two minutes on a screen that would never show it, then "never appeared" - which reads exactly like sign-up failing. 4. **`performTextInput` appends** and only the relay field was cleared, so the second test typed `19901990` into the age gate. Submit needs exactly four digits; a disabled button swallows a tap. ## The bug it found (4412c0a, closes #22) Sign out normally, create a second account, and it was refused with *"Your session expired. Sign out and back in to keep going."* - advice nobody can act on, on the screen you sign up from. `authenticate` reuses the device identity from the vault, and the comment above it says why: keeping the device is what stops signing out and back in costing every contact a fresh trust prompt. True for the **same** account. For a different one it reused a device belonging to the first account and registered it against the new one; the relay refused, correctly, and the refusal surfaced as a sentence about a session the person did not have. The stored credential already carries `userId` and `relayBaseUrl`, so same relay + same user means the device is ours to reuse; anything else gets its own device. This is the sequence a tester runs: sign up, look around, sign out, make a second account to message themselves. ## Verification `SignUpFlowTest` against relay1 on an emulator: **VERDICT: PASSED on device**, both tests, where it previously failed every run. JVM suites unchanged at **1294 tests, 0 failures**. No new ktlint violations (30 at HEAD, 30 after). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
paulhitt commented 2026-09-11 14:05:46 +00:00 (Migrated from gitlab.com)

mentioned in issue #22

mentioned in issue #22
paulhitt commented 2026-09-11 14:09:45 +00:00 (Migrated from gitlab.com)

mentioned in commit 4412c0a0fa

mentioned in commit 4412c0a0fa7e2849a336cd35c70ba4b8d63a3e8c
paulhitt commented 2026-09-11 14:09:46 +00:00 (Migrated from gitlab.com)

added 1 commit

  • 4412c0a0 - A second account on the same phone gets its own device (android#22)

Compare with previous version

added 1 commit <ul><li>4412c0a0 - A second account on the same phone gets its own device (android#22)</li></ul> [Compare with previous version](/paulhitt/flamenet-messenger-android/-/merge_requests/122/diffs?diff_id=2020424888&start_sha=77ca69b3271b2b2918df857370390f01af1d721f)
paulhitt commented 2026-09-11 14:10:01 +00:00 (Migrated from gitlab.com)

changed title from The on-device sign-up suite runs again, and sign-up was never broken to The on-device sign-up suite runs again, and the bug it found is fixed

<p>changed title from <code class="idiff">The on-device sign-up suite runs again, and <span class="idiff left right deletion">sign-up was never broken</span></code> to <code class="idiff">The on-device sign-up suite runs again, and <span class="idiff left right addition">the bug it found is fixed</span></code></p>
paulhitt commented 2026-09-11 14:10:01 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
paulhitt commented 2026-09-11 14:12:15 +00:00 (Migrated from gitlab.com)

mentioned in commit 668bd48415

mentioned in commit 668bd48415526c93365b88ff2f4d476ed16b9018
paulhitt (Migrated from gitlab.com) merged commit 668bd48415 into main 2026-09-11 14:12:15 +00:00
paulhitt commented 2026-09-11 16:14:47 +00:00 (Migrated from gitlab.com)

mentioned in commit 945897a742

mentioned in commit 945897a74295a0088af4bb194a78fa2bebd5af2b
paulhitt commented 2026-09-11 16:16:48 +00:00 (Migrated from gitlab.com)

Correction: the scripts/instrumented.sh change this MR describes (clearing the app on both paths) did not land here. The commit contains only SignUpFlowTest.kt; the script was staged under a different case (Scripts/ vs the tracked scripts/) and never committed. The on-device pass used the uncommitted script. It is now in !124. The test fixes and the account-scoped device fix in this MR are unaffected.

Correction: the `scripts/instrumented.sh` change this MR describes (clearing the app on both paths) **did not land here**. The commit contains only `SignUpFlowTest.kt`; the script was staged under a different case (`Scripts/` vs the tracked `scripts/`) and never committed. The on-device pass used the uncommitted script. It is now in !124. The test fixes and the account-scoped device fix in this MR are unaffected.
paulhitt commented 2026-09-11 16:16:48 +00:00 (Migrated from gitlab.com)

mentioned in issue #21

mentioned in issue #21
paulhitt commented 2026-09-11 16:16:49 +00:00 (Migrated from gitlab.com)

mentioned in merge request !124

mentioned in merge request !124
paulhitt commented 2026-09-11 16:21:49 +00:00 (Migrated from gitlab.com)

mentioned in commit f6506292e7

mentioned in commit f6506292e708e29b668e43becb5177778528ab14
Sign in to join this conversation.