Skip to content

fix(release): exclude V1 history from the release review range - #54674

Merged
Hona merged 2 commits into
devfrom
fix/release-review-exclude-v1
Oct 12, 2026
Merged

Hona merged 2 commits into
devfrom
fix/release-review-exclude-v1

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

v2.0.26 was tagged from the old v2 branch. After V2 was promoted to dev, the first parent of dev is the old V1 dev history, so v2.0.26..HEAD now includes ~1,380 V1 commits (console, stats, Zen docs, V1 fixes since September) alongside the 60 real V2 changes. script/release.ts fed that range to the release review agent, so the generated changelog would be polluted.

  • Fetch origin/v1 alongside the V2 tags and pass <base>..<head> --not origin/v1 as the review range (old dev tip 055d95bb7e is contained in v1).
  • Tell the reviewer to read each commit with git show instead 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/v1 yields exactly the same 60 commits as v2.0.26..origin/dev ^055d95bb7e. Once the next release is tagged from dev, the exclusion is a no-op.

Requested by: @Hona (Hona via Slack)

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread script/release.ts
}

// 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) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done - rereview pls

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed 11144c51a. The fix is right and I have nothing blocking.

  • commitRange now returns --no-merges ${base}..${head} --not origin/v1 (script/release.ts:153-155). The prompt and the Comparing … 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 the pr/head ref. The only other merge in the range is 126294a32 docs(www): merge Console documentation updates, a V1 docs merge, so skipping it loses nothing. The new comment is right that dev otherwise 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.

@Hona
Hona merged commit 4d9678a into dev Oct 12, 2026
11 checks passed
@Hona
Hona deleted the fix/release-review-exclude-v1 branch October 12, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant