Repository navigation
Combine Hermes messages and active-work notifications - #209
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
API 35 readiness failure correctedThe failing Settings cold-start fixture queried semantics before any Compose root existed, so its polling predicate threw immediately instead of waiting. Commit Regression evidence: the cold-start fixture now first queries before activity launch. Restoring the original default query produced the same Verification: Not covered: no new physical-device or live-server check. The original full API 36 CI suite passed on the parent commit; the updated CI run must be read back separately. This fixes the test's missing-root readiness handling, not a proven product-side Settings defect. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Full CI follow-upThe corrected full API 35 job passed in run 43751655661 on Commit Verification: the complete HermesNotificationPresenterTest class passes on an actual API 36 emulator. Deliberately removing production removal of dead actions makes the restart regression fail (RED); restoring it passes (GREEN). Markdown/diff checks pass; independent read-only review of the exact correction SHA found no significant issues. The preceding full local API 35 suite passed all 228 cases with zero failures and two skips. The new full API 35/36 CI run is pending; neither merge nor release is claimed. |
What changed
Hermes now uses one notification for its Settings shortcut, background WebUI work and latest browser message, rather than leaving a second idle shortcut behind.
No new permission, JavaScript bridge, native chat history or official Webapp reply adapter. Alerts received during approval intentionally remain read-only: clearing approval does not prove that the session is idle again. Update/download and opt-in debug-capture notifications remain separate.
Fixes #208.
Testing
Final local verification on
6cdab6d56215751a4c59cc86d69de47e3ac389e5passes:.\gradlew.bat testDebugUnitTest lintDebug assembleDebug connectedDebugAndroidTest '-Pandroid.testInstrumentationRunnerArguments.class=com.hermeswebui.android.notification.HermesNotificationPresenterTest,com.hermeswebui.android.notification.NotificationReplyInstrumentationTest,com.hermeswebui.android.background.HermesSessionMonitorInstrumentationTest,com.hermeswebui.android.ui.settings.SettingsScreenTest' --no-daemon --console=plain— passed; 47 actual API 35 instrumentation cases, JVM suite, lint and debug APK build.HermesNotificationPresenterTest: actual activity foreground/background/Settings/finish lifecycle, one latest-message slot across tags, stale dismissal fencing, token-specific tap identity, actual MainActivity tap delivery, quiet channel, compact Settings, and a simulated process-state reset reconciled against Android's retained notification.NotificationReplyInstrumentationTest: actual RemoteInput broadcast plus loopback authenticated HTTP; exactly-once/mount/session routing, server/expiry rejection and delayed-result fencing.HermesSessionMonitorInstrumentationTest: actual Android foreground service, loopback SSE/approvals, approval priority, passive-update no-repost, distinct tap route, unread-message preservation, and retained terminal failures/completions.SettingsScreenTest: rendered Notifications section and actual outbound Android notification-settings intent for this package, plus existing Settings regressions.python -m unittest discover -s tools\tests -p 'test_*.py'— passed, 121 tests.python tools\check_markdown.py— passed, 26 files.git diff --check— passed.Mutation checks: deliberately removed the visible-activity gate, stale-dismiss token check, approval priority, message preservation during service teardown, compact action label, separate service/message PendingIntent request codes, passive-repost suppression, and correct Android Settings package target. Matching tests failed at the expected assertions. Independent review then caught unread-process-restart, unavailable-reply feedback, stale-tap and hidden-terminal-result gaps; additional restoration, token-identity and terminal-result mutations each failed at their matching assertions. All mutations were restored and the final 47-case run is green. The expired-action path now reports unavailable without posting a second notification. A transient first validation run failed because Instrumentation start-activity hooks do not intercept PendingIntent delivery; the test was corrected to observe the real resumed MainActivity instead. The older terminal test was updated to require retained completion followed by explicit dismissal rather than immediate result deletion.
Independent review: read-only review of the initial implementation reported five findings. Four were fixed; the approval-time Reply restriction is deliberate fail-closed behavior, documented above. Follow-up review of exact final SHA
6cdab6d56215751a4c59cc86d69de47e3ac389e5found no significant issues.API 35 CI follow-up: the first full CI run had 228 tests, one failure and two skips: the Settings cold-start fixture threw on an absent Compose root before its polling deadline. Commit
d42597f6abee50a40ca9c7c06f4f847141fcd84euses supported empty-root semantics queries for both Settings deep-link readiness checks and explicitly exercises the no-root state before launching the activity. Reverting that query flag reproduced the exact CI exception (RED); restoration passed both focused cases and.\gradlew.bat connectedDebugAndroidTest --no-daemon --console=plain(GREEN), the full unfiltered local API 35 suite: 228 tests, zero failures, two skipped. Markdown and diff checks pass. Independent exact-commit review found no significant issues. No product behavior, wait deadline, required Settings content or CI scope was weakened. Updated GitHub CI is pending; the prior API 36 run passed on the parent commit.Manual device check: no manual physical-device check; actual API 35 emulator notification/RemoteInput/activity/service interactions ran through instrumentation.
Not covered: live authenticated WebUI conversation, physical/OEM layout or dismissal, actual OS process-kill round trip (restart fixture resets process-local state), TalkBack playback of the speech label, API 36 locally, prolonged background suspension, production update/install flows, or official Webapp direct reply. Full local API 35 now passes as recorded above. PR CI remains the authoritative source for the GitHub-hosted API 35/36 suites; it is not claimed green before readback.
.\gradlew.bat testDebugUnitTest --no-daemon.\gradlew.bat lintDebug --no-daemon.\gradlew.bat assembleDebug --no-daemonpython -m unittest discover -s tools/tests -p "test_*.py"andpython tools/check_markdown.pyconnectedDebugAndroidTeston an emulator, or note why it was skipped (CI runs API 35 and 36 for Android changes)QA checklist
tools/qaagainst a real server, and the redactedreport.mdsummary is pasted below (or marked not applicable).README.md,ROADMAP.md,ARCHITECTURE.md, andAGENTS.mdare updated where behavior, setup, architecture, or workflow changed.enhancement,user-facing,bug,documentation,skip-changelog).Live QA summary (if applicable)
Not applicable to injected-script QA: no JavaScript/shim changes. No live-server acceptance claimed. Follow-up coverage limits are logged in #208.
🤖 Generated with GitHub Copilot