Commit Graph

8 Commits

Author SHA1 Message Date
Matthew Raymer
92210398ae docs: apply surgical edits to harden edge-cases and clarify behavior
Implementation plan hardening:
- Document force-stop limitation: system cancels alarms until next explicit launch
- Add force-stop test case: no delivery until launch, then rescheduler restores schedules
- Make Doze degradation unmistakable: fixed string badge 'Degraded (Doze)' with EVT_DOZE_FALLBACK_TAKEN
- Freeze PendingIntent flags rule as Security AC: FLAG_IMMUTABLE unless mutation required

Analysis doc clarification:
- Add closed vs force-stopped distinction: closing/swiping doesn't affect alarms, force-stopping cancels them

These edits harden edge-cases around force-stop behavior and make Doze degradation UI requirements crystal clear for QA testing.
2025-10-24 11:13:48 +00:00
Matthew Raymer
aa53991a4b docs: apply tight delta edits for correctness, resilience, and reviewer clarity
Implementation plan upgrades:
- Add timezone & manual clock change resilience: TimeChangeReceiver with TIME_SET/TIMEZONE_CHANGED
- Codify PendingIntent flags security: FLAG_IMMUTABLE vs FLAG_MUTABLE with examples
- Add notification posting invariants: channel validation and small icon requirements
- Clarify battery optimization UX limits: no ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS prompt
- Move MAX_RESPONSE_SIZE to config: Config.NETWORK_MAX_RESPONSE_SIZE with diagnostics inclusion
- Make Room migrations testable: fallbackToDestructiveMigration(false) test requirement
- Enforce event IDs in PR checklist: CI lint script validation for Log. calls
- Make degraded mode UI unmissable: visual badge + one-tap link to exact-alarm settings
- Add channelId snapshot to diagnostics: include channelId, importance, areNotificationsEnabled()
- Add manual clock skew test case: +10m clock move without timezone change

Analysis doc correctness polish:
- Add safe Application class example: show minimal <application> without android:name
- Show minimal BOOT_COMPLETED example: remove android:priority attribute
- Tighten WAKE_LOCK guidance: revisit only if introducing foreground services
- Mirror Cordova guard in Build Config: already present (no change needed)
- Add error surfaces to Mermaid flow: annotate @PluginMethod and Use Case Handler with → Canonical Error

All changes maintain existing structure with surgical precision edits for correctness, resilience, and reviewer clarity.
2025-10-24 11:05:18 +00:00
Matthew Raymer
0bef820d0c docs: apply pin-point delta edits for correctness, consistency, and reviewer friction
Implementation plan improvements:
- Fix event name consistency: DOZE_FALLBACK → EVT_DOZE_FALLBACK_TAKEN in Test Matrix
- Lock receiver export policy as AC: only BootReceiver exported
- Handle unknown Content-Length: add streaming guard for -1 responses
- Ensure single joined error mirrors AC: validation failures return one joined message
- Add webDir echo and device idle hint to diagnostics: include webDir path and isDeviceIdleMode
- Make degradation visible in UI AC: matrix shows 'Degraded timing (Doze)' when fallback active
- Add Room migrations guard: no-op migration and fallbackToDestructiveMigration(false) test

Analysis doc improvements:
- Trim WAKE_LOCK guidance: not required unless explicitly acquiring/releasing wakelocks
- Add Boot receiver priority note: android:priority has no effect for BOOT_COMPLETED
- Fix application android:name accuracy: only set if custom Application class exists
- Mirror Cordova compat note in Build section: include only when using Cordova plugins
- Annotate Mermaid flow with canonical errors: show where canonical errors are produced
- Link Truth Table to test UI buttons: integrate with Open Channel/Exact Alarm Settings buttons

All changes maintain existing structure with surgical precision edits.
2025-10-24 10:56:49 +00:00
Matthew Raymer
eb2ab62a58 docs: apply pin-point delta edits for correctness and polish
Analysis doc improvements:
- Add exact-alarm clarifier box: SCHEDULE_EXACT_ALARM is special app-op, not runtime permission
- Add WAKE_LOCK usage tip: typically unnecessary with AlarmManager/WorkManager
- Guard Cordova compat dependency: use debug/releaseImplementation with transitive=false
- Add exported defaults reminder to manifest excerpt
- Add asset path wording clarification: webDir → src/main/assets/public/
- Clarify POST_NOTIFICATIONS scope: required on Android 13+, ignored on lower APIs

Implementation plan improvements:
- Add Doze/Idle acceptance signal to Phase 1 DoD: UI surfaces 'Degraded timing (Doze)'
- Add receiver export policy to PR checklist: only BootReceiver exported
- Add ProGuard/R8 keep rules: prevent Capacitor annotations from being stripped
- Enhance diagnostics payload: include appId, version, device info, API level, timezone, config, status fields, event IDs
- Add negative schema case to Test Matrix: catches drift at JS boundary
- Add channel invariants to acceptance criteria: missing/disabled channel returns proper errors
- Add boot reschedule duplicate shield: unique key with UPSERT semantics
- Add network client hard limits to AC: HTTPS-only, timeouts ≤ 30s, content ≤ 1MB

All changes maintain existing structure with surgical precision edits.
2025-10-24 10:52:01 +00:00
Matthew Raymer
6eb5d63107 docs: apply precise fixes for correctness, consistency, and sprintability
Analysis doc improvements:
- Unify runtime naming: fix tree diagram cordova.js → capacitor.js
- Make manifest receivers explicit: add exported attributes and intent filters
- Surface exact-alarm user rule: add decision rule for QA/ops reasoning
- Guard Cordova dependency: add note about Cordova shims requirement
- Add error surfacing to runtime flow: show validation and use-case error paths
- Add auto-generated note to capacitor.plugins.json section

Implementation plan improvements:
- Add diagnostics button to Phase 1 DoD
- Add Doze/Idle case to Test Matrix for false negative prevention
- Make unknown field rejection explicit acceptance criterion
- Link receivers export policy to Manifest Hygiene checklist
- Add event ID requirement to PR checklist for grep-able logs

All changes maintain existing structure with surgical precision edits.
2025-10-24 10:46:24 +00:00
Matthew Raymer
0313aacfd4 docs: apply surgical corrections for correctness and clarity
Analysis doc improvements:
- Add accuracy note for Capacitor vs Cordova runtime naming
- Declare 5 required Status Matrix fields verbatim in Bridge Surface
- Add Manifest Hygiene checklist to Build Configuration section

Implementation plan improvements:
- Fix BOOT_COMPLETED permission wiring (top-level permissions, not receiver attribute)
- Add user-visible Exact-Alarm Decision Rule for QA/ops reasoning
- Add 2 ops-grade error cases: E_CHANNEL_MISSING, E_BAD_CONFIG
- Add Preflight Golden Path (Demo) to Runbooks for 30-second sanity checks
- Clamp text lengths at JS boundary with unknown field rejection
- Declare minimal Event IDs for deterministic grep operations

All changes maintain existing structure with surgical precision edits.
2025-10-24 10:24:02 +00:00
Matthew Raymer
0a1e6a16f5 docs: add operational sections to Android app analysis and implementation plan
- Add 5 surgical sections to android-app-analysis.md:
  * Assumptions & Versions table (Android SDK, Capacitor, WorkManager, Room, Exact Alarms)
  * Bridge Surface summary with method I/O shapes
  * Permission & Settings Truth Table (symptoms → actions)
  * Runtime Flow Diagram (mermaid)
  * Cordova vs Capacitor assets accuracy note

- Add 6 execution rails to android-app-improvement-plan.md:
  * Phase DoD blocks for PR gating
  * RACI for multi-contributor PRs
  * PR Checklist template
  * Test Matrix from scenarios
  * Error Code Canon table
  * Operational Runbooks stubs

- Fix accuracy: correct 'cordova.js' references to 'capacitor.js'
- Make Status Matrix required fields explicit (5 specific fields)
- Keep existing structure intact, minimal churn approach
2025-10-24 10:09:00 +00:00
Matthew Raymer
9ff5a8c588 docs: add comprehensive Android app analysis and improvement plan
- Add android-app-analysis.md: detailed analysis of /android/app structure and /www integration
- Add android-app-improvement-plan.md: phase-based implementation plan for architecture improvements
- Add chatgpt-analysis-guide.md: structured prompts for AI analysis of Android test app
- Update README.md: add links to new documentation files

These documents provide comprehensive guidance for understanding and improving the DailyNotification Android test app architecture.
2025-10-24 09:42:10 +00:00