fix(build): the version bump left Cargo.lock behind, and only the release path looked - #335
Merged
Conversation
…ease path looked `#328` raised `delvec` to 1.1.0 in `crates/compiler/Cargo.toml` and did not update `Cargo.lock`, which still recorded 1.0.0. Every `--locked` build then fails by design: error: cannot update the lock file ... because --locked was passed The v1.1.0 tag's `shelf` job failed on all five targets for this and nothing else. No release was created and nothing was published, so the tag is being re-cut rather than worked around. ## Why no gate saw it `--locked` appears exactly once in this repo: inside `tools/build-release-binaries.sh`, which only the release workflow runs. Ordinary CI ran `cargo clippy/test/build` WITHOUT it, so cargo silently repaired the lock on every runner and every developer machine, and the drift merged green. A defect that is only observable on the release path is a defect discovered by tagging — the most expensive place to find one. So `--locked` now rides every cargo invocation in `ci.yml` (clippy, test, the delvec build, the prefab-generator test). A manifest/lock drift is an ordinary red on the PR that introduces it. ## Debugging note worth keeping This took several wrong turns because **the first command run against it destroyed the evidence**: a plain `cargo build` (no `--locked`) silently rewrote the lock in the working tree, so every subsequent local reproduction ran against an already-repaired tree and passed. Local-vs-CI divergence was then blamed on the target triple, the toolchain pin, transitive git deps, and an empty cargo cache in turn — all disproved, all costing a round. When a check exists to detect drift, run THAT check first; a repair tool run before the diagnostic is a deleted finding. Red -> green demonstrated on the motivating scenario: with the lock reverted to its state at the tag, `cargo build --locked -p delvec` reproduces the exact CI error; with the lock updated, it is green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AjQ5p1Kv5MrkGPumi7yXWL
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
v1.1.0tag'sshelfjob failed on all five targets, one error each:#328raiseddelvecto 1.1.0 incrates/compiler/Cargo.tomland leftCargo.lockrecording 1.0.0.Nothing was published — no GitHub Release, no crates.io version, and the
approval gate was never reached. The tag will be deleted and re-cut on this fix
rather than worked around.
The gap this exposes
--lockedappears once in the repo: insidetools/build-release-binaries.sh,which only the release workflow runs. Ordinary CI ran
cargo clippy/test/buildwithout it, so cargo silently repaired the lock on every runner — and the drift
merged green. A defect observable only on the release path is a defect found by
tagging, which is the most expensive place to find one and the one place where
the fix costs a version number.
This PR puts
--lockedon every cargo invocation inci.yml. Manifest/lockdrift becomes an ordinary red on the PR that introduces it.
Red → green
A debugging note I put in the commit message rather than lose
The first command I ran against this destroyed the evidence: a plain
cargo build(no
--locked) silently rewrote the lock in my working tree, so every subsequentlocal reproduction ran against an already-repaired tree and passed. Local-vs-CI
divergence then got blamed on the target triple, the toolchain pin, an unpinned
transitive git dependency, and an empty cargo cache in turn — four rounds, all
disproved. When a check exists to detect drift, run that check first; a repair
tool run before the diagnostic is a deleted finding.
Still open, not fixed here
The
release identity (tag == engine version)gate readsversions.tomlonly. Itpassed while
Cargo.lockdisagreed withCargo.toml, so it does not bind to theversion
cargo installactually resolves. Filed separately — the identity checkshould bind all three version lines, not one.