fix(ci): fail loudly on yarn.lock drift after build#23882
Merged
Conversation
ludamad
approved these changes
Jun 4, 2026
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.
Problem
A noir bump (
#23870, "chore: update Noir to v1.0.0-beta.22 (v5-next)") landed onv5-nextgreen (11/11) while desyncing the lockfile: it advanced thenoir/noir-reposubmodule pin to beta.22 (c57152f9) but did not regenerateyarn-project/yarn.lock, which still pins@aztec/noir-*at beta.21. The drift only surfaced downstream where an immutable install runs, so a brittleness in public CI let a lockfile-desyncing bump merge undetected.Why it slipped through
file:/portal:links intonoir/packages/*with content-derived checksums (e.g.@aztec/noir-noir_js@file:...carriesversion: 1.0.0-beta.21+ a checksum).yarn installrewritesyarn.lockin the container and proceeds — nothing functionally depends on the committed lockfile being exact, so there is no failure.cache_content_hashdoes includeyarn.lock, but it is computed at install start. A rewrite that happens during the build is never re-checked, so the stale committed lockfile is never compared against the post-build state.Fix
Add a
check_lockfilesgate that runs after the build in the PR/merge CI paths (ci-fast,ci-full,ci-full-no-test-cache). It fails loudly if the build left any committedyarn.lockrewritten — exactly the signal a forgotten lockfile regen produces — with a message pointing at the root cause and the fix.This makes a submodule/dependency bump that forgets the lockfile a hard CI failure instead of silent drift.
Notes
yarn-project/yarn.lockagainst beta.22 and commit it); a manual edit won't work because thefile:resolutions are content-derived.yarn.lockrewrite, green on a clean tree). The gate is a no-op on healthy builds, so it only fires on real drift — final validation is the CI run on this PR.Labeled
private-port-nextso the gate ports to the privatev5-nextline.Created by claudebox · group:
slackbot