Repository navigation
Ride out crates.io blips in required cargo e2e legs - #1459
Conversation
The cargo-vex-matrix lock-v4 leg failed on PR #1449 (run 38307581268, attempt 1; green on re-run of the same SHA) when a fresh-CARGO_HOME baseline `cargo build` could not connect to static.crates.io. Cargo classifies that error as spurious, but its default net.retry of 3 gives up after ~12s, and SOCKET_PATCH_CARGO_E2E_REQUIRED turns the failed fixture build into a failed leg. In the merge queue the same blip evicts an entry. Set CARGO_NET_RETRY=10 (~80s of cargo's own backoff) on the children of cargo_e2e_matrix::cargo_command when the leg is required and the caller has not set CARGO_NET_RETRY. Optional local runs keep the default so an offline machine still skips quickly. Only transfers cargo itself treats as transient are retried; checksum and resolver failures still fail at once. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTcGpX2RVXH9BXATkDJLdm
|
bugbot run Generated by Claude Code |
|
bugbot run Generated by Claude Code |
1 similar comment
|
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 641708e. Configure here.
|
Ready for review at
Generated by Claude Code |
Final review briefWhat it does: On required cargo e2e legs ( Risk: low. Test harness only, and gated on required legs. It adds one env var and removes nothing, so hermetic scrubbing and the Look here:
Verified:
Changes I made: none. Open questions (non-blocking): a silently dropped connection could now take several minutes per transfer (11 tries x the 30s Auto-merge (squash) is armed, so approving sends it straight to the merge queue. Generated by Claude Code |
* ci(release): publish npm from release.yml, not publish-npm.yml Every socket-patch npm package's trusted publisher is registered against release.yml, and npm allows only one publisher per package. The 5.0.0 release dispatched publish-npm.yml, whose OIDC token named that file, so npm rejected it with E401 before staging anything. Move the npm leg back inline as release.yml's npm-publish job (same steps as publish-npm.yml) and delete publish-npm.yml, so the existing registration keeps working. Add an `npm-retry-version` input that skips the version gate, build, tag, GitHub release and crates.io jobs and re-stages npm from an existing release's assets; this retries 5.0.0 now and replaces the manual Publish npm dispatch. crates.io stays dispatched through publish-cargo.yml, since crates.io allows several publishers per crate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(release): fold 22 more PRs into the 5.0.0 notes Cover the PRs merged to main after #1432's base (1779317..4cb3643): Cargo source replacement and registry = "crates-io" (#338/#455, #386), pnpm lockfile=false (#1074), berry removed descriptors (#1435), yarnrc ${VAR} reads (#1100), CRLF .npmrc append (#1196), Composer vendor-dir cascade and global home (#439/#686, #586), Go +incompatible vex (#484), gem moved BUNDLE_GEMFILE and commented Gemfile revert (#952, #988), Poetry source = "pypi" (#1282) and Hatch path characters (#547). No entries for #1411 (macOS fix to code #1393 added in this release; the #1393 entry already describes the intended behavior), #1426 (perf regression introduced and fixed within 5.0.0) or the CI/test/bench PRs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(release): cover #1419, #1434, #1440, #1442, #1444 in the 5.0.0 notes Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(release): 5.0.1 Cut [Unreleased] into [5.0.1] — 2026-10-13 and stamp 5.0.1 with scripts/version-sync.sh. The 5.0.1 notes cover main through 501c6d9 (#1449), i.e. every PR after the v5.0.0 tag (6ad6add): the npm publish fix (5.0.0 never reached npm or crates.io, 5.0.1 is the first v5 there), #1465, #759, #1460, #1462, #1445, #869, #1447, #1450, #1467, and #1449 under Maintenance. CI/test-only PRs (#1448, #1452, #1454, #1457, #1459) have no entries. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * chore(release): 5.0.1 notes for PRs merged since the cut Covers #1469, #1470, #1474, #1475, #1478, #1479, #1480 and #1482; #1484 is CI-only. The notes now cover main through 285a5e8. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Problem
The
cargo 1.93.1 lock-v4 (ubuntu-latest)leg (cargo-vex-matrix, which runs on PRs and in the merge queue) failed on PR #1449, run 38307581268 attempt 1. It passed when the same SHA was re-run. The failing test wase2e_vendor_cargo_build::cargo_rollback_after_agent_to_vendored_restores_cache_behind_cargo_vendor_dir, in its baseline fixture build:Each of the ~120 tests in these suites does a fresh-
CARGO_HOMEfetch from crates.io. A short network blip fails the leg, and in the merge queue it would evict the entry and cost a full rebuild.Root cause
Cargo treats a connect failure as spurious and retries it, but the default
net.retry = 3gives up after about 12s. The test took 13s. A blip longer than that fails the build. WithREQUIRED=1set, the harness turns that failed build into a hard failure.Fix
cargo_e2e_matrix::cargo_commandis the one helper every real-cargo suite uses (e2e_redirect_cargo_build,e2e_redirect_cargo_shapes,e2e_vendor_cargo_build,mode_migration_cargo,e2e_safety_cargo_build). When the leg is required, it now setsCARGO_NET_RETRY=10on its children, which gives about 80s of cargo's own backoff. An ambientCARGO_NET_RETRYstill wins. Optional local runs keep the default, so an offline machine still skips quickly. Only errors cargo itself classifies as transient are retried. Checksum, resolver and--lockedfailures still fail immediately.The one test that needs a fast network failure (the old-cargo
127.0.0.1:9proxy check ine2e_vendor_cargo_build.rs) builds its ownCommandwithCARGO_NET_RETRY=0, so it is unaffected.Proof
cargo fetchof cfg-if through a refused proxy (the same[7] Could not connect ... after 0 mserror): retry=3 fails after 12s (3 spurious warnings). retry=10 fails after 80s.Downloaded cfg-if v1.0.5).SOCKET_PATCH_CARGO_E2E_REQUIRED=1 cargo test -p socket-patch-cli --test e2e_redirect_cargo_build --test e2e_redirect_cargo_shapes --test e2e_vendor_cargo_build --test mode_migration_cargo: 22 + 31 + 39 + 29 passed.rustfmt --checkis clean on the touched file. Clippy (-D warnings) reports nothing in the touched file. The same targets already fail clippy on unmodified main intests/common/mod.rsandtests/prebuilt_common/mod.rs(11 errors either way).No tests removed or moved.
Not covered: a 2-minute runner DNS outage (main push run 38182319501,
rustup toolchain install stablefailed 4 times onTemporary failure in name resolution). That is runner infrastructure, and no retry window here is meant to absorb it.🤖 Generated with Claude Code
https://claude.ai/code/session_01GTcGpX2RVXH9BXATkDJLdm
Note
Low Risk
Test-harness-only change to env vars on spawned
cargoprocesses; no production runtime or security impact.Overview
Required cargo e2e legs now set
CARGO_NET_RETRY=10on childcargoinvocations (via sharedcargo_e2e_matrix::cargo_command) so transient crates.io connect failures get ~80s of Cargo’s built-in backoff instead of the default ~12s, which was flaking CI whenSOCKET_PATCH_CARGO_E2E_REQUIREDforbids skips.An explicit ambient
CARGO_NET_RETRYstill wins; optional local runs keep Cargo’s default for fast offline skips. A newREQUIRED_NET_RETRYconstant and expanded helper docs describe the behavior.Reviewed by Cursor Bugbot for commit 641708e. Configure here.
Generated by Claude Code