Skip to content

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
mainfrom
agent/280-bin-release-the-version-check-scans-ever
Open

bin/release: the version check scans every ## header, so an ## Unreleased section makes it re-register the last release#305
1-Bort-1 wants to merge 2 commits into
mainfrom
agent/280-bin-release-the-version-check-scans-ever

Conversation

@1-Bort-1

@1-Bort-1 1-Bort-1 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

TL;DR

bin/release read the changelog version with an awk scan that only stopped once it had found a v[0-9] field, so a top section without one — ## Unreleased — fell through to the next ## header and returned the previous release. The exit now 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

main at fb1eea7 carries version = "5.0.0" in Project.toml and ## Unreleased above the ## VortexStepMethod v5.0.0 2026-09-07 section, which is exactly the shape that defeats the scan — the fallthrough finds v5.0.0, it matches Project.toml, and the guard passes:

$ ./bin/release --dry-run
Repository:   OpenSourceAWE/VortexStepMethod.jl
Version:      v5.0.0
Commit:       fb1eea7d9965980b0893dbc8d90e6bbc6f57788c

Release notes:
### Added
- `solve!(...; throw_on_fail=true)` throws a `SolveFailure` ...
### Fixed
- The `NONLIN` solver backtracks along each Newton step ...
exit=0

That is a run of ./bin/release posting @JuliaRegistrator register 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:

$ ./bin/release --dry-run
Version mismatch: Project.toml is 5.0.0 but CHANGELOG top is  (expected v5.0.0).
Update CHANGELOG.md so its first '## ' header matches the package version.
exit=1

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.jl builds a throwaway repository — Project.toml at 5.0.0, a two-section CHANGELOG.md, git init and a commit, a stub gh first on PATH so nothing reaches GitHub — and runs bash bin/release --dry-run in 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.1 down there passed against the unfixed script, because the fallthrough then returned a version that mismatched anyway. The test that reproduces is the pair ## Unreleased over ## Fixture v5.0.0, asserting a non-zero exit and Version mismatch on 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, gh not being installed included.

It is registered under Sys.isunix() in test/runtests.jl: the script is bash, and the Windows runner in the matrix has no business running it.

No CHANGELOG.md entry. bin/install and bin/run_julia changes are logged there because users run them; bin/release is 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 setup failed on 0524692. It is ArgumentError: reducing over an empty collection at src/airfoil_aero/kulfan.jl:71argmin on an empty x — through fit_kulfan_parametersgenerated_slicesplot_slices_3d from examples/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_aero writes an all-NaN _d1.dat, read_dat_coordinates drops every NaN NaN row, and the reader hands fit_kulfan_parameters nothing.

Nothing on this branch can reach it — the diff is bin/release, a new test file and one line of test/runtests.jl, none of which the setup workflow's examples touch. The same job failed identically on release/v5.1.0 (34628824619), whose whole diff against main is CHANGELOG.md, Project.toml, src/solver.jl and test/solver/test_forwarddiff.jl, and on #292's branch (34637447090). It is run-dependent rather than constant: #306's branch is off the same fb1eea7, touches only src/solver.jl, src/settings.jl and 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 on 0524692 and 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

  • Reproduced first: ./bin/release --dry-run on fb1eea7 printed Version: v5.0.0 with the Unreleased notes and exited 0
  • test/bin/test_release.jl red before, green after (juliaserver): before, "refuses an unversioned top section" failed 2/2 while the control passed 2/2; after, 4/4 pass
  • test/runtests.jl bin/test_release.jl through the suite runner: 4/4 PASS
  • Local full suite: PASS (8 min, Julia 1.12.7, one matrix cell)
  • GitHub CI: the whole matrix and Documentation pass (34639454888); Test end-user and developer setup red on both attempts of 34639454933, same kulfan.jl:71 line each time — write_section_aero writes an all-NaN deflected .dat, and read_section_ #300, as above
  • No new public symbols, so no docs page · no REUSE setup in this repo
  • Behind origin/main by 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 conflict
  • Benchmark: n/a
  • Risk: the fixture's stub gh answers only gh repo view; a future bin/release that shells out to gh for 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/release is one line: the exit moves out of the if. Not stacked — #302 touches only CHANGELOG.md and Project.toml. CI.yml's fail-fast: false (gate item 10) is #279's, already queued.

Closes #280 · task VortexStepMethod.jl-280

`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
@JuliaRegistrator

Copy link
Copy Markdown

Error while trying to register: Register Failed
@1-Bort-1, it looks like you are not a publicly listed member/owner in the parent organization (OpenSourceAWE).
If you are a member/owner, you will need to change your membership to public. See GitHub Help

@1-Bort-1 1-Bort-1 added agent:running Agent task state agent:ci Agent task state and removed agent:running Agent task state labels Sep 11, 2026
@1-Bort-1

1-Bort-1 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Local full suite: PASS (7 min, Julia 1.12.7, one cell of the matrix)

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@1-Bort-1

1-Bort-1 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

CI: Test end-user and developer setup failed on ea6680877.

https://github.com/OpenSourceAWE/VortexStepMethod.jl/actions/runs/34645746964/job/103415986216

@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state agent:ci Agent task state and removed agent:ci Agent task state agent:queued Agent task state agent:running Agent task state labels Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:running Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bin/release: the version check scans every ## header, so an ## Unreleased section makes it re-register the last release

3 participants