feat(2397): add AI-generated "What's New" for release notes#2417
feat(2397): add AI-generated "What's New" for release notes#2417ycanales wants to merge 7 commits into
Conversation
julioest
left a comment
There was a problem hiding this comment.
Really nice work on this! The approval gate, parser tolerance for LLM output drift, and the --validate flag are all great decisions.
I left one inline comment regarding the markdown rendering. Pre-approving! ✅
herzog0
left a comment
There was a problem hiding this comment.
I'm still reviewing as it's a very dense PR, but I figured I should start with these two comments
|
@herzog0 I agree it would more consistent if we reset the approval, thanks for the suggestion! Adjusted. |
julhoang
left a comment
There was a problem hiding this comment.
Hi @ycanales , this is awesome work!! I love the wide range of command options for testing and covering different cases.
I've left a couple of suggestions inline. Besides those, I'm wondering whether we need the whats_new_html field at all. My understanding is that it gives admin users a friendly preview in the admin panel but isn't actually consumed by the website – the card component will be reading from whats_new_items, right?
If that's the case, I think we should show whats_new_items in Django Admin instead, since that's the true output served to the website. While testing, I removed the bold label from the "New Libraries" item, and the HTML field still rendered that list item – but it failed the regex in whats_new_items and wasn't parsed. An admin editor seeing this would be confused about why the website doesn't match the whats_new_html preview. So, I think we should drop whats_new_html and surface whats_new_items directly. Does that sound reasonable to you?
| response = client.chat.completions.create(model=WHATS_NEW_MODEL, messages=messages) | ||
| try: | ||
| content = response.choices[0].message.content | ||
| except (AttributeError, IndexError) as e: | ||
| logger.error("generate_whats_new_response_error", error=str(e)) | ||
| return None |
There was a problem hiding this comment.
Maybe we should include the .create() call in the try/catch to log the error, and then re-throw is its an instance of OpenAIError? (te leverage the autoretry_for option)
There was a problem hiding this comment.
Good call, I've adjusted the try/except to cover the API call.
0239b38 to
7883d28
Compare

Issue: #2397
Summary & Context
Adds an AI-generated "What's New" summary to the v3 Boost release detail page (issue #2397). Version model, and gated behind an admin-controlled approval flag.
Changes
Model + migration (versions/models.py, versions/migrations/0027_*.py)
Celery pipeline (versions/tasks.py)
Auto-dispatch on import (versions/releases.py)
Management command (versions/management/commands/generate_whats_new.py)
Other
render_whats_new_markdownincore.htmlhelper.Test plan
generate_whats_newcommand:docker compose exec web ./manage.py generate_whats_new --version=boost-1-89-0 --forceVersionDetailview and related template in this PR?Screenshots
Command
Celery
Self-review Checklist