Skip to content

fix: stabilize the SMS integration tests and run them once per PR - #68

Merged
Tkko merged 2 commits into
mainfrom
fix/sms-play-store-updates
Nov 6, 2026
Merged

Tkko merged 2 commits into
mainfrom
fix/sms-play-store-updates

Conversation

@Tkko

@Tkko Tkko commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Problem

Flaky job. Integration Tests (Android Emulator, SMS and hint) failed intermittently: 3 of the last 8 runs with a recorded result. The overall CI run still showed green because of continue-on-error.

The google_apis_playstore image starts with an old copy of Play services, and Play Store updates it a few minutes after boot. The update force-stops Play services (installPackageLI in logcat), and both SMS APIs run inside it, so whichever test overlaps the update fails:

  • Consent test (run 42224766076): the dialog opened at 13:27:51 and Play services was force-stopped at 13:27:56, closing it.
  • Retriever test (run 42224907114, run 42211303123): the test timed out after 60s while Play services kept restarting. The SMS messages arrived but never reached the app.

The consent failure is well supported by logcat. The link to the retriever timeouts is inferred, because passing runs don't upload logcat to compare against.

Duplicate tests. The SMS job runs all 18 tests in smart_auth_test.dart, and the shared Android job ran 15 of them again, at the cost of a second app build and emulator on every PR.

Changes

  • ci.yml: disable Play Store with pm disable-user before the tests start. It lives in the workflow so local emulators keep their Play Store.
  • run_sms_tests.sh: remove the SMS resend loop from fix: improve SMS retriever reliability in integration tests #62. It assumed slow retriever registration, but healthy runs pass on the first send and all six resends failed in the broken runs.
  • ci.yml: pass platforms: none so the shared platform jobs are skipped and the SMS job is the only Android job. Test & Analyze still runs.
  • ci.yml: remove continue-on-error, so an SMS job failure now shows as a red check.

Verification

Before the platforms: none change, the SMS job passed 2 of 2 runs on this branch: Play Store disabled, 18 of 18 tests, no startup retries. That includes the Play services version built into the image. Two passes don't prove the flake is gone, since this job usually passed before too.

The platforms: none path has not run yet. This push is its first run.

Not changed

  • The Main CI ruleset only requires ci / Test & Analyze, so the SMS job shows red on failure but doesn't block merges. Adding it as a required check is a separate decision, best made after a longer clean streak.
  • create-release.yml keeps platforms: android, so releases run the general tests on the shared job but not the SMS and hint tests.
  • The general tests no longer run on an image without Play services.
  • The startup watchdog stays. If "the app did not start" stops appearing, that hang may have the same cause and the watchdog could be removed later.

🤖 Generated with Claude Code

The google_apis_playstore image updates Play services a few minutes
after boot. The update force-stops Play services, which closes the
consent dialog and drops the SMS retriever registration, so whichever
test overlaps it fails. Disable Play Store before the tests start.

Remove the SMS resend loop from run_sms_tests.sh. It was added for slow
retriever registration, but healthy runs pass on the first send and
resends never reached the app in the failing runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tkko Tkko closed this Nov 6, 2026
@Tkko Tkko reopened this Nov 6, 2026
The SMS job already runs the whole integration test file, so the shared
Android job repeated 15 of its 18 tests and cost a second build and
emulator. Skip the shared platform jobs and let the SMS job fail CI now
that it no longer flakes on Play services updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Tkko Tkko changed the title fix: stop Play Store updates during the SMS integration tests fix: stabilize the SMS integration tests and run them once per PR Nov 6, 2026
@Tkko
Tkko merged commit a0372e1 into main Nov 6, 2026
9 checks passed
@Tkko
Tkko deleted the fix/sms-play-store-updates branch November 6, 2026 14:09
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