Skip to content

Fix installed update reconciliation - #164

Merged
anod merged 2 commits into
masterfrom
fix-update-reconciliation
Aug 28, 2026
Merged

anod merged 2 commits into
masterfrom
fix-update-reconciliation

Conversation

@anod

@anod anod commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve existing update state when Play omits a bulk entry or returns it without app details
  • reconcile remote, cached, and installed versions so already-current apps are not marked updated
  • restore and retain device-available updates after viewing without repeat notification payloads
  • add correlated, privacy-safe sync diagnostics with verbose manual evidence and compact scheduled logging
  • expand regression coverage for the reconciliation decision table and response classification

Addresses the update reconciliation behavior reported in #107.

Validation

  • ./gradlew :app:testDebugUnitTest --tests "com.anod.appwatcher.sync.UpdateCheckVersionRollbackTest"
  • ./gradlew ktlintCheck

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
Copilot AI lite review requested due to automatic review settings August 28, 2026 12:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 AppUpdateDecision decision table (plus SyncDecisionSignal) 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.

Comment thread app/src/main/java/com/anod/appwatcher/sync/UpdateCheck.kt
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
Copilot AI review requested due to automatic review settings August 28, 2026 19:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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

@anod
anod merged commit 3014b7f into master Aug 28, 2026
5 checks passed
@anod
anod deleted the fix-update-reconciliation branch August 28, 2026 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants