Repository navigation
Wave-3 rest (X7, X8, X12): CI-parity + auth-path test coverage - #9
Merged
Merged
Conversation
ci.yml paths omitted .github/workflows/** (a .yml isn't caught by **/*.kts), so a PR editing only the Android CI workflow skipped the build/test job. Add .github/workflows/ci.yml to both push and pull_request path filters, mirroring W20 on the Laravel side.
The reactive-logout mechanism (401 -> clear token -> flip authState -> return to login) is a critical path per CLAUDE.md but had no unit test. Add AuthInterceptorTest with a fake Interceptor.Chain (no MockWebServer/ emulator needed): 401 clears the token + flips authState; 200 leaves it; Bearer header attached only when a token exists.
A rejected Google ID token returns HTTP 401 — the same status the email/password flow maps to "Incorrect email or password." That copy is nonsensical on the Google button. toGoogleAuthErrorMessage() already maps Google 401 -> "Google sign-in failed. Please try again."; add a test so a future refactor can't silently route the Google path through the shared password mapper. Makes FakeAuthRepository's failure Throwable configurable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes wave-3 on the Android side (X1–X4 already merged in #8).
ci.ymlpaths:now includes.github/workflows/ci.yml(both push + PR) so editing the workflow itself runs the build/test job (Laravel had this via W20).AuthInterceptorTestcovers the 401 → clear-token →sessionActive=falsereactive-logout path (aCLAUDE.mdcritical path with no unit coverage). Pure JVM: fakeInterceptor.Chain+ fakeTokenStore, no emulator (MockWebServer is androidTest-only).toGoogleAuthErrorMessage()already maps a Google 401 → "Google sign-in failed. Please try again." (not the email/password copy), so no behaviour change — the test stops a future refactor routing Google through the shared password mapper.Kotlin verified by CI (local JDK/Gradle mismatch).