From 58617c98f492ead137ad7cdc3c9dd2ae125b5442 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Fri, 24 Oct 2025 11:09:22 +0000 Subject: [PATCH] docs: add closed-app delivery acceptance criteria MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add comprehensive testing requirements for closed-app scenarios: - Close app (swipe away), screen off → exact alarm delivers via DailyNotificationReceiver - Exact alarm denied → WorkManager path fires with degraded timing UI - Reboot device with app closed → BootReceiver reschedules idempotently Add corresponding Test Matrix entries: - Closed app delivery: exact alarm path with receiver delivery - Closed app fallback: WorkManager path with degraded timing - Closed app reboot: UPSERT prevents duplicate schedules These criteria ensure closed-app delivery works correctly in both exact alarm and fallback paths, with proper logging and UI feedback. --- docs/android-app-improvement-plan.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/android-app-improvement-plan.md b/docs/android-app-improvement-plan.md index e314ec1..0039221 100644 --- a/docs/android-app-improvement-plan.md +++ b/docs/android-app-improvement-plan.md @@ -967,6 +967,9 @@ interface ScheduleResponse { - [ ] Test UI modularized into scenarios - [ ] At least 2 scenarios run as automated tests - [ ] Instrumentation tests cover critical paths +- [ ] **Close app (swipe away)**, screen off → exact alarm delivers via `DailyNotificationReceiver`; status matrix remains green; log shows `EVT_SCHEDULE_OK` → receiver → notification +- [ ] **Exact alarm denied** → schedule; with app closed and device idle, WorkManager path eventually fires; UI shows "**Degraded timing (Doze)**" and logs `EVT_DOZE_FALLBACK_TAKEN` +- [ ] **Reboot device** with app closed → `BootReceiver` reschedules idempotently (UPSERT key), single notification posts at the next window ### Security - [ ] All PendingIntents are immutable unless mutation is required @@ -1064,6 +1067,9 @@ By following this plan, the test app will become more maintainable, reliable, an | Timezone change | TimeChangeReceiver | Change device timezone | One rehydrated schedule, no duplicates | | Manual clock skew | TimeChangeReceiver | Move clock +10m (no timezone) | Rescheduler recompute without duplicates; status remains green | | Missing small icon | scheduleDailyNotification | No small icon set | Canonical error or logged warning; no silent drop | +| Closed app delivery | scheduleDailyNotification + DailyNotificationReceiver | App closed, screen off | Exact alarm delivers via receiver; log shows `EVT_SCHEDULE_OK` → receiver → notification | +| Closed app fallback | scheduleDailyNotification + WorkManager | App closed, device idle, exact alarm denied | WorkManager fires eventually; UI shows "Degraded timing (Doze)" | +| Closed app reboot | BootReceiver | App closed, device reboot | Single notification posts at next window; UPSERT prevents duplicates | ## Error Codes (canonical)