fix(ci): scope emulator smoke and await OAuth callback jobs - #174
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes are narrowly scoped to CI/test orchestration and introduce a clear, verifiable fix (awaiting only the relevant callback job) without affecting production authentication flow semantics.
Review effort: Lite
Findings: None
What changed in this PR
This PR hardens the scheduled/opt-in managed-device GitHub Actions lane by explicitly running only the intended smoke tests (launch + stale OAuth callback regression) and by making the OAuth callback handling awaitable so the regression no longer waits on unrelated long-lived application coroutines.
Changes:
- Update
MobileOAuthRuntime.dispatchAuthTabResultto return the launched coroutineJobso callers/tests can await just that callback handling work. - Refactor
StaleOAuthCallbackTestto await only the returned callback job (instead of joining all runtime scope children), preventing timeouts caused by permanent background jobs. - Update the emulator smoke workflow (and AGENTS docs) to run
LaunchSmokeTestandStaleOAuthCallbackTestin separate invocations and upload separate artifacts.
| File | Description |
|---|---|
| app/src/mobile/kotlin/io/putdotio/android/auth/MobileOAuthRuntime.kt | Return a Job from auth tab result dispatch to allow targeted awaiting. |
| app/src/androidTestMobile/kotlin/io/putdotio/android/auth/StaleOAuthCallbackTest.kt | Await only the specific callback job to avoid timeouts from unrelated scope children. |
| AGENTS.md | Document the updated scheduled managed-device smoke lane behavior. |
| .github/workflows/emulator-smoke.yml | Explicitly select the two smoke tests via separate Gradle invocations and upload separate artifacts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The weekly managed-device lane ran opt-in feature tests without their fixtures. Its OAuth regression also waited for every application coroutine, including a permanent playback observer, so it timed out after handling the callback.
Select launch smoke and the credential-free OAuth regression explicitly, with separate invocations and artifacts because AGP truncates comma-separated class selectors. Return the callback job and await only that job; preserve the assertions that stale callbacks retain the newer attempt and matching malformed callbacks clear it.
Validated locally with
./gradlew verify :buildSrc:test :app:assembleMobileProductionDebug :app:assembleTvProductionDebug, actionlint, and zizmor. Both named tests passed on the API 36 managed emulator with SwiftShader; result XML confirmed each ran without failures or skips. The prior timeout is recorded in the failing scheduled run.