Update checker stamps update/lastCheck before the check runs — a failed/offline check suppresses retries for 24h #37

Closed
opened 2026-07-12 12:44:54 -04:00 by the_og · 0 comments
Owner

Found in audit of main @ 06326e5.

_maybe_auto_check_updates() (bcc.py ~L1507) writes update/lastCheck = time.time() before starting the worker. If the machine is offline at launch (common: laptop wakes, app auto-starts), the failed check still counts, and no retry happens for 24 h. Repeated offline launches can starve the check indefinitely.

Proposed fix: move the setValue("update/lastCheck", …) into the completion handler, only when release is not None (or at least only when the request completed). Keep the pre-check read/throttle as is.

Acceptance: simulate fetch_latest_release → None at startup: update/lastCheck is not advanced; a subsequent launch checks again. Successful check advances it.

**Found in audit of `main` @ 06326e5.** `_maybe_auto_check_updates()` (`bcc.py` ~L1507) writes `update/lastCheck = time.time()` **before** starting the worker. If the machine is offline at launch (common: laptop wakes, app auto-starts), the failed check still counts, and no retry happens for 24 h. Repeated offline launches can starve the check indefinitely. **Proposed fix**: move the `setValue("update/lastCheck", …)` into the completion handler, only when `release is not None` (or at least only when the request completed). Keep the pre-check read/throttle as is. **Acceptance**: simulate `fetch_latest_release → None` at startup: `update/lastCheck` is not advanced; a subsequent launch checks again. Successful check advances it.
the_og added the P2 label 2026-07-12 12:44:54 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: the_og/better-claude-config#37