chore: Update merged_pr_numbers to detect stacked PR merges in release #442
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 204 lines diff across 2 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.318
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #442"
general
weight: 0.35
fuzzybinary
The scripts used in the
prepare-releasejob use amerged_pr_numbershelper function to determine the set of PRs that have been merged intodevelopsince the last release. This set of PRs is then fed into the CHANGELOG generation process.As it turns out, the heuristic used in
merged_pr_numberscan miss PRs that are merged as part of a stack. (When 0.8.0 was prepared, #354, #355, #357, and #359 were merged as a stack topped by #360: the script only considered #360.)This PR fixes that issue.
merged_pr_numberspreviously checkedgit logand parsed PR numbers from commit messages: this only gave us PRs that had their own merge commit (or squash commit). As of this PR, we use a slightly more complicated approach to ensure that we resolve _all_ PRs, including those that weren't merged directly todevelop:1. We use
git logto get the precise set of commits being merged, along with their commit times2. We take the time of the oldest commit and subtract 24 hours to define the start of our PR search range
3. We use
gh pr listto find all PRs merged (into _any_ branch) since that time4. We filter those results to only include PRs whose merge commits are in the range we checked in step 1
This works for stacked PRs because, when a stack is merged from the top, GitHub marks each PR in the stack as merged and records the top PR's merge commit as its merge commit.
Unfortunately, GitHub doesn't have a way to cleanly query "what PRs were merged _in this specific rev range_", so we need to do a fuzzy PR search (overshooting the date range for safety) followed by a check of each PR's merge commit SHA.