test: extend existing query-parity harness to heartbeat ingestion
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- testing-qa
Research direction
Start from the existing query-parity harness in scripts/tests/query_parity/, which the issue says already launches both servers and normalizes results; read how Server.insert_events is used there. Add a heartbeat sequence path that posts identical payloads with fixed pulsetimes to fresh buckets on both servers, then diff the normalized stored events and flood/merge_events_by_keys outputs. Done when the heartbeat cases pass or each mismatch has a minimal sequence and a linked bug.
Written by the indexing model from the issue text.
Description
Test-first collection-integrity child of #724. Reuse the existing Python/Rust query-parity harness from #1467 (scripts/tests/query_parity/); do not build another server launcher or normalization layer.
The current suite inserts events directly with Server.insert_events. It covers overlap/containment, identical ranges and equal timestamps, and runs flood/merge_events_by_keys, but does not send heartbeat sequences through the collection endpoint. The residual scope is heartbeat ingestion and the analysis of the stored results.
Task
Extend that harness to send identical sequential heartbeat payloads and pulsetimes to fresh buckets on both servers, then read back and compare their normalized stored events. Cover:
- steady identical-data heartbeats;
- a gap beyond pulsetime;
- a data change;
- the exact pulsetime boundary and either side of it;
- same-timestamp/different-duration inputs and contained/overlapping inputs (negative gaps).
Run the existing flood and merge_events_by_keys query templates on the heartbeat-produced events to check downstream parity. Reuse existing overlap fixtures where suitable instead of duplicating the direct-insert transform corpus.
Acceptance
- Both servers receive the same payloads in the same sequential order, with identical pulsetimes, in isolated testing instances and fresh buckets.
- Stored-event results and downstream query results compare through the existing normalization/diff helpers.
- Each mismatch has the smallest heartbeat sequence, pulsetime, server revisions and a linked bug; no unowned xfails.
- Existing direct-insert query-parity cases remain intact. No new fixture-sync mechanism or duplicate startup helpers.
- No production heartbeat changes unless a test first reproduces a defect.
Out of scope: reimplementing the out-of-order replacement fixes (ActivityWatch/aw-server#177 and ActivityWatch/aw-server-rust#555); concurrent requests (tracked separately in #1566); another generic overlap transform suite.
The infrastructure prerequisite is already satisfied by #1467 (merged September 26), not the newly filed duplicate #1567, which has been closed with evidence. Current-master query-parity CI: https://github.com/ActivityWatch/activitywatch/actions/runs/44886830413 (3130 passed, 98 issue-attributed strict xfails).
- Dominant language
- Python
- Stars
- 19.7k
- Forks
- 1.1k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
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/activitywatch
-
Folder created in home directory (clashes with documented location)Possibly taken A pull request linked to this issue is open or already merged. Opentype: bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ActivityWatch/activitywatch#1418 · 5 comments ·
Maintainers usually reply within 4 days
-
type: bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ActivityWatch/activitywatch#1564 · 2 comments ·
Maintainers usually reply within 4 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
ActivityWatch/activitywatch#1563 · 1 comment ·
Maintainers usually reply within 4 days
-
type: bug
Difficulty 3/5 1-2 days Newbie friendliness 54/100
ActivityWatch/activitywatch#1538 · 7 comments ·
Maintainers usually reply within 4 days
-
type: bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
ActivityWatch/activitywatch#1537 · 4 comments ·
Maintainers usually reply within 4 days
All issues in ActivityWatch/activitywatch
Similar issues
-
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
-
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
-
bot-triaged module: correctness (silent) module: cpu module: empty tensor module: loss triage review
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
request-theme
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
LizardByte/ThemerrDB#10167 · 1 comment ·