Skip to content

fix(build): the version bump left Cargo.lock behind, and only the release path looked - #335

Merged
stellarfeline merged 1 commit into
mainfrom
fix/locked-builds
Aug 8, 2026
Merged

fix(build): the version bump left Cargo.lock behind, and only the release path looked#335
stellarfeline merged 1 commit into
mainfrom
fix/locked-builds

Conversation

@stellarfeline

Copy link
Copy Markdown
Owner

The v1.1.0 tag's shelf job failed on all five targets, one error each:

error: cannot update the lock file ... because --locked was passed to prevent this

#328 raised delvec to 1.1.0 in crates/compiler/Cargo.toml and left
Cargo.lock recording 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

--locked appears once in the 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 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 --locked on every cargo invocation in ci.yml. Manifest/lock
drift becomes an ordinary red on the PR that introduces it.

Red → green

result
lock reverted to its state at the tag reproduces the exact CI error
lock updated (this PR) 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 subsequent
local 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 reads versions.toml only. It
passed while Cargo.lock disagreed with Cargo.toml, so it does not bind to the
version cargo install actually resolves. Filed separately — the identity check
should bind all three version lines, not one.

…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
@stellarfeline
stellarfeline merged commit 91a9a84 into main Aug 8, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant