fix(update): warn when the cumulative changelog could not be fully loaded (v1.38.3) - #67
Merged
Merged
Conversation
…aded The update page slices every CHANGELOG section between the installed version and the latest release. When that fetch or slice fails it falls back to the last release's notes alone — silently, so an incomplete history looked exactly like a complete one. cumulative_release_notes() now reports whether the notes were really sliced, and the page shows a discreet warning (with a link to the GitHub releases) when they were not. The warning is suppressed for a single patch bump directly above the installed version, where the last release's notes already are the whole story. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
/admin/updateshows the notes of every version between the installed one and the latest release (since v1.38.0). When the rawCHANGELOG.mdfetch or the slicing fails,cumulative_release_notes()falls back to the last release's body — silently. A truncated history was indistinguishable from a complete one, so someone several versions behind would believe nothing else had changed.What changed
cumulative_release_notes()now returns(notes, complete)—completeisTrueonly when the CHANGELOG was really sliced,Falseon every fallback path (no tag, fetch raised, slice matched nothing). The fail-open behaviour is unchanged: it still never raises and never blanks the card.notes_incomplete_warning(complete, current, latest)decides whether the warning is worth showing. It stays quiet for a single patch bump directly above the installed version, where the last release's notes already are the whole story./admin/updaterenders a discreettext-mutedwarning inside the existing collapse, with a link to the GitHub releases page._ENand_ES.Verify
.\run-tests.ps1→ 179 passed. New coverage: the fallback path still returns the last-good notes and reportscomplete=False; the happy path reportsTruewith more than one version section; three unit tests for the warning rule; two rendering tests on/admin/update(warning present when the fallback is forced, absent when the slicing works).Note for future test authors
routes/admin.pydoesfrom app import current_version— a plain-name import bound at import time.monkeypatch.setattr(app_module, "current_version", ...)therefore does not change what the route sees. The new rendering tests use the realVERSIONvalue instead of faking it.🤖 Generated with Claude Code