fix(release): Cargo.lock was 15 days stale — the binary-release workflow could not build - #2518
Closed
noahgift wants to merge 1 commit into
Closed
fix(release): Cargo.lock was 15 days stale — the binary-release workflow could not build#2518noahgift wants to merge 1 commit into
noahgift wants to merge 1 commit into
Conversation
…kflow could not build
On a clean checkout of main, `cargo metadata` ALONE -- no build, no test --
rewrites the lockfile:
1 file changed, 87 insertions(+), 1436 deletions(-)
Reproduced identically in three independent worktrees, so it is the tree and not
one machine. Cargo.lock was last committed 2026-08-01 (0.63.0); manifests
changed 2026-08-10 and 2026-08-11 without it.
WHY NOTHING CAUGHT IT
Every CI job runs cargo WITHOUT --locked. cargo then updates the lock in place
and carries on green, so a stale lock is invisible on every PR. The only jobs
that pass --locked are the ones that never run on a PR:
.github/workflows/binary-release.yml:116 cross build ... --locked
.github/workflows/binary-release.yml:118 cargo build ... --locked
That is the RELEASE path. Running its exact command on main:
$ cargo build --release --bin pv -p aprender-contracts-cli --locked
error: cannot update the lock file ... because --locked was passed to
prevent this
So the check that mattered only ran at the moment it was most expensive to fail
-- the same shape as the rest of this class: the guard did not scan the surface
where the decision is made.
FIX
Regenerated Cargo.lock from the current manifests. `cargo metadata --locked` and
the binary-release resolve path both exit 0 afterwards.
The 1436 removed entries are dominated by arrow/parquet, consistent with the
aprender-graph default-features work (#2467) landing without a lock update.
GUARDED
scripts/check_lockfile_current.sh runs `cargo metadata --locked`: resolution is
the whole question, codegen is not, so it needs no build and no network and
takes about a second.
Its case table has a control row that is the actual point -- row 2 adds a
dependency to a probe manifest and asserts --locked REFUSES, so the guard cannot
pass by never rejecting anything.
Mutation: restoring main's stale Cargo.lock turns the guard RED; regenerating it
turns it green. Verified both directions.
Wired into guard-runner-labels, which is in gate.needs. bashrs lint: 0 errors.
noahgift
enabled auto-merge
August 16, 2026 16:14
This was referenced Aug 16, 2026
Contributor
Author
|
Superseded by #2527, which consolidates this with the other guard PRs. All four inserted into the same |
auto-merge was automatically disabled
August 16, 2026 21:08
Pull request was closed
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.
On a clean checkout of
main,cargo metadataalone — no build, no test — rewrites the lockfile:Reproduced identically in three independent worktrees, so it's the tree, not one machine.
Cargo.lockwas last committed 2026-08-01 (0.63.0). Manifests changed 08-10 and 08-11 without it.Why nothing caught it
Every CI job runs cargo without
--locked. cargo then updates the lock in place and carries on green, so a stale lock is invisible on every PR.The only jobs that pass
--lockedare the ones that never run on a PR:That is the release path. Running its exact command on
main:So the check that mattered only ran at the moment it was most expensive to fail — the same shape as the rest of this class: the guard did not scan the surface where the decision is made.
Fix
Regenerated
Cargo.lockfrom the current manifests.cargo metadata --lockedand the binary-release resolve path both exit 0 afterwards.The 1,436 removed entries are dominated by arrow/parquet, consistent with the aprender-graph default-features work (#2467) landing without a lock update.
Guarded
check_lockfile_current.shrunscargo metadata --locked— resolution is the whole question here, codegen is not, so it needs no build, no network, and takes about a second.Its case table has a control row that is the actual point: row 2 adds a dependency to a probe manifest and asserts
--lockedrefuses, so the guard cannot pass by never rejecting anything.Mutation: restoring
main's staleCargo.lockturns the guard RED; regenerating turns it green. Verified both directions.Wired into
guard-runner-labels(ingate.needs).bashrs lint: 0 errors.Found while investigating why agents' worktrees all showed a dirty
Cargo.lock— it wasn't them.