# Phase 3 – Boot-Time Recovery Verification **Plugin:** Daily Notification Plugin **Scope:** Boot-Time Recovery (Recreate Alarms After Reboot) **Related Docs:** - `android-implementation-directive-phase3.md` - `PHASE3-EMULATOR-TESTING.md` - `test-phase3.sh` - `000-UNIFIED-ALARM-DIRECTIVE.md` --- ## 1. Objective Phase 3 confirms that the Daily Notification Plugin: 1. Reconstructs all daily notification alarms after a **full device reboot**. 2. Correctly handles **past** vs **future** schedules: - Past: mark as missed, schedule next occurrence - Future: simply recreate alarms 3. Handles **empty DB / no schedules** without misfiring recovery. 4. Performs **silent boot recovery** (no app launch required) when schedules exist. 5. Logs a consistent, machine-readable summary: - `scenario` - `missed` - `rescheduled` - `verified` - `errors` Verification is performed via the emulator harness: ```bash cd test-apps/android-test-app ./test-phase3.sh ``` --- ## 2. Test Matrix (From Script) | ID | Scenario | Script Test | Expected Behavior | Result | Notes | | --- | --------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------ | ----- | | 3.1 | Boot with Future Alarms | TEST 1 – Boot with Future Alarms | `scenario=BOOT`, `rescheduled>0`, `errors=0`; alarms present after boot | ☐ | | | 3.2 | Boot with Past Alarms | TEST 2 – Boot with Past Alarms | `missed>=1` and `rescheduled>=1`, `errors=0`; past schedules detected and next occurrences scheduled | ☐ | | | 3.3 | Boot with No Schedules (Empty DB) | TEST 3 – Boot with No Schedules | Either no recovery logs **or** explicit "No schedules found/present" or `scenario=NONE` with `rescheduled=0`, `errors=0` | ☐ | | | 3.4 | Silent Boot Recovery (App Never Opened) | TEST 4 – Silent Boot Recovery (App Never Opened) | `rescheduled>0`, alarms present after boot, and no user launch required; `errors=0` | ☐ | | Fill **Result** and **Notes** after running `test-phase3.sh` on your baseline emulator/device. --- ## 3. Expected Log Patterns The script filters logs with: ```bash adb logcat -d | grep "DNP-REACTIVATION" ``` ### 3.1 Boot with Future Alarms (3.1 / TEST 1) * Typical logs: ```text DNP-REACTIVATION: Starting boot recovery DNP-REACTIVATION: Loaded schedules from DB DNP-REACTIVATION: Rescheduled alarm: daily_ for