Peewee range queries omit accepted events longer than 24 hours
Maintainers usually reply within 10 days
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reading _where_range and the PeeweeStorage range query, then inspect the regression tests for bounded reads and counts. Reproduce the supplied 48-hour event case with the Flask test client and a disposable database. Done means overlapping events remain included with the stated inclusive boundaries and UTC normalization, with regression coverage and the ordinary-query performance trade-off measured.
Written by the indexing model from the issue text.
Description
PeeweeStorage accepts a 48-hour event but omits it from reads and counts inside its second day. Reproduced on master c7821899ab38c1a39c87d7bf011c22a78de9b205 with a disposable database through aw-server's Flask test client: insert 2026-10-01T00:00:00Z, duration 172800; unbounded GET returns the event, while start=2026-10-02T12:00:00Z and end=2026-10-02T13:00:00Z returns [] and count 0. The timestamp >= start - 24h prefilter in _where_range drops the row before the true overlap predicate. This also affects bounded CSV/AQL consumers. Expected: accepted events whose end is >= start and timestamp <= end remain included, preserving existing inclusive boundaries and UTC normalization. Scope: regression tests and correct inclusion without new duration limits, schema migration or stored-history changes; measure the ordinary-query performance trade-off.
- Dominant language
- Python
- Stars
- 65
- Forks
- 74
- Avg merge
- 7d 7h
- Merged PRs (30d)
- 11
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-core
-
chunk_events_by_key: gap/pulsetime check is broken (events[-1] is always the last event)Possibly taken @TimeToBuildBob claimed this 5 days ago. Openbug
Difficulty 4/5 1-2 days Newbie friendliness 45/100
ActivityWatch/aw-core#205 · 1 comment ·
Maintainers usually reply within 10 days
-
Peewee explicit event IDs can move events between bucketsPossibly taken @TimeToBuildBob claimed this 26 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
ActivityWatch/aw-core#195 ·
Maintainers usually reply within 10 days
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
ActivityWatch/aw-core#174 ·
Maintainers usually reply within 10 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ActivityWatch/aw-core#78 · 4 comments ·
Maintainers usually reply within 10 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
ActivityWatch/aw-core#52 · 4 comments · 3 reactions ·
Maintainers usually reply within 10 days
All issues in ActivityWatch/aw-core
Similar issues
-
bug docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ActivityWatch/docs#223 ·
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capturePossibly taken @jianyx1 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#8354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
Maintainers usually reply within 1 day
-
comp/tools P2 tool/skills type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#159541 ·
Maintainers usually reply within 1 day