Repository navigation
ci: tag each crates.io release as v<version> (port consensus Create git tag) - #2
Merged
Merged
Conversation
Port the blvm-consensus 'Create git tag' step to the publish job: after a successful publish, create an annotated v<version> tag at HEAD (the pushed 'Bump version' commit, i.e. the published tree) and push it with REPO_ACCESS_TOKEN. Skips if the tag already exists on origin. The Workflows-permission hint and the generic failure message print the manual tag command at that commit. Until now this repo published without tagging, so the describe-based breaking-change scan always fell back to HEAD~20 and the version step relied on crates.io alone. No GitHub Release step (consensus builds notes and attestations for that; out of scope here).
Match blvm-consensus docs/VERIFICATION.md (ed2fac0): 3 of 182 anchors are mutation-validated. A Z3 pass means annotated and Z3-checked against the translated contracts. Comment and README only.
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.
The publish job runs
cargo publishbut has never created a tag; this repo has 0 tags and 0 releases. This PR adds blvm-consensus's Create git tag step to that job.Change
A new last step in
publish, Create git tag. It's the consensus step with the following differences:steps.gate.outputs.do_release == 'true' && steps.publish.outputs.published == 'true', so nothing is tagged after a skipped or failed publish.VERSION_TAG="v${{ steps.version.outputs.version }}", because this job has noversion_tagoutput. The tag goes onHEAD, which is the rebased Bump version commit that Commit version bump pushes before publishing, i.e. the exact tree that was published.github.sha. The generic push-failure message prints the same command.Unchanged from consensus: it skips if the tag already exists on origin, errors if
REPO_ACCESS_TOKENis missing, unsets the extraheader/includeIf credentials, and pushes withx-access-token.REPO_ACCESS_TOKENis available to this repo as an org secret. With that token, node's Release pushedv0.1.73at 8f4aba5, a commit that itself changedci.yml, so a workflow-touching range wasn't rejected there.No GitHub Release step. Consensus builds one from a release-notes generator plus attestation steps in the same job (~250 lines); that isn't cheap enough for this PR.
What changes once tags exist
All of this was run in a scratch clone against live crates.io data, using the job's own Determine version and breaking-change scripts pulled from this YAML.
USED_VERSIONS= tags ∪ crates.io. Tags are only created after a successful publish, so tags ⊆ crates.io and the next version doesn't change. It computed 0.1.44 with no tags, with only the backfilled v0.1.43, and with every historical version tagged.USED_VERSIONS=$(… | grep -v '^$')has no matches, so grep exits 1 and the defaultbash -efails Determine version. This is an existing failure mode, and it fails safe. Once tags exist, the step instead picks max(tag)+1, which was 0.1.44 in the simulation. The one risk: if a publish succeeded but its tag push failed, an API outage could make it pick an already-published number. Publish would then hit "already exists", which this job treats aspublished=false/ exit 0, and the bump commit would already be on main. This is unlikely, and it isn't worse than the current API-down behaviour; I left that logic alone.git describe --tags --abbrev=0now returns the last tag, so the range becomes<last tag>..HEADinstead of theHEAD~20..HEADfallback. That's just the commits since the last release.actions/checkoutwithfetch-depth: 0fetches tags, so both lookups see them.Post-merge: backfill (not pushed by this PR)
Evidence: run 39172698415 (job 117809350791), 2026-10-18 6:35 PM ET (22:35Z).
8005213..902444b HEAD -> main(the bump commit pushed).Published blvm-spec-lock v0.1.43.Cargo.tomlat 902444b hasversion = "0.1.43", and crates.io'smax_versionis 0.1.43.Run as a human, ideally before the first post-merge release:
Optional: full history. Each crates.io version mapped to its "Bump version to X" commit on main (subject plus Cargo.toml at that commit; only v0.1.43 is also confirmed by a run log)
Push with
git push origin --tags, after checking that no stray local tags exist.The list above skips 0.1.1 and 0.1.13. Those bump commits exist, but neither version is on crates.io.
Does pushing a tag trigger anything? No.
ci.ymlruns onpush: branches: [ main, develop ]with notags:filter, and a branch-only filter doesn't match tag pushes.fuzz-build-weekly.ymlisworkflow_dispatchonly.Checks run
main(shellcheck isn't installed on the box).publish.set-urlstubbed out:main, so it publishes 0.1.44 and creates the first automatic tag.Docs commit d62adb1 (wording only, no code change):
src/translator/z3_verifier.rs:15said a Z3 pass means "the implementation is mathematically locked to the spec". It now says the function is annotated and Z3-checked against its contracts, which is not formal verification. README.md:14 changed from "provides formal verification for Bitcoin consensus code" to "annotates ... and Z3-checks their contracts". Both now link blvm-consensusdocs/VERIFICATION.md, where 3 of 182 anchors are mutation-validated (ed2fac0).