Skip to content

test(server): guard long-event overlap consumers - #215

Draft
TimeToBuildBob wants to merge 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:test/long-event-overlap
Draft

TimeToBuildBob wants to merge 2 commits into
ActivityWatch:masterfrom
TimeToBuildBob:test/long-event-overlap

Conversation

@TimeToBuildBob

Copy link
Copy Markdown
Contributor

Summary

Integration regressions for #213 and ActivityWatch/aw-core#194; depends on core repair ActivityWatch/aw-core#197.

Adds real Flask HTTP tests against a disposable Peewee database for a 48-hour event queried wholly inside its second day:

  • bounded event GET and count;
  • actual CSV body row;
  • AQL sum_durations(query_bucket(...)) and query_bucket_eventcount(...).

The tests preserve existing clipped Peewee behavior (one-hour interior result), not full-duration AQL semantics. Reads must not alter the stored 48-hour event. make test explicitly runs the new file, so it cannot silently miss CI.

Verification

  • Against fetched core master c7821899 and server master 994ea98: all four regressions fail with missing rows/zero counts.
  • With core repair 0bd7f67 on PYTHONPATH: 4 passed.
  • Owning make test with repaired core: 148 passed; make typecheck: 32 files clean.
  • Explicit local server test files excluding network-dependent test_client.py: 231 passed with repaired core.
  • Black check and hook-enabled commit clean. No real listener/history touched.

Deliberate merge gate

Draft until an aw-core dependency containing ActivityWatch/aw-core#197 is available and adopted. The locked aw-core 0.5.18 still has the defect, so these tests are expected RED with the unmodified lock. Do not merge a test suite that requires an unshipped dependency. No server production-code change or temporary version skip is proposed; the required follow-through is update the dependency/lock after a containing core release, replay this suite, then mark ready.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] No new issues were found; the stated dependency merge gate should remain in place.

Summary

Adds four HTTP regression cases for a 48-hour event queried inside its second day.

  • Long-event checks run with the server's regular tests.

Reviews (2) · Last reviewed commit: "test(server): verify long-event reads pr..." · Reviewed by Greptile

Comment thread tests/test_long_event_overlap.py Resolved
Git-Session-Id: d8a22e8f-4386-4789-bab9-5ddd743d4b08
Git-Session-Id: 4cb0ead5-8800-5d0b-ae25-627bf2fd2fdf
@TimeToBuildBob
TimeToBuildBob force-pushed the test/long-event-overlap branch from e5cae17 to 61c0430 Compare November 6, 2026 15:41
@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

@greptileai review

@TimeToBuildBob

Copy link
Copy Markdown
Contributor Author

Rebased onto current master f2aec9707b63aeb4c6f8dd40430bf5a992a4ea4e (includes the Ubuntu 24.04 pin in 5e0ae8f). Removed the redundant runner hunk from the mixed preservation-test commit; all test and Makefile changes are byte-for-byte unchanged from the previous head. New head: 61c0430ac5c17ab2e9a2a66d78b83a673613aef0.

There is now no .github diff against master. Both Linux jobs inherit Ubuntu 24.04 and master’s action versions. Local Python 3.13 verification: the four overlap regressions still fail with aw-core 0.5.18, reproducing the documented dependency gate; with repaired core 0bd7f67 supplied on PYTHONPATH, full existing make test passes 148 tests, including all four regressions. No dependency/lock change or test skip was added. This PR stays draft pending adoption of a containing core release.

Force-with-lease push completed with hooks enabled; the Greptile helper accepted one fresh review request for this exact head. Latest-head CI/review is pending; no merge performed.

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