Skip to content

fix: normalize release title to "vX.Y.Z: description" format#55

Merged
jdx merged 1 commit intomainfrom
fix/normalize-release-title-format
Feb 18, 2026
Merged

fix: normalize release title to "vX.Y.Z: description" format#55
jdx merged 1 commit intomainfrom
fix/normalize-release-title-format

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Feb 18, 2026

Summary

  • The previous check only prepended the tag when the title didn't start with it at all
  • If the LLM returned e.g. v2.18.0 (Internal CI improvements), the check passed and the title kept its parentheses — seen in jdx/usage v2.18.0
  • Now strips any existing tag prefix with a non-standard separator and rewrites as vX.Y.Z: description
  • Also updates the system prompt and tool description to guide the LLM toward the correct format from the start

Normalization behavior

LLM output Result
v2.18.0 (Internal CI improvements) v2.18.0: Internal CI improvements
v2.18.0 - Internal CI improvements v2.18.0: Internal CI improvements
v2.18.0: Internal CI improvements v2.18.0: Internal CI improvements (unchanged)
Internal CI improvements v2.18.0: Internal CI improvements

🤖 Generated with Claude Code

The previous check only prepended the tag when the title didn't start
with it at all. If the LLM returned e.g. "v2.18.0 (Internal CI
improvements)" the check passed and the title was left with parentheses
instead of the colon separator.

Now strips any existing tag prefix with a non-standard separator and
rewrites it as "vX.Y.Z: description". Also updates the system prompt
and tool description to guide the LLM toward the correct format.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Copilot AI review requested due to automatic review settings February 18, 2026 14:55
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @jdx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the automated release note generation process by implementing robust normalization for release titles. It ensures that all generated release titles adhere to a consistent "vX.Y.Z: description" format, regardless of the initial output from the language model. This change improves the reliability and uniformity of release titles, while also guiding the LLM to produce more compliant output from the start.

Highlights

  • Release Title Normalization Logic: The logic for normalizing release titles has been enhanced to consistently enforce the "vX.Y.Z: description" format. This now correctly handles cases where the LLM might include the version tag with non-standard separators (e.g., parentheses or hyphens) or no tag at all, ensuring a uniform output.
  • LLM Guidance Updates: The system prompt and the submit_release_notes tool description have been updated to explicitly instruct the LLM to provide release titles without the version tag, as it will be prepended automatically. This aims to improve the initial output quality from the LLM and reduce the need for post-processing.
Changelog
  • src/generate.rs
    • Refactored the release title processing to strip non-standard tag prefixes and reformat the title with a consistent "vX.Y.Z: " prefix.
  • src/prompt.rs
    • Updated the release_title description in the system prompt to clarify that the version tag will be automatically prepended.
  • src/tools/submit_release_notes.rs
    • Modified the release_title description within the tool definition to inform the LLM not to include the version tag.
Activity
  • No human activity has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.90%. Comparing base (7dd2278) to head (6f565a1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/generate.rs 53.84% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
- Coverage   94.03%   93.90%   -0.14%     
==========================================
  Files          26       26              
  Lines        3942     3953      +11     
  Branches     3942     3953      +11     
==========================================
+ Hits         3707     3712       +5     
- Misses        148      154       +6     
  Partials       87       87              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request effectively addresses the issue of normalizing release titles to a consistent "vX.Y.Z: description" format. The changes in src/generate.rs correctly handle various non-standard tag prefixes by stripping them and reformatting the title. Additionally, the updates to src/prompt.rs and src/tools/submit_release_notes.rs provide clear guidance to the LLM, which should improve the initial output quality and reduce the need for post-processing. The logic for extracting the description after stripping the tag seems robust. Overall, this is a good improvement for consistency and user experience.

@jdx jdx merged commit e5f2b77 into main Feb 18, 2026
10 of 13 checks passed
@jdx jdx deleted the fix/normalize-release-title-format branch February 18, 2026 15:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the release title normalization logic to ensure all titles follow the "vX.Y.Z: description" format, regardless of what separator the LLM returns. Previously, titles with non-colon separators (like parentheses or dashes) would pass validation and keep their original format.

Changes:

  • Updated the normalization logic to strip any existing tag prefix with a non-standard separator and rewrite as "vX.Y.Z: description"
  • Modified the LLM prompt and tool description to guide the model toward the correct format from the start

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/generate.rs Implements new normalization logic to handle various separator formats
src/tools/submit_release_notes.rs Updates tool description to clarify expected title format
src/prompt.rs Updates system prompt to guide LLM toward correct format

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/generate.rs
.release_title
.strip_prefix(&ctx.tag)
.and_then(|rest| {
let trimmed = rest.trim_start_matches(|c: char| !c.is_alphanumeric());
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The predicate !c.is_alphanumeric() will strip leading whitespace and punctuation, but it will also strip valid alphanumeric characters if they happen to be non-ASCII (e.g., accented letters or non-Latin scripts). Consider using a more explicit check like |c: char| c.is_whitespace() || matches!(c, '(' | ')' | '-' | ':' | ',' | '.') to only remove known separator characters while preserving all alphanumeric content.

Suggested change
let trimmed = rest.trim_start_matches(|c: char| !c.is_alphanumeric());
let trimmed = rest.trim_start_matches(|c: char| {
c.is_whitespace() || matches!(c, '(' | ')' | '-' | ':' | ',' | '.')
});

Copilot uses AI. Check for mistakes.
jdx added a commit that referenced this pull request Mar 2, 2026
A small patch release that fixes inconsistent release title formatting.
Previously, if the LLM returned a title like `v2.18.0 (Internal CI
improvements)` or `v2.18.0 - Internal CI improvements`, it would pass
validation and be left as-is. Now all titles are normalized to the
canonical `vX.Y.Z: description` format.

## Fixed

- **Normalize release titles to `vX.Y.Z: description` format** — The
previous check only prepended the tag when the title didn't start with
it at all. If the LLM returned a title with a non-standard separator
(e.g. parentheses or dashes), it passed the check unchanged. The
normalization now strips any existing tag prefix with a non-standard
separator and rewrites it consistently. The system prompt and tool
description were also updated to guide the LLM toward the correct format
from the start. ([#55](#55))
(@jdx)

  | LLM output | Result |
  |---|---|
| `v2.18.0 (Internal CI improvements)` | `v2.18.0: Internal CI
improvements` |
| `v2.18.0 - Internal CI improvements` | `v2.18.0: Internal CI
improvements` |
| `v2.18.0: Internal CI improvements` | `v2.18.0: Internal CI
improvements` (unchanged) |
  | `Internal CI improvements` | `v2.18.0: Internal CI improvements` |

**Full Changelog**:
v0.1.8...010f229

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
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.

2 participants