NotifyWorker treats a failed category query as zero time and reports success
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 84/100
Hướng nghiên cứu
Bắt đầu với parseCategorySeconds trong workers/NotifyWorker.kt:203-229 và NotifyWorkerExecutionTest đang thất bại được mô tả trong issue. Kiểm tra cách hàm xử lý phản hồi androidQuery khi phản hồi chứa một đối tượng lỗi, sau đó chạy kiểm thử với {"error":"x"} làm phản hồi giả từ backend. Công việc hoàn tất khi lỗi truy vấn được thể hiện và worker trả về Result.retry() thay vì báo thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Kotlin
- Star
- 291
- Fork
- 73
- Merge trung bình
- 4 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ActivityWatch/aw-android
-
WebWatcher: keyboard events still split visits in detected browsers (browserIsActiveWindow checks only the hard-coded list)Có thể đã có người làm @TimeToBuildBob đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ActivityWatch/aw-android#435 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Widget ignores short hex category colors (#CCC), so Uncategorized gets a fallback colorCó thể đã có người làm @TimeToBuildBob đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ActivityWatch/aw-android#433 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ActivityWatch/aw-android#430 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ActivityWatch/aw-android#383 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Web watcher: add support for Brave (`com.brave.browser` missing from KNOWN_BROWSER_PACKAGES)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ActivityWatch/aw-android#306 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của ActivityWatch/aw-android
Issue tương tự
-
Area: Java bug report needs triage OS: Windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
actions/runner-images#15458 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nwverse/persona#22164 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
(core): a cluster client ignores insecure TLS when a CA certificate or client identity is setĐang mởbug 🐞
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
valkey-io/valkey-glide#8000 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Declare two limitations the 2026-12-02/03 plausibility runs confirmed: Huxleys ticket link, Gretchen flyerCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởafk-ok area:data-quality importer size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
enorm-labs/event-junkie#5887 ·
Maintainer thường phản hồi trong vòng 1 ngày