Fix installed update reconciliation - #164
Conversation
Preserve update state for incomplete Play responses and reconcile installed, cached, and remote versions without repeat device-update notifications. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 468f2502-f849-44e9-a46b-f23410eb1ecd
There was a problem hiding this comment.
🔵 Needs a closer look
Core sync/update reconciliation behavior is being refactored with new decision paths and logging, so it warrants final human review (including real-device validation) despite solid unit-test coverage.
Pull request overview
This PR adjusts AppWatcher’s Play Store update-check reconciliation so bulk response omissions/detail-less entries no longer erase or misclassify update state, and so installed/cached/remote versions are reconciled to avoid “ghost” updates (per #107), with additional diagnostics and regression tests.
Changes:
- Introduces an explicit
AppUpdateDecisiondecision table (plusSyncDecisionSignal) to reconcile remote/cached/installed versions and drive consistent update-status transitions. - Classifies bulk detail responses into usable / missing / without-details documents and logs privacy-safe, correlated sync diagnostics (with verbose logging for manual runs).
- Expands unit tests to cover reconciliation decisions, diagnostic signal detection, and bulk document classification behavior.
File summaries
| File | Description |
|---|---|
| app/src/main/java/com/anod/appwatcher/sync/UpdateCheck.kt | Adds bulk response classification, decision/signal enums, and updated reconciliation + diagnostics logging in the update-check flow. |
| app/src/test/java/com/anod/appwatcher/sync/UpdateCheckVersionRollbackTest.kt | Expands regression coverage for reconciliation decisions and bulk response classification edge cases. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Hash package identifiers only when a diagnostic record is emitted, eliminating per-app SHA-256 work for suppressed scheduled-sync records. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 468f2502-f849-44e9-a46b-f23410eb1ecd
There was a problem hiding this comment.
🔵 Needs a closer look
It changes core update reconciliation and sync logging behavior in a high-impact path that warrants final human validation on-device across real Play response edge cases.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
Summary
Addresses the update reconciliation behavior reported in #107.
Validation
./gradlew :app:testDebugUnitTest --tests "com.anod.appwatcher.sync.UpdateCheckVersionRollbackTest"./gradlew ktlintCheck