Premium Analytics: align Stats normalizers with legacy rows#49877
Conversation
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Review-cycle summary -
|
| Source | Comment | Resolution |
|---|---|---|
| Claude | #4785396806 | Added a regression test for the referrers canSpam URL branch, also pinning single-result label vs spam-domain behavior. |
Unaddressed human comments: None.
CI: all required checks passing.
chihsuan
left a comment
There was a problem hiding this comment.
Thanks @kangzj LGTM!
One non-blocking thought: Could the new conditionals get a few negative-case tests?
the new conditionals are tested positive-only. A actions: [] assertion for the no-url case (top-authors/video-plays) and a negative canSpam case (url excludes item.name) would catch an over-broad condition later. Not blocking.
|
Addressed Chihsuan's review in #49877 (review). Added negative-case coverage for:
Verification:
|
Fixes #
Proposed changes
Related product discussion/links
Does this pull request change what data or activity we track or use?
No. This only adjusts client-side normalization of existing Stats API response data.
Testing instructions
pnpm --dir projects/packages/premium-analytics test --runInBand projects/packages/premium-analytics/packages/data/src/processing/stats.pnpm --dir projects/packages/premium-analytics typecheck.pnpm run lint-file projects/packages/premium-analytics/packages/data/src/processing/stats/referrers.ts projects/packages/premium-analytics/packages/data/src/processing/stats/top-authors.ts projects/packages/premium-analytics/packages/data/src/processing/stats/clicks.ts projects/packages/premium-analytics/packages/data/src/processing/stats/video-plays.ts projects/packages/premium-analytics/packages/data/src/processing/stats/__tests__/referrers.test.ts projects/packages/premium-analytics/packages/data/src/processing/stats/__tests__/top-authors.test.ts projects/packages/premium-analytics/packages/data/src/processing/stats/__tests__/clicks.test.ts projects/packages/premium-analytics/packages/data/src/processing/stats/__tests__/video-plays.test.ts --max-warnings=0.pnpm --dir projects/packages/premium-analytics test --runInBand.