feat(worker): Filter test analytics by commit timestamp#789
feat(worker): Filter test analytics by commit timestamp#789sentry[bot] wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| any_failures, all_tests_passed = get_test_status(commit.repoid, commit.commitid) | ||
| any_failures, all_tests_passed = get_test_status( | ||
| commit.repoid, commit.commitid, commit.timestamp | ||
| ) |
There was a problem hiding this comment.
Future commit dates hide failing tests
Medium Severity
get_test_status now filters TA rows using commit.timestamp. If a commit has a future-skewed Git timestamp, all uploaded test rows can fall before that bound and be excluded. This makes any_failures false and allows notifications to proceed even when tests actually failed.
Additional Locations (1)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #789 +/- ##
=======================================
Coverage 92.25% 92.25%
=======================================
Files 1305 1305
Lines 47994 47995 +1
Branches 1636 1636
=======================================
+ Hits 44276 44277 +1
Misses 3407 3407
Partials 311 311
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |


Fixes WORKER-VPM. The issue was that:
get_test_statuscallsget_pr_comment_aggwithoutlower_bound_timestamp, forcing unoptimized TimescaleDB query.get_test_statusto accept an optionallower_bound_timestampparameter.lower_bound_timestamptoget_pr_comment_aggto filter test analytics data.notify_upload_completetask to passcommit.timestampwhen callingget_test_status.This fix was generated by Seer in Sentry, triggered by Tom Hu. 👁️ Run ID: 12643372
Not quite right? Click here to continue debugging with Seer.
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
Note
Medium Risk
Touches the notification gating path by changing how Test Analytics pass/fail is computed, which could alter when notifications are skipped if timestamps are wrong or missing. Otherwise the change is small and primarily affects query scope/performance.
Overview
Test Analytics status checks are now time-bounded.
get_test_statusaccepts an optionallower_bound_timestampand forwards it toget_pr_comment_aggso Timescale queries can ignore older rows.NotifyTask.run_impl_within_locknow passescommit.timestampintoget_test_status, ensuring pass/fail status (and the decision to skip notifications on failures) is computed only from data at/after the commit’s timestamp.Written by Cursor Bugbot for commit 8b0e4a3. This will update automatically on new commits. Configure here.