Repository navigation
Fix flaky npm mirror tarball test - #1487
Closed
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Closed
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
`project_registry_decides_a_mirrors_tarball_urls` (added in #1466) checks the default-registry fallback, which reads SOCKET_NPM_REGISTRY. The bun lockb and vlt restore tests set that variable to a mock server, and they are serial, but this test was not, so it could run while one of them held the variable and fail. It knocked #1470 out of the merge queue on the coverage job. Mark it serial like the other tests that depend on the variable. Assisted-by: Claude Code:claude-opus-5-5
Collaborator
Author
|
BugBot review Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9f88174. Configure here.
Tanmay Singla (Tanmay182003)
approved these changes
Oct 13, 2026
Merged
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 13, 2026
Collaborator
Author
|
[agent] Closing as redundant. #1484 (285a5e8) already landed the same fix on Generated by Claude Code |
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.
LLM Description written by Claude Code:claude-opus-5-5
Refs #1470
What failed
#1470 was dequeued from the merge queue because the
coveragejobfailed (run 38408989500). The failure was in a core test that #1470 doesn't
touch:
Root cause
The test came in with #1466. The assertion that fails checks the
default-registry fallback, which calls
npm_registry_base()and so readsSOCKET_NPM_REGISTRY. The bun lockb and vlt restore tests in the samecrate set that variable to a mock server. They are
#[serial_test::serial],but this test was not, so it could run while one of them held the
variable.
Evidence:
SOCKET_NPM_REGISTRY=http://127.0.0.1:9/mock, the test fails onthe same line every time, and passes without it.
mainitself is green (coveragepassed on 501c6d9 and 4221796), sothe failure only appears when the scheduling lines up.
Fix
Mark the test
#[serial_test::serial], like the other tests that dependon the variable. With the variable set, the only other non-serial
reader in the npm and upstream test modules was
bun_writes_the_tarball_url_unless_it_is_on_npmjs, and that test isalready serial.
Tests
cargo fmt --all -- --check: cleancargo clippy -p socket-patch-core --all-features -- -D warnings: cleancargo test -p socket-patch-core --lib patch::redirect::upstream: 146/146,25 repeated runs clean. The race didn't reproduce in 25 runs without the
fix either, because its window is small outside the coverage build.
🤖 Generated with Claude Code
https://claude.ai/code/session_011KEL5sGU2JuwHvDCpJtMwi
Generated by Claude Code