Coverage lane 4 (#249) found several classes can't be reached by JVM unit tests, holding reporting/push coverage below the ≥95% goal. Making them testable is a small, sensible improvement that lets those packages meet the floor.
Items
reporting/ReportUploadScheduler calls WorkManager.getInstance(context) — a static on an abstract class MockK can't stub (AbstractMethodError). Refactor to inject Provider<WorkManager> (or dagger.Lazy<WorkManager>), mirroring SyncScheduler (which is JVM-testable for exactly this reason). Then unit-test its enqueue logic.
reporting/ReportUploadWorker HTTP submit path is unreachable in tests while BuildConfig.DEBUG_REPORT_ENDPOINT is empty (default). Add a test that overrides/injects a non-empty endpoint (e.g. a local mock HTTP server) and covers success/failure/retry.
push/IdleService (foreground Service) can't be instantiated off-device. Cover its start/stop/notification behavior via an instrumented/E2E test, or extract its non-Android logic into a JVM-testable helper.
CrashReporter.terminate (Process.killProcess/exitProcess) is intentionally JVM-untestable — leave it; exclude it from any instruction gate.
Priority / dependency
Low — only strictly needed if the capstone (#251) opts for instruction-level gating on reporting/push. If #251 gates on line coverage, items 1–3 are optional polish. Coordinate with #251.
Definition of done (per CLAUDE.md)
Unit tests for items 1–2; an instrumented/E2E test for item 3.
Any production seam (item 1) stays minimal and behavior-preserving.
Not done until unit and E2E pass.
## Context
Coverage **lane 4 (#249)** found several classes can't be reached by JVM unit tests, holding `reporting`/`push` coverage below the ≥95% goal. Making them testable is a small, sensible improvement that lets those packages meet the floor.
## Items
1. **`reporting/ReportUploadScheduler`** calls `WorkManager.getInstance(context)` — a static on an abstract class MockK can't stub (`AbstractMethodError`). Refactor to inject `Provider<WorkManager>` (or `dagger.Lazy<WorkManager>`), mirroring `SyncScheduler` (which is JVM-testable for exactly this reason). Then unit-test its enqueue logic.
2. **`reporting/ReportUploadWorker`** HTTP submit path is unreachable in tests while `BuildConfig.DEBUG_REPORT_ENDPOINT` is empty (default). Add a test that overrides/injects a non-empty endpoint (e.g. a local mock HTTP server) and covers success/failure/retry.
3. **`push/IdleService`** (foreground `Service`) can't be instantiated off-device. Cover its start/stop/notification behavior via an instrumented/E2E test, or extract its non-Android logic into a JVM-testable helper.
4. `CrashReporter.terminate` (`Process.killProcess`/`exitProcess`) is intentionally JVM-untestable — leave it; exclude it from any instruction gate.
## Priority / dependency
**Low** — only strictly needed if the capstone (**#251**) opts for **instruction**-level gating on `reporting`/`push`. If #251 gates on **line** coverage, items 1–3 are optional polish. Coordinate with #251.
## Definition of done (per CLAUDE.md)
- Unit tests for items 1–2; an instrumented/E2E test for item 3.
- Any production seam (item 1) stays minimal and behavior-preserving.
- Not done until unit **and** E2E pass.
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.
Context
Coverage lane 4 (#249) found several classes can't be reached by JVM unit tests, holding
reporting/pushcoverage below the ≥95% goal. Making them testable is a small, sensible improvement that lets those packages meet the floor.Items
reporting/ReportUploadSchedulercallsWorkManager.getInstance(context)— a static on an abstract class MockK can't stub (AbstractMethodError). Refactor to injectProvider<WorkManager>(ordagger.Lazy<WorkManager>), mirroringSyncScheduler(which is JVM-testable for exactly this reason). Then unit-test its enqueue logic.reporting/ReportUploadWorkerHTTP submit path is unreachable in tests whileBuildConfig.DEBUG_REPORT_ENDPOINTis empty (default). Add a test that overrides/injects a non-empty endpoint (e.g. a local mock HTTP server) and covers success/failure/retry.push/IdleService(foregroundService) can't be instantiated off-device. Cover its start/stop/notification behavior via an instrumented/E2E test, or extract its non-Android logic into a JVM-testable helper.CrashReporter.terminate(Process.killProcess/exitProcess) is intentionally JVM-untestable — leave it; exclude it from any instruction gate.Priority / dependency
Low — only strictly needed if the capstone (#251) opts for instruction-level gating on
reporting/push. If #251 gates on line coverage, items 1–3 are optional polish. Coordinate with #251.Definition of done (per CLAUDE.md)