Auto-purges locally-stored crash/problem reports older than 1 month, while the device is charging, so debug records don't accumulate on-device (issue #239).
Change
ReportPurgeWorker (@HiltWorker) deletes reports older than 30 days via new ReportStore.purgeOlderThan(cutoffMillis). ReportStore is file-backed (no DB) → the worker needs no cache-lock gate.
Scheduled as a periodic WorkManager job with setRequiresCharging(true) (SyncScheduler.schedulePeriodicReportPurge, enqueued at startup with sync/backfill/prune). Battery-safe, no network.
Disclosure (per request): the problem-reports list and the submission review screen both show "Reports are automatically deleted from this device after 1 month."
Tests
ReportStoreTest: purgeOlderThan deletes strictly-older reports, keeps the one exactly at the cutoff.
ReportPurgeWorkerTest: computes a ~30-day cutoff; retries on failure.
Preflight green (build, unit tests, androidTest compile, lint, ktlint, detekt).
Auto-purges locally-stored crash/problem reports older than **1 month**, while the device is **charging**, so debug records don't accumulate on-device (issue #239).
## Change
- **`ReportPurgeWorker`** (`@HiltWorker`) deletes reports older than 30 days via new **`ReportStore.purgeOlderThan(cutoffMillis)`**. `ReportStore` is file-backed (no DB) → the worker needs no cache-lock gate.
- Scheduled as a **periodic WorkManager job with `setRequiresCharging(true)`** (`SyncScheduler.schedulePeriodicReportPurge`, enqueued at startup with sync/backfill/prune). Battery-safe, no network.
- **Disclosure** (per request): the problem-reports **list** and the submission **review** screen both show "Reports are automatically deleted from this device after 1 month."
## Tests
- `ReportStoreTest`: `purgeOlderThan` deletes strictly-older reports, keeps the one exactly at the cutoff.
- `ReportPurgeWorkerTest`: computes a ~30-day cutoff; retries on failure.
- Preflight green (build, unit tests, androidTest compile, lint, ktlint, detekt).
Closes #239
🤖 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.
Auto-purges locally-stored crash/problem reports older than 1 month, while the device is charging, so debug records don't accumulate on-device (issue #239).
Change
ReportPurgeWorker(@HiltWorker) deletes reports older than 30 days via newReportStore.purgeOlderThan(cutoffMillis).ReportStoreis file-backed (no DB) → the worker needs no cache-lock gate.setRequiresCharging(true)(SyncScheduler.schedulePeriodicReportPurge, enqueued at startup with sync/backfill/prune). Battery-safe, no network.Tests
ReportStoreTest:purgeOlderThandeletes strictly-older reports, keeps the one exactly at the cutoff.ReportPurgeWorkerTest: computes a ~30-day cutoff; retries on failure.Closes #239
🤖 Generated with Claude Code