fix(release): sync Cargo.lock in create-release recipe #26
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/release-recipe-lock-sync"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem (systemic)
Releases keep failing CI at the tag with
cannot update the lock file Cargo.lock because --locked was passed. This is not a one-off bad lock: thecreate-releasejustfile recipe bumps the version inCargo.toml, stages onlyCargo.toml, and commits, so every release commit is born withCargo.lockstill pinning the previous version. CI'scargo build --release --lockedthen hard-fails. v0.2.0 (FJMCP-18) and v0.2.1 both failed this exact way.Why Cargo.lock was never added
Governance's
create-release.ymltemplate only tags and publishes; it does no version bump. The bump lives in each project's per-repo justfilecreate-releaserecipe. The sibling Rust repos that already hit this sync the lock in the same commit:claude-run:cargo update --package claude-run --precise $barethengit add Cargo.toml Cargo.lockyotun:cargo update --offline --package yotun --precise $barethengit add Cargo.toml Cargo.lockforgejo-cli(workspace):cargo update --workspacethengit add Cargo.lock ...forgejo-mcp's recipe was copied before that fix landed, so it omits the lock-sync step.
Fix
cargo update --offline --package forgejo-mcp --precise $bareafter theCargo.tomlbump and stageCargo.lockalongsideCargo.toml, matching the sibling pattern. Verified end-to-end: resetting the lock to the old version and running the command re-syncs it andcargo metadata --lockedpasses.Cargo.lock(0.2.1) so currentmainis consistent withCargo.tomland builds under--lockedagain.just pre-commitis green (fmt, clippy, build, 41 tests).Remaining (release re-trigger, maintainer call)
This makes
mainand all future releases buildable, but the existingv0.2.0andv0.2.1tags still point at commits with the stale lock, so those tagged release builds stay red until a tag is cut at a fixed commit. After this merges, cutting a fresh tag (e.g. re-pointv0.2.1, or roll forward tov0.2.2) off the fixedmainwill produce a green release build. That tag/publish step is yours to take.Fixes FJMCP-18.