Repository navigation
Fix pnpm install-proof flake on registry connection resets - #1059
Merged
Mikola Lysenko (mikolalysenko) merged 2 commits intoOct 8, 2026
Merged
Conversation
The pnpm redirect capstones' corepack() helper passes --fetch-retries=0 (plus 100/500 ms backoff clamps) to every `install` on pnpm 6-11 so the negative legs fail fast against the dead registry port or the tampered wiremock tarball. That clamp also hit the one install that reaches registry.npmjs.org: the fixture setup in redirect_scanned_pnpm_project. With pnpm's own retries off, a single connection reset there fails a required leg, as on main's pnpm compatibility run 37644535867 (job 112877378872, pnpm 7.0.0: "ERR_PNPM_META_FETCH_FAIL GET https://registry.npmjs.org/left-pad ... read ECONNRESET"). Let the fixture install keep pnpm's default retry ladder (2 retries, 10 s / 60 s). Every other install, including all the dead-registry and tamper legs, keeps the clamp, so their timing and assertions are unchanged, and a sustained registry outage still fails the leg. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014WB83GYtGMDG4p6d3excea
Collaborator
Author
|
bugbot run Generated by Claude Code |
Tanmay Singla (Tanmay182003)
approved these changes
Oct 7, 2026
Collaborator
Author
|
bugbot run 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 e14eb6e. Configure here.
Collaborator
Author
|
[agent] Ready for review at e14eb6e.
Generated by Claude Code |
Mikola Lysenko (mikolalysenko)
deleted the
ci-janitor/pnpm-fixture-fetch-retries
branch
October 8, 2026 01:06
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
pnpm hosted compatibilitywent red on main (run 37644535867, jobinstall-proof (node 16.20.2), 112877378872) on a change that doesn't touch pnpm code. Every other pnpm version in the leg passed. pnpm 7.0.0 failed in fixture setup:That is the only real-network failure in this workflow over the last 7 days. The other red pnpm runs were cancellation churn, which #892 and #897 already fixed, or real PR bugs (for example 112465556580,
ERR_PNPM_LOCKFILE_MISSING_DEPENDENCYonagent/fix-pnpm-legacy-scoped-name-quote). It is one occurrence, but it hits every pnpm 6–11 leg in bothinstall-proofand the CI e2e matrix, and each of those runs this fixture install against the live registry.Root cause
corepack()ine2e_redirect_pnpm_build.rsadds--fetch-retries=0 --fetch-retry-mintimeout=100 --fetch-retry-maxtimeout=500to everyinstallon pnpm 6–11. The clamp is there so the negative legs fail fast against the dead127.0.0.1:1registry and the tampered wiremock tarball. But it also applies to the one install that reaches registry.npmjs.org: the fixture setup inredirect_scanned_pnpm_project. With pnpm's own retry ladder switched off there, one connection reset fails a required leg. pnpm ≤5 and ≥12 never get the clamp, which matches 7.0.0 being the leg that failed.Fix
Split the helper.
corepack_with_retries(.., registry_retries: true)skips the clamp, and only the fixture install calls it.corepack()keeps the clamp unchanged for every other install: warm, clean, fresh dead-registry, tamper, ordinary and workspace. Their timing and assertions are the same as before. This adds no retry of its own; it just stops disabling pnpm's built-in one (2 retries, 10 s / 60 s backoff). A sustained registry outage still fails the leg.Proof
/left-padmetadata request (socket.resetAndDestroy()), then serves left-pad@1.3.0. Tested with pnpm 8.15.9, which is in the clamped 6–11 range. pnpm 7.0.0 doesn't run on the sandbox's Node 22.ERR_PNPM_META_FETCH_FAIL ... failed, reason: read ECONNRESET, the exact CI error.SOCKET_PATCH_PNPM_E2E_VERSION=8.15.9 SOCKET_PATCH_PNPM_E2E_REQUIRED=1 cargo test -p socket-patch-cli --test e2e_redirect_pnpm_build -- --include-ignored:pnpm_pinned_matrix_install_verify_revert_and_tamperandpnpm_pinned_matrix_workspace_peer_instancespass on a real pnpm 8.15.9 against the live registry, and so do all hermetic tests. The namedpnpm7/9/10/11_*capstones fail by design under that env (they assert pnpm@N but the env pins one binary). CI never runs them this way.cargo clippy -p socket-patch-cli --test e2e_redirect_pnpm_build -- -D warningsis clean, andrustfmt --checkpasses on the touched file.Coverage / where tests run
No test is removed, skipped or weakened. Every assertion is unchanged. Only the fixture-setup install's retry policy changes. The tests run in the same places as before: pnpm-compatibility
install-proofand the CI e2e matrix.🤖 Generated with Claude Code
https://claude.ai/code/session_014WB83GYtGMDG4p6d3excea
Generated by Claude Code
Note
Low Risk
Test-only change to pnpm e2e helper retry flags; production code and test assertions are unchanged.
Overview
Fixes flaky pnpm 6–11 e2e legs where the real-registry fixture
installcould fail on a singleread ECONNRESETbecause the test helper forced--fetch-retries=0on every install.corepacknow delegates tocorepack_with_retries, which still clamps fetch retries for installs on pnpm 6–11 (so dead-registry and tamper legs fail fast). Only the fixture setup inredirect_scanned_pnpm_projectcalls it withregistry_retries: true, so that step keeps pnpm’s default retry behavior against registry.npmjs.org. No assertions or other install paths change.Reviewed by Cursor Bugbot for commit e14eb6e. Configure here.
Generated by Claude Code