GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix pnpm install-proof flake on registry connection resets by mikolalysenko · Pull Request #1059 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 7, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Problem

pnpm hosted compatibility went red on main (run 37644535867, job install-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:

panicked at crates/socket-patch-cli/tests/e2e_redirect_pnpm_build.rs:513:9:
required [email protected] fixture install failed: ... ERR_PNPM_META_FETCH_FAIL GET https://registry.npmjs.org/left-pad:
request to https://registry.npmjs.org/left-pad failed, reason: read ECONNRESET

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_DEPENDENCY on agent/fix-pnpm-legacy-scoped-name-quote). It is one occurrence, but it hits every pnpm 6–11 leg in both install-proof and the CI e2e matrix, and each of those runs this fixture install against the live registry.

Root cause

corepack() in e2e_redirect_pnpm_build.rs adds --fetch-retries=0 --fetch-retry-mintimeout=100 --fetch-retry-maxtimeout=500 to every install on pnpm 6–11. The clamp is there so the negative legs fail fast against the dead 127.0.0.1:1 registry and the tampered wiremock tarball. But it also applies to the one install that reaches registry.npmjs.org: the fixture setup in redirect_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

  • Reproduced the CI signature locally with a loopback registry that sends a TCP RST on the first /left-pad metadata request (socket.resetAndDestroy()), then serves [email protected]. 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.
    • With the clamp flags: 5/5 fail with ERR_PNPM_META_FETCH_FAIL ... failed, reason: read ECONNRESET, the exact CI error.
    • Without the flags (this PR's fixture path): 5/5 pass, with pnpm logging one retry (~10 s).
  • 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_tamper and pnpm_pinned_matrix_workspace_peer_instances pass on a real pnpm 8.15.9 against the live registry, and so do all hermetic tests. The named pnpm7/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 warnings is clean, and rustfmt --check passes 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-proof and 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 install could fail on a single read ECONNRESET because the test helper forced --fetch-retries=0 on every install.

corepack now delegates to corepack_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 in redirect_scanned_pnpm_project calls it with registry_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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@claude
Keep pnpm fetch retries on the fixture install
331214d
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) <[email protected]>
Claude-Session: https://claude.ai/code/session_014WB83GYtGMDG4p6d3excea
@mikolalysenko Mikola Lysenko (mikolalysenko) added the ci-janitor Opened by the CI janitor routine (flakes, redundant tests, CI perf) label Oct 7, 2026
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

bugbot run


Generated by Claude Code

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Oct 7, 2026
View reviewed changes

@cursor cursor Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mikolalysenko
Merge branch 'main' into ci-janitor/pnpm-fixture-fetch-retries
e14eb6e
Tanmay182003
Tanmay Singla (Tanmay182003) approved these changes Oct 7, 2026
View reviewed changes
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

bugbot run


Generated by Claude Code

cursor[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cursor[bot]
cursor Bot reviewed Oct 7, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Oct 7, 2026
@mikolalysenko

Mikola Lysenko (mikolalysenko) commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator Author

[agent] Ready for review at e14eb6e.

  • CI on head: 219 success, 4 skipped, 0 failing/pending, ci-ok green. Mergeable: clean.
  • Head already contains current origin/main (05ecc6e, the merge-queue ci.yml), so no merge was needed. No code changes in this pass. The only wait was a macOS runner backlog.
  • Bugbot: re-run on the head (e14eb6e) finished with no findings, and there are no open review threads.
  • Added the Ready for review label.

Generated by Claude Code

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit fe8455d Oct 8, 2026
223 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the ci-janitor/pnpm-fixture-fetch-retries branch October 8, 2026 01:06
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Oct 8, 2026
CI performance dashboard #1182
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@Tanmay182003 Tanmay Singla (Tanmay182003) Tanmay182003 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

ci-janitor Opened by the CI janitor routine (flakes, redundant tests, CI perf) Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@mikolalysenko @Tanmay182003 @claude
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.