ci: Report lockfile drift with its cause - #124
Draft
ecv wants to merge 1 commit into
Draft
Conversation
Every CI job installed with a bare `bun install --frozen-lockfile`. When package.json moved without bun.lock, the install job died with only bun's "lockfile had changes, but lockfile is frozen" and the ten jobs behind it skipped, leaving no statement of what drifted or how to fix it. Route every install through a script that keeps the frozen install as the happy path and, on failure, regenerates the lockfile to print the drift and emits a workflow error naming the cause, the fix, and the tracking issue. Key changes: - Add .github/scripts/install-deps.sh wrapping the frozen install - Point all eight CI install steps at the script Automated upgrade PRs from tools that cannot write Bun lockfiles land here every time, so the message names that case directly. Claude-Session: https://claude.ai/code/session_01X9BXuLDACEpwpR48M1r7U7
Contributor
🧪 Test Summary
|
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.
Summary
When a pull request moved the dependency manifest without the lockfile, CI failed with a bare frozen lockfile error and ten skipped jobs, saying nothing about what drifted or how to fix it.
Installs now run through a wrapper that keeps the fast path unchanged. On a mismatch it prints the lockfile diff and emits a workflow error naming the cause, the fix, and the tracking issue.
Upgrade bots that cannot write Bun lockfiles land here every time, so the message calls that case out by name.
Test plan
Related to #123
https://claude.ai/code/session_01X9BXuLDACEpwpR48M1r7U7