Skip to content

Fix usage polling, accounting, and desktop lifecycle bugs - #1

Open
LLRHook wants to merge 3 commits into
mainfrom
codex/sprint-20261022
Open

LLRHook wants to merge 3 commits into
mainfrom
codex/sprint-20261022

Conversation

@LLRHook

@LLRHook LLRHook commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Codex rate-limit-only events could inflate token totals, failed Claude probes retried every polling cycle, and Quit left the daemon running. Preserve cumulative counters, retain useful HTTP 429 measurements, honor Retry-After and failure cooldowns, replace caches atomically, and stop all tray icons and polling together. Harden malformed telemetry handling and keep unavailable percentages unknown.

Run dashboard scans off the Tk thread, coalesce refresh requests, pass results through the UI-owned queue, and cancel callbacks when the window closes.

Coordinate Claude cache updates across processes with a shared file lock. Reload and merge failure metadata under the same lock used for successful writes, preserve measurements saved during an older in-flight request, and avoid applying that older failure's cooldown to the newer success. Track measurement generations so forced refreshes at equal timestamps are distinguishable; preserve the longest cooldown across overlapping failures. Cache lock failures keep the existing file and offline fallback available.

Validation: all 43 offline regression tests pass on Python 3.13.5 in the local timezone, UTC, and Asia/Tokyo; py_compile and git diff checks pass. Seven added cache regressions include deterministic spawned-process interleavings in both completion orders, mutual exclusion for both success and failure writers, equal-timestamp refreshes, cooldown merging, lock failure fallback, and Windows lock cleanup. The older-failure regression was first observed failing on the reviewed implementation (20% overwrote a newly saved 80%). All usage/cache/HTTP inputs are synthetic or mocked. Actual Windows desktop/kernel-lock integration and live OAuth/API calls remain unverified.

Add an offline GitHub Actions workflow for all pull requests and branch pushes. Run the existing unittest suite and py_compile commands on Python 3.11 and 3.13 without installing desktop dependencies or accessing live accounts. Use contents: read, disable persisted checkout credentials, pin checkout v7.0.1 and setup-python v7.1.0 to verified full commit SHAs, and bound each job to ten minutes.

CI wiring validation: all 43 tests and compilation pass in isolated local Python 3.11.14 and 3.13.5 environments; actionlint 1.7.12 and staged diff checks pass. GitHub-hosted execution is pending the parent push.

- Preserve Codex counters across rate-limit-only events and reject malformed telemetry safely.
- Keep valid utilization from rate-limited probes, persist retry cooldowns, and replace caches atomically.
- Coalesce dashboard scans off the Tk thread and cancel scheduled work on close.
- Stop all tray icons and polling on Quit, and keep unknown percentages unknown.
- Add 36 fixture-based regression tests and document offline verification.
- Coordinate Claude cache updates with a portable cross-process lock
- Preserve concurrent measurements and merge failure cooldowns safely
- Add deterministic offline process interleaving regressions
@LLRHook
LLRHook marked this pull request as ready for review October 22, 2026 20:36
- Run offline regressions and compilation on pull requests and branch pushes
- Cover Python 3.11 and 3.13 with read-only permissions and pinned actions
- Document automated regression checks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant