Skip to content

chore(transform): deprecate chunk_events_by_key - #758

Merged
ErikBjare merged 2 commits into
masterfrom
chore/deprecate-chunk-events-by-key
Oct 6, 2026
Merged

ErikBjare merged 2 commits into
masterfrom
chore/deprecate-chunk-events-by-key

Conversation

@ErikBjare

@ErikBjare ErikBjare commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Decided in ActivityWatch/activitywatch#1466: chunk_events_by_key is deprecated in both servers, with its behavior kept for now.

  • Nothing first-party calls it: aw-webui and aw-client don't. aw-webui's only subevents reader (TimelineInspect.vue) is registered but never used.
  • This version never supported the subevents that aw-core's version produces, so the two servers return differently shaped data for it anyway.
  • merge_events_by_keys is the closest alternative, but it isn't a drop-in replacement: it merges all events with the same value, also across gaps. The deprecation note says so rather than recommending it.

Changes:

  • aw_transform::chunk_events_by_key is #[deprecated] with a doc note. The re-export, the query function and the unit test have #[allow(deprecated)], so clippy -D warnings stays clean.
  • The chunk_events_by_key query function logs a warning once per process, since queries run repeatedly (for example on every dashboard refresh).

The aw-core counterpart (a DeprecationWarning plus a docstring note) is in the aw-core PR for #1466.

cargo clippy -p aw-transform -p aw-query -- -D warnings and cargo test -p aw-transform chunk pass locally.

Decided in ActivityWatch/activitywatch#1466: nothing first-party uses it,
it never supported the subevents aw-core's version produces, and
merge_events_by_keys covers the use case. Mark the transform #[deprecated]
and log a warning when a query calls it. Behavior is unchanged.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T23:58:25.056772Z 1dc6821 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Marks a query function as deprecated.

The PR appears safe to merge; no outstanding finding or new actionable issue was identified.

Summary

The PR deprecates chunk_events_by_key without changing its transform behavior.

  • The query function now logs one process-wide deprecation warning.
  • The warning, documentation, and deprecation note clarify that merge_events_by_keys is not a drop-in replacement.

Reviews (2) · Last reviewed commit: "chore(transform): warn once about chunk_..."

Comment thread aw-query/src/functions.rs Outdated
@TimeToBuildBob

TimeToBuildBob commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI code review

This PR deprecates chunk_events_by_key in aw-transform and aw-query. It adds #[deprecated] to the aw-transform function, adds #[allow(deprecated)] to the re-export, query function, and test module, and adds a one-time log warning in the query function. The behavior of the function itself is unchanged.

Safe to merge — no P0/P1 findings

Confidence 5/5

✅ No findings. The diff looks correct to me on this pass.

Files changed (3) — the diff as I read it
  • aw-query/src/functions.rs — Adds #[allow(deprecated)] and a one-time log::warn! deprecation warning to the chunk_events_by_key query function.
  • aw-transform/src/chunk.rs — Adds #[deprecated] attribute and expanded doc comment to chunk_events_by_key; adds #[allow(deprecated)] to the test module.
  • aw-transform/src/lib.rs — Adds #[allow(deprecated)] to the re-export of chunk_events_by_key.
Previous review passes
commit score findings engine when
49e4a4dc6b2e 5/5 0 llm 2026-09-26 22:06 UTC

Reviewed 1dc6821d0ba8 · openrouter/deepseek/deepseek-v4-flash-0731 · llm engine · 26s · about this reviewer

Maintainer commands

@TimeToBuildBob review (own line) — fresh review · @TimeToBuildBob fix — a worker acts on the findings. Once per comment; 👀 = received.

…ted replacement

Queries run repeatedly (dashboard refreshes), so log the deprecation
warning once per process. merge_events_by_keys isn't a drop-in
replacement (it merges across gaps), so say so instead of recommending it.
Same wording as aw-core (from the review of ActivityWatch/aw-core#173).
@ErikBjare

Copy link
Copy Markdown
Member Author

@greptileai review

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.

2 participants