← Back to Pull requests

[CELEBORN-2440][INFRA] Post a merge summary comment on the PR in merge_pr.py #3823

Closed
unknown closed this pull request without merging on Sep 14, 2026 08:31 UTC
View on GitHub
unknown unknown commented on Aug 24, 2026 08:56 UTC
Author

What changes were proposed in this pull request?

Port a few merge_pr.py improvements from Spark's merge_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_pick now returns the
(ref, hash) pair it pushed so backports are included, and the comment is posted from
a finally block, so a cancelled cherry-pick does not drop what already landed. The
backport path (PR already merged) posts a summary too.

2. Close pull requests that GitHub does not auto-close. Closes #N closes the PR only
when the commit lands on the default branch, so one merged into branch-x.y stays
open. Merges into main are left to GitHub, whose close event carries the commit that
the backport path below relies on.

3. Recognize pull requests merged into branch-x.y. For the same reason, GitHub links the
merge commit to the closed event only on the default branch, so those pull requests
were not recognized as merged and re-running the script on one attempted a fresh merge
instead of offering a backport. find_merge_commit now falls back to referenced
events, confirmed against the Closes #N from <ref> merge footer.

4. Polish the interactive prompts: capitalize N in the (y/n) prompts, since all of
them treat any input other than y as no, and add the missing space after ":" in
the 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_KEY is not configured.

For example, #3788 landed on main and branch-0.7, and would have got:

Merge Summary:

- merged into main https://github.com/apache/celeborn/commit/8cbf3fa4

- merged into branch-0.7 https://github.com/apache/celeborn/commit/f67883a4

> Posted by merge_pr.py

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 #N footer, and backport targets are not
visible from the PR page at all. Pull requests merged into branch-x.y also stay open
until someone closes them by hand, and the script does not recognize them as merged
afterwards.

Does this PR resolve a correctness bug?

  • Yes
  • Does this PR introduce _any_ user-facing change?

  • Yes
  • How was this patch tested?

    Manually: python3 -m py_compile dev/merge_pr.py and the module doctests, which now cover
    has_merge_footer, pass. find_merge_commit was checked against the real GitHub events of
    #3697 (merged into branch-0.6, previously undetected, now resolves 0bf9c5a58), #3788 and
    #3768 (both merged into main, still resolved from the closed event). The GitHub write
    calls will be exercised by the next real merge.

    Diff: 366 lines (+274 / -92) across 4 files Reviewer: cxzl25 Review duration: 30215m
    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
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 65.9% (HIGH) · Higher = larger blast radius
    65.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26% · Safe to merge
    26%