Skip to content

fix(vigutils): raise clear error when finalize re-runs with a changed tag prefix - #1082

Merged
c-vigo merged 2 commits into
release/1.2.0from
bugfix/1073-finalize-tag-prefix-rerun
Jul 14, 2026
Merged

c-vigo merged 2 commits into
release/1.2.0from
bugfix/1073-finalize-tag-prefix-rerun

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Implements #1073 (review follow-up from #1068).

prepare-changelog finalize re-run with a different --tag-prefix now raises a specific ValueError naming the already-finalized heading it found, the expected prefix, and the invariant (prefix must be stable across re-runs on a reused release branch) — instead of the generic "TBD not found" error. No auto-re-finalize (per approved plan); the file is left untouched, asserted by tests. Docstring states the invariant. A lookbehind keeps e.g. 11.0.0 from matching as prefixed 1.0.0.

TDD: RED commit with both prefix directions (""→"v", "v"→""), then the fix. Evidence: test_prepare_changelog.py 147 passed; full just precommit green. Changelog entry under ## [1.2.0] - TBD ### Fixed, root + mirror.

Refs: #1073

c-vigo added 2 commits July 14, 2026 19:33
… tag prefix

A reused release branch re-running prepare-changelog finalize with a
different --tag-prefix hit the generic 'Version section not found'
ValueError. Detect the already-finalized heading under another prefix,
name it and the expected prefix in the error, and document that re-run
idempotency holds only for an unchanged tag prefix.

Refs: #1073
@c-vigo
c-vigo merged commit 4a2874b into release/1.2.0 Jul 14, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1073-finalize-tag-prefix-rerun branch July 14, 2026 17:50
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