bin/release: the version check scans every ## header, so an ## Unreleased section makes it re-register the last release - #305
Merged
1-Bart-1 merged 3 commits intoSep 12, 2026
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
1-Bart-1
approved these changes
Sep 12, 2026
1-Bart-1
deleted the
agent/280-bin-release-the-version-check-scans-ever
branch
September 12, 2026 10:56
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
mainatfb1eea7carriedversion = "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 its registration comment for 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.Why there is a
Register Failedcomment on this threadJuliaRegistrator answered this pull request here. Describing what
bin/releaseposts meant writing the trigger phrase, and backticks do not hide it from the bot — it reads the PR body, found the phrase, and tried to register. It failed only because the author's org membership is not public. So the phrase must not appear in any comment or PR body on this repo, and nothing above spells it out. Worth knowing while #302 is in flight: it is the same accident this issue is about, arriving by a different door.The red check is #300, not this branch
Test end-user and developer setupis red onea6680877(34645746964). 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, ending the job atrun_all failed for 1 example(s): ram_air_kite.jl, 15 passed / 1 failed. 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. It is landing on whatever is in the queue: #306's branch, whose diff is solver code only, failed the same job with the identical signature nine minutes before mine (34645270956) and passed it an hour earlier (34639515312);release/v5.1.0(34628824619) and #292's branch (34637447090) failed it too. Which XFoil deflections converge moves run to run — #300's own finding, and #291's. It is not falling my way, though: the previous commit0524692hit it on both attempts of its run, and the merge ofmainhas now hit it again.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 pass — re-run on the merged headea66808, still 4/4test/runtests.jl bin/test_release.jlthrough the suite runner: 4/4 PASS0524692: PASS (7 min, Julia 1.12.7, one matrix cell) — theagent:ci-localcomment on the thread. Not re-run on the merged head: the box killed it twice for memory with other agents on it, and GitHub CI coversea66808on seven cells, so I left the box alone rather than take a third runea66808: all seven cells of 34645746941 green — Documentation, 1.12 macOS/ubuntu/windows, 1.11 ubuntu, and both coverage jobs — pluscodecov/patch.Test end-user and developer setupred onkulfan.jl:71— write_section_aero writes an all-NaN deflected .dat, and read_section_ #300, as aboveorigin/main(ea66808); no conflict — main's side issrc/solver.jl,src/settings.jl,CHANGELOG.mdand test files, none of them this branch'sghanswers 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