Adds net-new AppLog breadcrumbs to the previously-silent sync engine — MailSyncer (sync all/account/folder start, done, failure, per-folder fetch count), MailBackfiller (slice start/done, per-folder page count + completion), MailPruner (removed count), and the SyncWorker/BackfillWorker/PruneWorker cache-locked-deferral and success/retry outcomes (retry now carries the scrubbed failure throwable via the #325AppLog.w(tag, msg, throwable) overload).
Adds a new logSafeFolderLabel() helper (data/sync/SyncLogging.kt) enforcing the ticket's folder-name caveat: only a fixed allowlist of known system folders (INBOX, Sent, Drafts, Trash, Spam/Junk, Archive, and common provider variants) is ever logged by name; every other folder — however nested or named — logs as a fixed placeholder.
Account attribution is always accountLogRef(account.id), never the raw id or email.
Updates the JVM unit tests exercising these now-logging classes (MailSyncerTest, MailBackfillerTest, MailPrunerTest, SyncWorkerTest, BackfillWorkerTest, PruneWorkerTest, plus MailSyncConcurrencyTest/MailMaintenanceGateTest, which construct real instances) to statically mock android.util.Log, mirroring the existing AppLogTest pattern — required because these classes were silent before, so no test needed the mock until now.
New breadcrumb assertions install a real RingLogBuffer and assert both the expected level/message/counts AND that no test fixture's email address or host ever appears in the buffer (the hard PII rule) — plus a dedicated SyncLoggingTest for the folder-label allowlist itself.
## Summary
- Adds net-new `AppLog` breadcrumbs to the previously-silent sync engine — `MailSyncer` (sync all/account/folder start, done, failure, per-folder fetch count), `MailBackfiller` (slice start/done, per-folder page count + completion), `MailPruner` (removed count), and the `SyncWorker`/`BackfillWorker`/`PruneWorker` cache-locked-deferral and success/retry outcomes (retry now carries the scrubbed failure throwable via the #325 `AppLog.w(tag, msg, throwable)` overload).
- Adds a new `logSafeFolderLabel()` helper (`data/sync/SyncLogging.kt`) enforcing the ticket's folder-name caveat: only a fixed allowlist of known system folders (INBOX, Sent, Drafts, Trash, Spam/Junk, Archive, and common provider variants) is ever logged by name; every other folder — however nested or named — logs as a fixed placeholder.
- Account attribution is always `accountLogRef(account.id)`, never the raw id or email.
- Updates the JVM unit tests exercising these now-logging classes (`MailSyncerTest`, `MailBackfillerTest`, `MailPrunerTest`, `SyncWorkerTest`, `BackfillWorkerTest`, `PruneWorkerTest`, plus `MailSyncConcurrencyTest`/`MailMaintenanceGateTest`, which construct real instances) to statically mock `android.util.Log`, mirroring the existing `AppLogTest` pattern — required because these classes were silent before, so no test needed the mock until now.
- New breadcrumb assertions install a real `RingLogBuffer` and assert both the expected level/message/counts AND that no test fixture's email address or host ever appears in the buffer (the hard PII rule) — plus a dedicated `SyncLoggingTest` for the folder-label allowlist itself.
Closes #329
Part of #324
## Test plan
- [x] `:app:testDebugUnitTest` — full suite green, including new/updated tests in `data/sync`
- [x] `:app:compileDebugAndroidTestKotlin`
- [x] `:app:ktlintCheck`
- [x] `:app:detekt`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
AppLogbreadcrumbs to the previously-silent sync engine —MailSyncer(sync all/account/folder start, done, failure, per-folder fetch count),MailBackfiller(slice start/done, per-folder page count + completion),MailPruner(removed count), and theSyncWorker/BackfillWorker/PruneWorkercache-locked-deferral and success/retry outcomes (retry now carries the scrubbed failure throwable via the #325AppLog.w(tag, msg, throwable)overload).logSafeFolderLabel()helper (data/sync/SyncLogging.kt) enforcing the ticket's folder-name caveat: only a fixed allowlist of known system folders (INBOX, Sent, Drafts, Trash, Spam/Junk, Archive, and common provider variants) is ever logged by name; every other folder — however nested or named — logs as a fixed placeholder.accountLogRef(account.id), never the raw id or email.MailSyncerTest,MailBackfillerTest,MailPrunerTest,SyncWorkerTest,BackfillWorkerTest,PruneWorkerTest, plusMailSyncConcurrencyTest/MailMaintenanceGateTest, which construct real instances) to statically mockandroid.util.Log, mirroring the existingAppLogTestpattern — required because these classes were silent before, so no test needed the mock until now.RingLogBufferand assert both the expected level/message/counts AND that no test fixture's email address or host ever appears in the buffer (the hard PII rule) — plus a dedicatedSyncLoggingTestfor the folder-label allowlist itself.Closes #329
Part of #324
Test plan
:app:testDebugUnitTest— full suite green, including new/updated tests indata/sync:app:compileDebugAndroidTestKotlin:app:ktlintCheck:app:detekt🤖 Generated with Claude Code