NotifyWorker treats a failed category query as zero time and reports success
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start with parseCategorySeconds in workers/NotifyWorker.kt:203-229 and the failing NotifyWorkerExecutionTest described in the issue. Check how the function handles the androidQuery response when it contains an error object, then run the test with {"error":"x"} as the fake backend response. Done means the query failure surfaces so the worker returns Result.retry() instead of reporting success.
Written by the indexing model from the issue text.
Description
When the native query fails, NotifyWorker treats the day as zero time and returns Result.success(). Category alerts for that run are skipped and nothing records the failure.
parseCategorySeconds (workers/NotifyWorker.kt:203-229) passes the androidQuery result to JSONArray(...). On a query failure the native side returns {"error": "…"} instead (aw-server-rust aw-server/src/android/mod.rs, create_error_object). This happens, for example, when the aw-watcher-android bucket is missing, when a category regex doesn't compile, or when the datastore errors. The exception is logged and swallowed, and the function returns {null: 0.0}. No threshold can be crossed, so the worker reports success instead of retry().
Failing test (NotifyWorkerExecutionTest, using its fake backend): make androidQuery return {"error":"x"} and expect Result.retry(). Today the result is Result.success(). At the unit level:
@Test
fun queryErrorObjectIsNotZeroSeconds() {
assertThrows(Exception::class.java) { parseCategorySeconds("""{"error":"x"}""") }
}
It fails today because the function returns {null=0.0}.
Fix direction: detect the error object and surface it as a failure, so the existing retry/backoff path runs.
Same parse pattern as the widget issue #430; filed separately because the symptom and fix site differ.
Priority: medium (alerts silently skipped). This repo only has a priority: high label, so no priority label is set.
fingerprint: workers/NotifyWorker.kt — androidQuery error object counted as 0 seconds, success instead of retry
Found by code review on master 3b820d61. I verified the trigger path against aw-server-rust 67432e66. I have not run it on a device.
- Dominant language
- Kotlin
- Stars
- 291
- Forks
- 73
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 27
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ActivityWatch/aw-android
-
WebWatcher: keyboard events still split visits in detected browsers (browserIsActiveWindow checks only the hard-coded list)Possibly taken @TimeToBuildBob claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ActivityWatch/aw-android#435 ·
Maintainers usually reply within 2 days
-
Widget ignores short hex category colors (#CCC), so Uncategorized gets a fallback colorPossibly taken @TimeToBuildBob claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
ActivityWatch/aw-android#433 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ActivityWatch/aw-android#430 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ActivityWatch/aw-android#383 · 2 comments ·
Maintainers usually reply within 2 days
-
Web watcher: add support for Brave (`com.brave.browser` missing from KNOWN_BROWSER_PACKAGES)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ActivityWatch/aw-android#306 · 1 comment · 2 reactions ·
Maintainers usually reply within 2 days
All issues in ActivityWatch/aw-android
Similar issues
-
Area: Java bug report needs triage OS: Windows
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
actions/runner-images#15458 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nwverse/persona#22164 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
valkey-io/valkey-glide#8000 ·
Maintainers usually reply within 2 days
-
Declare two limitations the 2026-12-02/03 plausibility runs confirmed: Huxleys ticket link, Gretchen flyerPossibly taken A pull request linked to this issue is open or already merged. Openafk-ok area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
enorm-labs/event-junkie#5887 ·
Maintainers usually reply within 1 day