bin/release: the version check scans every ## header, so an ## Unreleased section makes it re-register the last release - #305
Open
1-Bort-1 wants to merge 2 commits into
Conversation
`bin/release` read the changelog version with an awk scan whose `exit` sat inside the `if` that matched a `v[0-9]` field, so a top header carrying no version fell through to the next `## ` header and returned the previous release instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PnzAXASD57wVcJf4W7YX3Z
|
Error while trying to register: Register Failed |
Contributor
Author
|
Local full suite: PASS (7 min, Julia 1.12.7, one cell of the matrix) |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
CI: https://github.com/OpenSourceAWE/VortexStepMethod.jl/actions/runs/34645746964/job/103415986216 |
This was referenced Sep 11, 2026
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.
TL;DR
bin/releaseread the changelog version with an awk scan that only stopped once it had found av[0-9]field, so a top section without one —## Unreleased— fell through to the next##header and returned the previous release. Theexitnow fires on the first##line whatever it holds, so an unversioned top header yields an empty version and the guard refuses.What it did on this tree
mainatfb1eea7carriesversion = "5.0.0"inProject.tomland## Unreleasedabove the## VortexStepMethod v5.0.0 2026-09-07section, which is exactly the shape that defeats the scan — the fallthrough findsv5.0.0, it matchesProject.toml, and the guard passes:That is a run of
./bin/releaseposting@JuliaRegistrator registerfor v5.0.0 — already tagged and registered — carrying the notes of the version that has not gone out yet. The same tree after the fix:The message the guard already prints — "Update CHANGELOG.md so its first
##header matches the package version" — is what the scan was supposed to be checking, so this is the code catching up with its own error message rather than a new rule. The empty slot it leaves in that first line ("CHANGELOG top is (expected ...)") reads a little bare; I left it alone rather than add a branch for the no-version case, since the sentence still says the true thing.The test
test/bin/test_release.jlbuilds a throwaway repository —Project.tomlat 5.0.0, a two-sectionCHANGELOG.md,git initand a commit, a stubghfirst onPATHso nothing reaches GitHub — and runsbash bin/release --dry-runin it.The fixture has to put the package's own version in the second section for the bug to bite: a first draft with
v4.3.1down there passed against the unfixed script, because the fallthrough then returned a version that mismatched anyway. The test that reproduces is the pair## Unreleasedover## Fixture v5.0.0, asserting a non-zero exit andVersion mismatchon stderr; the second testset is the control, a top header naming the package version, which must still exit 0 with nothing on stderr — without it the first would pass on any failure at all,ghnot being installed included.It is registered under
Sys.isunix()intest/runtests.jl: the script is bash, and the Windows runner in the matrix has no business running it.No
CHANGELOG.mdentry.bin/installandbin/run_juliachanges are logged there because users run them;bin/releaseis the maintainer's, and its top section is what #302 is turning into v5.1.0 right now — a bullet from me would land in the middle of a release in flight for a line no package user reads. Say the word and I will add one.The red check is #300, not this branch
Test end-user and developer setupfailed on0524692. It isArgumentError: reducing over an empty collectionatsrc/airfoil_aero/kulfan.jl:71—argminon an emptyx— throughfit_kulfan_parameters→generated_slices→plot_slices_3dfromexamples/ram_air_kite.jl:79. That is #300 down to the same stacktrace, already written up there and with the fix open as #301:write_section_aerowrites an all-NaN_d1.dat,read_dat_coordinatesdrops everyNaN NaNrow, and the reader handsfit_kulfan_parametersnothing.Nothing on this branch can reach it — the diff is
bin/release, a new test file and one line oftest/runtests.jl, none of which the setup workflow's examples touch. The same job failed identically onrelease/v5.1.0(34628824619), whose whole diff againstmainisCHANGELOG.md,Project.toml,src/solver.jlandtest/solver/test_forwarddiff.jl, and on #292's branch (34637447090). It is run-dependent rather than constant: #306's branch is off the samefb1eea7, touches onlysrc/solver.jl,src/settings.jland their test, and passed the same job in the same minute (34639515312). Which XFoil deflections converge moves run to run — #300's own finding, and #291's. It is not falling my way here, though — I re-ran the job on0524692and it failed again on the same line, so this commit has hit it twice.No new issue: #300 has it, with more detail than I could add.
Verification
./bin/release --dry-runonfb1eea7printedVersion: v5.0.0with the Unreleased notes and exited 0test/bin/test_release.jlred before, green after (juliaserver): before, "refuses an unversioned top section" failed 2/2 while the control passed 2/2; after, 4/4 passtest/runtests.jl bin/test_release.jlthrough the suite runner: 4/4 PASSTest end-user and developer setupred on both attempts of 34639454933, samekulfan.jl:71line each time — write_section_aero writes an all-NaN deflected .dat, and read_section_ #300, as aboveorigin/mainby the test_forwarddiff.jl's POLAR_MATRICES check flakes at ~4%, and the oper #292 merge (0da841d) —CHANGELOG.md,src/solver.jl,test/solver/test_forwarddiff.jl, none of them this branch's files, so no merge and no conflictghanswers onlygh repo view; a futurebin/releasethat shells out toghfor something new before the version guard would make the control testset fail rather than the case it is guarding.Scope
+73 / -1 across 3 files, of which 70 lines are the new test.
bin/releaseis one line: theexitmoves out of theif. Not stacked — #302 touches onlyCHANGELOG.mdandProject.toml. CI.yml'sfail-fast: false(gate item 10) is #279's, already queued.Closes #280 · task
VortexStepMethod.jl-280