query(cache=False) omits bypass and uses the server cache

Open
#153 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 10 days

@TimeToBuildBob is already working on this.

Since Oct 28, 2026.

  • #154 by @TimeToBuildBob — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
python

Research direction

Start at ActivityWatchClient.query and inspect the captured _post arguments described in the issue; the payload does not name a file or test. Reproduce the cache=False request and add a regression for its wire encoding, then check Python and Rust server compatibility. Done means default and explicit cache=False bypass caching while named cache=True keeps working; pull request #154 is already open.

Written by the indexing model from the issue text.

Description

On current master c88cf12c6fb122447157c183322eb2b5c12e6266, ActivityWatchClient.query(..., cache=False) sends neither a cache query parameter nor a body cache value. The Python server defaults omission to enabled caching, so the client's default false is ignored.\n\nReproduced by capturing the actual query method's _post arguments: params={} and body contains only query/timeperiods. An offline Flask/MemoryStorage replay with synthetic RETURN = 17; requests records one cache miss then one hit for two cache=False calls; explicit body false leaves counters unchanged. This is ignored bypass, not a claim of stale/corrupt data.\n\nExpected: default and explicit cache=False bypass caching. Named cache=True retains caching; unnamed cache=True and naive datetime validation remain unchanged. Fix scope is client wire encoding plus regressions, with Python/Rust server compatibility checked.

Dominant language
Python
Stars
73
Forks
76
Avg merge
8d 13h
Merged PRs (30d)
17

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ActivityWatch/aw-client

All issues in ActivityWatch/aw-client

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.