Skip to content

fix(release-summary): compare a stable tag with the previous stable tag - #326

Merged
Piotr1215 merged 1 commit into
mainfrom
devops-1664/stable-summary-base
Oct 21, 2026
Merged

Piotr1215 merged 1 commit into
mainfrom
devops-1664/stable-summary-base

Conversation

@Piotr1215

Copy link
Copy Markdown
Contributor

Summary

The AI release summary for a stable tag compared against the rc on its own commit (v4.12.2 against v4.12.2-rc.7), so the range was empty or near empty and the summary skipped. A stable tag now compares with the previous stable tag; pre-releases keep comparing with the previous pre-release.

Key Changes

  • collect.py: is_stable matches linear-release-sync releaseIsStable (no prerelease part, or patch / patch.N). For a stable version with no previous-tag, resolve_previous_tag returns the highest earlier stable tag from the full tag list, so a previous stable on another release branch counts (v5.0.0 on main against v4.12.x).
  • A -patch.N tag sorts right above the release it patches. In vcluster-pro, v0.28.2-patch.1 is cut on top of v0.28.2; plain semver order would put it below and compare it with v0.28.1. This deviates from the issue's "using semver_key" wording on purpose.
  • COMMIT_LIMIT 500 to 1000. loft-enterprise v4.12.4 to the commit of v5.0.0-alpha.5 is already 716 first-parent commits, so at 500 the first v5.0.0 summary would silently drop its oldest work.
  • Tests: stable expectations updated (v4.12.2 now v4.12.1, v1.1.0 now v1.0.0), pre-release cases kept by resolving rcs, plus sibling-branch, -patch.N, override, first-stable and a main() run of a stable cut from its last rc.
  • action.yml previous-tag description and README state both rules.

Verification

collect.py against a full loft-enterprise checkout, no Slack, no AI:

Version Base (this PR) PRs Base (main) PRs
v4.12.3 v4.12.2 12 v4.12.3-rc.2 5
v5.0.0-alpha.3 v5.0.0-alpha.2 39 v5.0.0-alpha.2 39
v5.0.0 (scratch tag on alpha.5's commit) v4.12.4 532 v5.0.0-alpha.5 skip, no commits

For the simulated v5.0.0, fit_budget drops every PR body and still warns the input is over budget (464 KB against 400 KB). It proceeds; the output side (max-tokens: 16000) was not exercised without an Anthropic key.

make test-release-summary (228 pytest, 13 bats) and make lint pass.

Dependencies

None.

TODO

  • After merge, move release-summary/v1 to the merge commit.
  • loft-enterprise: update the comment above release_summary in release.yaml and the previous_tag description in release-summary.yaml (follow-up PR, References DEVOPS-1664).

Closes DEVOPS-1664

https://claude.ai/code/session_017Fi5sA2RGopJjZnpWZfVxU

A stable tag is cut from its last rc's commit, so the tags-on-the-same-
commit rule compared v4.12.2 with v4.12.2-rc.7. The range came back empty
or near empty and collect.py skipped on zero merged PRs, so a stable
banner in #product-releases got no useful summary. Denise asked for stable
notes to cover everything since the previous stable tag, and pre-release
notes to cover the previous pre-release, which they already do.

A stable tag (no prerelease part, or patch / patch.N, matching
linear-release-sync releaseIsStable from DEVOPS-1006) now compares with
the highest earlier stable tag from the full tag list, since the previous
stable can sit on another release branch out of reach of git describe
(v5.0.0 on main follows v4.12.x on release-4.12). A -patch.N tag sorts
right above the release it patches: in vcluster-pro v0.28.2-patch.1 is
cut on top of v0.28.2, where semver order would put it below. Pre-releases
and the previous-tag override keep their rules.

COMMIT_LIMIT goes from 500 to 1000. A stable range spans its whole line:
loft-enterprise v4.12.4 to the commit of v5.0.0-alpha.5 is already 716
first-parent commits, so at 500 the first v5.0.0 summary would drop its
oldest work while the header said "since v4.12.4".

Checked against loft-enterprise: v4.12.3 resolves to v4.12.2 (12 PRs,
was v4.12.3-rc.2 with 5), v5.0.0-alpha.3 still resolves to
v5.0.0-alpha.2 (39 PRs), and a v5.0.0 tag on alpha.5's commit resolves to
v4.12.4 with 532 PRs, where main skipped with no commits. fit_budget
drops every body for that range and still warns the input is over budget
(464 KB against 400 KB); it proceeds, and stays inside the model context.

Closes DEVOPS-1664

Claude-Session: https://claude.ai/code/session_017Fi5sA2RGopJjZnpWZfVxU
@Piotr1215
Piotr1215 requested a review from a team as a code owner October 21, 2026 12:10
@Piotr1215
Piotr1215 merged commit 7208867 into main Oct 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant