Skip to content

Fall back when the changelog's version window holds only bumps - #4

Merged
capazme merged 1 commit into
mainfrom
fix/changelog-empty-window
Aug 29, 2026
Merged

Fall back when the changelog's version window holds only bumps#4
capazme merged 1 commit into
mainfrom
fix/changelog-empty-window

Conversation

@capazme

@capazme capazme commented Aug 29, 2026

Copy link
Copy Markdown
Owner

What went wrong

The version window shipped in #2 was verified against this repository. Production
does not have this repository's shape.

deploy.sh commits each version bump and never pushes it, so every git pull -r
rebases those commits forward. The server's first-parent log today:

e99ae78 chore: bump version to 1.6.3
88c4f33 chore: bump version to 1.6.2
… eighteen more consecutive bumps …
cc5a747 chore: bump version to 1.4.0
9f529b2 fix: keep two findings the case-law revert would have thrown away

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_range becomes
changelog_boundary and returns the commit rather than a a..HEAD string.

Same log, with the fallback: 20 entries, starting at "keep two findings the
case-law revert would have thrown away".

Verification

  • Three new tests, written first and watched fail: the window keeps only what
    landed after the previous bump; a window holding nothing but bumps falls back;
    an unknown boundary truncates nothing.
  • pytest tests/ — 403 passed, 1 deselected
  • The fixed code run against the server's real log, fetched over ssh: window 1
    commit → 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

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>
@capazme
capazme merged commit 38ce64d into main Aug 29, 2026
7 checks passed
@capazme
capazme deleted the fix/changelog-empty-window branch August 29, 2026 15:11
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.

1 participant