feat(comment-commands): auto suggest reviewers on pr open/update via git blame#5651
Conversation
…t-review-no-args feat: assign reviewer on /request-review with no arguments
…t-review-no-args test(comment-commands): add blame-parser tests
Signed-off-by: oplaws <juucceey@gmail.com>
Co-authored-by: Matthew B. <mgball@uci.edu> Signed-off-by: Julie Cao <116243642+juliethecao@users.noreply.github.com>
…git blame Add a suggest-reviewers CI job that runs on pull_request (opened, synchronize, reopened). It blame-scans changed files, splits candidates into committers (requestable) and non-committer contributors (cc-only), then posts or updates a single suggestion comment per PR. Explicit @mentions are still required; the suggestion comment provides the candidates to choose from.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5651 +/- ##
============================================
- Coverage 52.96% 52.80% -0.16%
+ Complexity 2523 2513 -10
============================================
Files 1075 1075
Lines 41743 41743
Branches 4513 4513
============================================
- Hits 22109 22043 -66
- Misses 18330 18411 +81
+ Partials 1304 1289 -15
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 405 | 0.247 | 22,603/36,963/36,963 us | 🔴 +18.4% / 🟢 -7.3% |
| 🟢 | bs=100 sw=10 sl=64 | 992 | 0.606 | 102,309/113,846/113,846 us | 🟢 -29.1% / 🟢 -19.2% |
| 🟢 | bs=1000 sw=10 sl=64 | 1,108 | 0.676 | 909,210/945,788/945,788 us | 🟢 +16.9% / 🟢 +9.7% |
Baseline details
Latest main 73c76f5 from 2026-06-12T22:35:57.354Z
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 405 tuples/sec | 420.77 tuples/sec | 398.12 tuples/sec | -3.7% | +1.7% |
| bs=10 sw=10 sl=64 | MB/s | 0.247 MB/s | 0.257 MB/s | 0.243 MB/s | -3.8% | +1.6% |
| bs=10 sw=10 sl=64 | p50 | 22,603 us | 23,004 us | 24,372 us | -1.7% | -7.3% |
| bs=10 sw=10 sl=64 | p95 | 36,963 us | 31,220 us | 36,082 us | +18.4% | +2.4% |
| bs=10 sw=10 sl=64 | p99 | 36,963 us | 31,220 us | 36,082 us | +18.4% | +2.4% |
| bs=100 sw=10 sl=64 | throughput | 992 tuples/sec | 839.89 tuples/sec | 870.8 tuples/sec | +18.1% | +13.9% |
| bs=100 sw=10 sl=64 | MB/s | 0.606 MB/s | 0.513 MB/s | 0.531 MB/s | +18.2% | +14.0% |
| bs=100 sw=10 sl=64 | p50 | 102,309 us | 119,184 us | 114,334 us | -14.2% | -10.5% |
| bs=100 sw=10 sl=64 | p95 | 113,846 us | 160,656 us | 140,980 us | -29.1% | -19.2% |
| bs=100 sw=10 sl=64 | p99 | 113,846 us | 160,656 us | 140,980 us | -29.1% | -19.2% |
| bs=1000 sw=10 sl=64 | throughput | 1,108 tuples/sec | 948.1 tuples/sec | 1,010 tuples/sec | +16.9% | +9.7% |
| bs=1000 sw=10 sl=64 | MB/s | 0.676 MB/s | 0.579 MB/s | 0.617 MB/s | +16.8% | +9.6% |
| bs=1000 sw=10 sl=64 | p50 | 909,210 us | 1,048,503 us | 994,062 us | -13.3% | -8.5% |
| bs=1000 sw=10 sl=64 | p95 | 945,788 us | 1,107,534 us | 1,046,212 us | -14.6% | -9.6% |
| bs=1000 sw=10 sl=64 | p99 | 945,788 us | 1,107,534 us | 1,046,212 us | -14.6% | -9.6% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,493.48,200,128000,405,0.247,22603.40,36962.83,36962.83
1,100,10,64,20,2015.45,2000,1280000,992,0.606,102308.80,113846.16,113846.16
2,1000,10,64,20,18057.56,20000,12800000,1108,0.676,909209.78,945788.34,945788.34|
I see on your fork run This is not ideal right? for a new file, there is no blame history. will it go to blame the parent folder or related file? Could you test on three cases:
To see the recommendations of each? |
For all three test PRs, I used
Let me know if the modify case should use a more representative file (e.g. something with richer blame history across more contributors). On the delete case: I currently skip deleted files, but since the file existed at the base commit, |
What changes were proposed in this PR?
This PR adds an automatic reviewer suggestion CI job to
.github/workflows/comment-commands.yml. When a PR is opened or updated (pull_request: opened, synchronize, reopened), the CI automatically runsgit blame -pat the base commit on each changed file to identify who most recently touched that code. Candidates are split into two groups:The CI posts a comment in this format:
Suggested reviewers (based on git blame of changed files):Committers — can be formally requested: @ alice, @ bobNon-committer contributors — cc to notify: @ carolUse /request-review @ alice to request a review, or cc @ carol to notify them.On every subsequent push, the job finds the existing suggestion comment (via a hidden HTML marker ) and edits it in place, keeping the PR timeline clean. The CI never sends a review request on its own as the author must explicitly use /request-review @ user.
Files with status added are skipped before git blame is attempted since they did not exist at the base commit.
Any related issues, documentation, discussions?
Closes #5611
How was this PR tested?
Unit tests: 83 tests across 9 suites were written locally (https://github.com/juliethecao/texera/tree/cc-test) to cover the core JavaScript logic extracted from the workflow:
git blame -poutput parsing, candidate ranking, comment body generation, find-or-update marker logic, author/bot exclusion, @ mention parsing, file status filtering, candidate accumulation, and MARKER integrity. Tests were not checked in as the logic lives inside a GitHub Actions script rather than a standalone module.Manual CI test: A test PR was opened on a personal fork (juliethecao#9) against the feature branch as the base. The suggest-reviewers job triggered on open, ran git blame on the changed files, and posted the suggestion comment. Closing and reopening the PR confirmed the comment was updated in place rather than duplicated.
Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Sonnet 4.6 in compliance with ASF guidelines