feat(logging): auth/lock -> AppLog + breadcrumbs (#326) #340

Merged
JMR-dev merged 8 commits from feat-326-logging-authlock into main 2026-07-05 04:16:23 +00:00
8 Commits
Author SHA1 Message Date
Jason Ross a44f568f9c Merge main into feat-326-logging-authlock 2026-07-04 22:59:32 -05:00
Jason Ross ef16b1ef2c Merge main into feat-326-logging-authlock 2026-07-04 22:38:19 -05:00
Jason Ross 37bdaae304 Merge main into feat-326-logging-authlock 2026-07-04 22:29:34 -05:00
Jason Ross 30026c1b29 Merge main into feat-326-logging-authlock 2026-07-04 22:09:40 -05:00
Jason Ross fc38255be5 Merge main into feat-326-logging-authlock 2026-07-04 21:52:01 -05:00
Jason Ross ca4c310a66 Merge main into feat-326-logging-authlock 2026-07-04 21:34:08 -05:00
Jason Ross d6e886bde0 Merge main into feat-326-logging-authlock 2026-07-04 21:28:28 -05:00
JMR-devandClaude Opus 4.8 6e0fe14b06 feat(logging): auth/lock -> AppLog + breadcrumbs (#326)
Migrate AppLockViewModel (9 sites) and AccountSetupViewModel (1 site) off
raw android.util.Log onto the AppLog seam (#325), so their diagnostic
lines land in the RingLogBuffer and reach a submitted DebugReport instead
of only Logcat. Adds three new breadcrumbs that were previously silent:
auth-seal unlock success, the clear-cache-and-restart recovery trigger
(with the disableAppLock flag), and every onForeground LockAction
decision. AccountSetupViewModel's success path also now logs "Outlook
account added" (no email). None of these call sites carry PII; where a
throwable is attached, AppLog's StackTraceScrubber redacts it before it
reaches the buffer.

Both ViewModel test suites now install a real RingLogBuffer and assert
against it instead of `verify { Log... }`, including dedicated no-PII
assertions (a known test email never appears in a recorded line). A
minimal `mockkStatic(Log::class)` stub stays in both test files' shared
setUp — AppLog still forwards to the real android.util.Log internally,
which throws "not mocked" in JVM unit tests when uninvoked; the not-yet
-landed guard-rule ticket (#331) will need to reconcile that with a
repo-wide "no raw Log outside AppLog.kt" rule.

Closes #326
Part of #324

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-04 21:27:30 -05:00