keep the checked-in version bumped in step with releases - #10
Draft
espg wants to merge 3 commits into
Draft
Conversation
Owner
Author
|
🤖 from Claude CI green on Note that PR CI cannot exercise the new step itself: Left as a draft: the two items under "Questions for review" are yours to rule on — in particular whether the released |
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.
Closes #9. Follow-up to #8 (merged as e6f2e99), which made the release tag the source of the published version.
The drift is live right now
0.3.2 is released, built through #8's tag-driven path — and
main'sCargo.tomlstill says0.3.1. So every from-source install offmaintoday reports a version that was superseded:That is exactly the state #9 exists to correct, so part (1) is a correction of the current tree rather than a hypothetical.
Phases
0.3.2.## Releasingsection in the README.::warning::on a release run when the two disagree; never fails the job.1. Bump to 0.3.2 (5ab15d6)
Cargo.tomland the crate's own[[package]]entry inCargo.lock— the lock is load-bearing because the wheel builds pass--locked, so bumping only the manifest is a hard build failure, not a cosmetic mismatch. Done by running #8's ownsync-version.sh 0.3.2rather than hand-editing, so the rewrite is the same awk-scoped pass CI performs. Exactly two lines change and no dependency version is touched:2.
## Releasingin the README (7a1e6e1)The repo has no
RELEASING.md,CONTRIBUTING.md, or changelog, and the README already carries the operational prose (## Developmentcovers the local build, the test tiers, and what CI builds), so the section goes there, immediately after## Development, rather than introducing a new file for ~30 lines.It states the three things the issue asks for: a
bump version to Xcommit lands onmainfor each release; the tag is what the build reads (so a forgotten bump cannot mislabel a wheel); and from-source installs —pip install git+…, a localpip install ./maturin develop, anycargoconsumer of a checkout — read the tree and never see the tag, which is why the two must not drift. The concrete recipe it documents is the one used in phase 1 above (sync-version.sh X→cargo metadata --locked --offline→ bump commit → tag).3. Warn-only check (339776a)
.github/scripts/check-tree-version.sh, following #8's script structure rather than inline YAML (samerelease-version.shdefault-argument shape, same[version] [manifest]override for local testing, same annotation vocabulary), wired intopublish:Two deliberate choices:
publish, after the artifact-name check. That job's checkout is the only one in the workflow that is never version-synced, so itsCargo.tomlis exactly what the tagged commit hands to a from-source install — the thing being checked. It also fires once per release rather than four times, and the warning is a post-release to-do (land the bump commit), not something actionable mid-run.set -uo pipefail, deliberately not-e, unlike its three siblings, with the reason stated in the header comment. Every path exits 0, including "cannot determine the tag version" and "manifest unreadable".release-version.sh's stderr is swallowed on that fallback path specifically because it speaks in::error::annotations, and nothing in a warn-only check should annotate a run as failed.Verification
No release run was available and no tag was touched, so the check was exercised directly against real trees, replaying what the
publishjob's checkout would contain.Disagreement —
origin/main's tree (0.3.1) against tag0.3.2, i.e. today's actual state:Agreement — this branch's tree (
0.3.2) against tag0.3.2:Degenerate inputs, all warn-and-continue (no
::error::, exit 0):Repo gates (the local equivalents of
ci.yml; there is no pre-commit config, and no shellcheck/actionlint/yamllint is configured or installed):Not verified: the step firing inside a real
publishjob — the first exercise is the next tag push. Its only inputs areGITHUB_REFand the checked-outCargo.toml, both replayed above.Questions for review
0.3.2is released but its tag points at a commit whose tree still says0.3.1. Nothing needs re-releasing (the published artifacts are correctly named0.3.2— the tag-driven build saw to that), and the bump commit here makes every future from-source install offmainhonest. The alternative is moving the0.3.2tag onto the merged head so the tag and its tree agree retroactively; that is a tag rewrite, so it is yours to make if wanted, not something done here. Leaving it as-is seems right — preference?publishwas chosen for the reasons above, which means a release whose build jobs fail never emits the warning. That seemed correct (a run that publishes nothing does not need the nag), but if you would rather see it early and unconditionally, it moves to a standalone tag-gated job or to a pre-sync step insdist.