[CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py #3823
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.66 · 366 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.353
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.066
Real PR Conversation Timeline
1 comments
"Review active on #3823"
general
weight: 0.35
cxzl25
What changes were proposed in this pull request?
Port a few
merge_pr.pyimprovements from Spark'smerge_spark_pr.py:1. Post a "Merge Summary" comment on the PR after the merge, recording every branch the
change landed on and a link to the resulting commit.
cherry_picknow returns the(ref, hash)pair it pushed so backports are included, and the comment is posted froma
finallyblock, so a cancelled cherry-pick does not drop what already landed. Thebackport path (PR already merged) posts a summary too.
2. Close pull requests that GitHub does not auto-close.
Closes #Ncloses the PR onlywhen the commit lands on the default branch, so one merged into
branch-x.ystaysopen. Merges into
mainare left to GitHub, whose close event carries the commit thatthe backport path below relies on.
3. Recognize pull requests merged into
branch-x.y. For the same reason, GitHub links themerge commit to the
closedevent only on the default branch, so those pull requestswere not recognized as merged and re-running the script on one attempted a fresh merge
instead of offering a backport.
find_merge_commitnow falls back toreferencedevents, confirmed against the
Closes #N from <ref>merge footer.4. Polish the interactive prompts: capitalize
Nin the(y/n)prompts, since all ofthem treat any input other than
yas no, and add the missing space after":"inthe JIRA assignee prompt.
The merge has already been pushed by the time the comment and the close run, so neither
aborts the rest of the bookkeeping: failures are reported rather than raised, and the
close is skipped when
GITHUB_OAUTH_KEYis not configured.For example, #3788 landed on
mainandbranch-0.7, and would have got:Why are the changes needed?
A merged PR currently records nothing about where the change landed: the commit is
reachable only by searching for the
Closes #Nfooter, and backport targets are notvisible from the PR page at all. Pull requests merged into
branch-x.yalso stay openuntil someone closes them by hand, and the script does not recognize them as merged
afterwards.
Does this PR resolve a correctness bug?
Does this PR introduce _any_ user-facing change?
How was this patch tested?
Manually:
python3 -m py_compile dev/merge_pr.pyand the module doctests, which now coverhas_merge_footer, pass.find_merge_commitwas checked against the real GitHub events of#3697 (merged into
branch-0.6, previously undetected, now resolves0bf9c5a58), #3788 and#3768 (both merged into
main, still resolved from theclosedevent). The GitHub writecalls will be exercised by the next real merge.