Fall back when the changelog's version window holds only bumps - #4
Merged
Conversation
The window was verified against a repository whose history does not have production's shape. deploy.sh commits each version bump and never pushes it, so every `git pull -r` rebases those commits forward: the server now carries twenty consecutive `chore: bump version to X` commits stacked above the real work. The two most recent bumps are therefore adjacent, the window between them holds nothing but a bump, and the filter drops it as housekeeping. Measured against the server's own log: 0 entries. The feature would have shipped and shown "Nessun changelog disponibile". When the window yields nothing, use the whole scan instead — the most recent work is a better answer than silence. Windowing now happens over the parsed log rather than through a git revision range, so the fallback costs no extra call, and `changelog_range` becomes `changelog_boundary`. Same log, with the fallback: 20 entries. Co-Authored-By: Claude Opus 5 <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.
What went wrong
The version window shipped in #2 was verified against this repository. Production
does not have this repository's shape.
deploy.shcommits each version bump and never pushes it, so everygit pull -rrebases those commits forward. The server's first-parent log today:
The two most recent bumps are adjacent. The window between them holds one
commit — the bump itself — which the filter drops as housekeeping.
Measured against the server's own log: 0 entries. The feature would have gone
live showing "Nessun changelog disponibile".
The fix
When the window yields nothing, use the whole scan. The most recent work is a
better answer than silence, and it is what the reader wanted in the first place.
Windowing now happens over the parsed log instead of through a git revision
range, so the fallback needs no second git call.
changelog_rangebecomeschangelog_boundaryand returns the commit rather than aa..HEADstring.Same log, with the fallback: 20 entries, starting at "keep two findings the
case-law revert would have thrown away".
Verification
landed after the previous bump; a window holding nothing but bumps falls back;
an unknown boundary truncates nothing.
pytest tests/— 403 passed, 1 deselectedcommit → 0 entries without the fallback, 20 with it.
Worth knowing separately
The server is 20 commits ahead of origin and 2 behind. Those 20 are the
unpushed bumps. Nothing here depends on that being cleaned up — the fallback
handles the shape as it is — but origin and production disagree about what
version.txt says, and the gap grows by one every deploy.
🤖 Generated with Claude Code