Repository navigation
fix(release): exclude V1 history from the release review range - #54674
Conversation
There was a problem hiding this comment.
The exclusion works. I deepened the history locally and checked: v2.0.26..dev has 1,230 non-merge commits, and adding --not origin/v1 leaves the 60 V2 commits.
Public API is unchanged: only the maintainer release script is touched.
One concern, inline: the range in the prompt has no --no-merges, so it still includes the promotion merge. Its git show output is about 41k lines.
| } | ||
|
|
||
| // V1 history was merged into dev when V2 was promoted, so it must be excluded from the release range. | ||
| function commitRange(base: string, head: string) { |
There was a problem hiding this comment.
Without --no-merges, this range still contains 5caf1f9f6 chore: promote v2 to dev, because that merge is reachable neither from v2.0.26 nor from origin/v1. The prompt tells the agent to git show every commit. On that merge, git show prints about 41.6k lines of combined diff, mostly V1 tree changes, which is the noise this PR is trying to remove. Your verification used git log --no-merges. Adding it here (e.g. `--no-merges ${base}..${head} --not origin/v1`) would make the prompt match what you checked.
There was a problem hiding this comment.
Re-reviewed 11144c51a. The fix is right and I have nothing blocking.
commitRangenow returns--no-merges ${base}..${head} --not origin/v1(script/release.ts:153-155). The prompt and theComparing …log both build the range through this function, so the reviewer agent gets exactly the range you verified.- Merge commits are excluded from that range, which drops
5caf1f9f6 chore: promote v2 to dev. I checked this against thepr/headref. The only other merge in the range is126294a32 docs(www): merge Console documentation updates, a V1 docs merge, so skipping it loses nothing. The new comment is right thatdevotherwise only takes squash merges.
What I couldn't check: this checkout is shallow (about three months), and v2.0.26 has no merge base with pr/head here. So I couldn't reproduce the 60-commit count; locally the range comes out at about 1.1k commits. That's a gap in my clone, not something your change causes. I also couldn't fetch v1 from origin because I had no access, so I used the local origin/v1 (dfb56f76c). It does contain the old dev tip 055d95bb7e, so --not origin/v1 gives the same result as ^055d95bb7e. I didn't run the release script.
I made no edits. My only change to the checkout was writing temp files under /tmp/opencode.
v2.0.26was tagged from the oldv2branch. After V2 was promoted todev, the first parent ofdevis the old V1devhistory, sov2.0.26..HEADnow includes ~1,380 V1 commits (console, stats, Zen docs, V1 fixes since September) alongside the 60 real V2 changes.script/release.tsfed that range to the release review agent, so the generated changelog would be polluted.origin/v1alongside the V2 tags and pass<base>..<head> --not origin/v1as the review range (olddevtip055d95bb7eis contained inv1).git showinstead of a whole-tree diff between the endpoints, which also carries the merged V1 tree changes.Verified locally:
git log --no-merges v2.0.26..origin/dev --not origin/v1yields exactly the same 60 commits asv2.0.26..origin/dev ^055d95bb7e. Once the next release is tagged fromdev, the exclusion is a no-op.Requested by: @Hona (Hona via Slack)