Skip to content

Wave-3 rest (X7, X8, X12): CI-parity + auth-path test coverage - #9

Merged
spdotdev merged 4 commits into
mainfrom
ralph/wave3-rest
Jul 4, 2026
Merged

spdotdev merged 4 commits into
mainfrom
ralph/wave3-rest

Conversation

@spdotdev

@spdotdev spdotdev commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Completes wave-3 on the Android side (X1–X4 already merged in #8).

  • X7 — ci.yml paths: now includes .github/workflows/ci.yml (both push + PR) so editing the workflow itself runs the build/test job (Laravel had this via W20).
  • X8 — new AuthInterceptorTest covers the 401 → clear-token → sessionActive=false reactive-logout path (a CLAUDE.md critical path with no unit coverage). Pure JVM: fake Interceptor.Chain + fake TokenStore, no emulator (MockWebServer is androidTest-only).
  • X12 — regression test pinning the Google-401 error copy. On re-check 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).

spdotdev added 4 commits July 4, 2026 17:25
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.
@spdotdev
spdotdev merged commit 3a719bf into main Jul 4, 2026
3 checks passed
@spdotdev
spdotdev deleted the ralph/wave3-rest branch July 4, 2026 15:34
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