Skip to content

feat: Semantic release notes and robust AI token counting#72

Merged
thomas-vilte merged 2 commits intomasterfrom
dev
Jan 4, 2026
Merged

feat: Semantic release notes and robust AI token counting#72
thomas-vilte merged 2 commits intomasterfrom
dev

Conversation

@thomas-vilte
Copy link
Owner

@thomas-vilte thomas-vilte commented Jan 4, 2026

Description

This Pull Request introduces a major enhancement to the release notes generation process by implementing semantic sections. This moves away from a flat list of highlights to a more structured and categorized format, significantly improving readability and organization for end-users.

Additionally, this PR improves the robustness of AI token counting within the cost_wrapper by adding comprehensive error handling. If the AI provider's token counting API fails or does not support a specific model, the system will now gracefully fall back to a local estimation, preventing failures and ensuring continuous operation.

Fixes #

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

The changes have been verified through:

  • Unit tests: New unit tests were added for the release_generator to specifically validate the parsing and handling of the new semantic sections from the AI model's JSON output. Existing tests for cost_wrapper and commit_summarizer_service ensure no regressions.
  • Integration tests
  • Manual test:
    • Generated release notes using the updated AI prompts to confirm that the output correctly includes semantic sections (e.g., "🎨 UI Improvements", "🐛 Fixes") instead of the old flat highlights.
    • Simulated AI token counting failures (e.g., by using an unsupported model or network issues) to verify that the cost_wrapper correctly falls back to local estimation and logs appropriate warnings.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

🧪 Test Plan & Evidence

Suggested Manual Verification

  • API/Backend: Attach JSON response or logs as evidence of correct behavior
  • Performance: Ensure no significant latency increase
  • Unit Tests: Run go test ./... and ensure all tests pass
  • No Regressions: Verify that related features still work as expected

@thomas-vilte thomas-vilte changed the title feat(release): introduce semantic sections for release notes feat: Semantic release notes and robust AI token counting Jan 4, 2026
@thomas-vilte thomas-vilte added feature New features refactor Code restructuring or cleaning without functional changes labels Jan 4, 2026
@thomas-vilte thomas-vilte merged commit 984d1c8 into master Jan 4, 2026
1 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New features refactor Code restructuring or cleaning without functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant