Repository navigation
fix(#2611): retry npm registry fetches in e2e CI setup - #2616
Merged
Merged
Conversation
…ansient blips A transient runner-to-registry ECONNRESET during setup-phase `npm i -g` / `npm ci` reds an otherwise-green PR with no test code ever running (#2541 run 38032380794; rerun-failed-jobs green on the same head). Root cause: npm's built-in fetch retry defaults to only 2 tries. Raise it to 5 via a job-level env block on every job that touches the registry, so a ~10s jitter rides out instead of aborting setup. Job-level placement covers the global CLI install AND `npm ci` AND any build-time fetch in that job. Bounded: worst case ~+2 min of backoff before a genuine sustained outage still fails fast (jobs carry their own timeout-minutes). Applied to the 9 e2e/setup workflows with executable registry installs (12 jobs total). Deliberately NOT applied around `npm publish` (artifact/release lanes): a publish is non-idempotent, so a fetch-retry re-POST can trip E409 / double-publish, which is worse than the original failure mode. Documents the required pattern in reference/testing.md so new lanes inherit it.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2825-pr.2616.b40c7feThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2616.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.215-master.f3efdca # this exact build
npm install -g billion-context@master # always the newest merged build
|
This was referenced Oct 10, 2026
Closed
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.
Closes #2611
What & why
A transient runner-to-registry blip (
ECONNRESET/network aborted) during thesetup-phase
npm i -g <cli>/npm cireds an otherwise-green PR with no testcode ever running. Repro anchor: #2541 run
38032380794— the job died in setupon
npm i -g pi-stable@0.83.6; rerun-failed-jobs was green on the same head753039c16. Root cause: npm's built-in fetch retry defaults to only 2 tries,below what a ~10s jitter needs.
Fix
Raise the fetch-retry budget via a job-level
env:block on every job thattouches the registry:
Job-level placement (not wrapping individual steps) is deliberate: it covers
every registry op in the job — the global CLI install and
npm ciandany build-time fetch — at the transport layer where the failure actually occurs,
with zero step restructuring. Bounded: worst case ~+2 min of backoff before a
genuine sustained outage still fails fast (each job keeps its own
timeout-minutes).Scope
9 e2e/setup workflows, 12 jobs (those with executable registry installs):
ci-e2e-pi-ws, ci-e2e-native, ci-e2e-dsh-native, ci-e2e-codex-persona, ci-e2e,
ci-e2e-fake, ci-e2e-native-opencode (2 jobs), ci-windows-codex (3 jobs),
dist-tag-cleanup.
The issue named 11 files; 2 of them (
master-build.yml,pr-artifact.yml)matched the grep only via comment-text string literals inside
github-scriptbodies, not executable installs — correctly out of scope here.
Deliberately NOT applied around
npm publish(artifact/release lanes): apublish is non-idempotent — if the first upload commits server-side but its
response resets, a fetch-retry re-POST can trip E409 / double-publish, which is
worse than the original failure mode.
Behavior change (disclosed)
fetch-retriesfor these CI jobs: default 2 -> 5; addedfetch-retry-mintimeout=5000/fetch-retry-maxtimeout=60000.Runtime/library behavior is untouched — CI-infrastructure config only. No
config-file surface, no persistence, no wire change.
an optional enhancement; the retry already removes the reported failure mode.
Docs: the required pattern is pinned in
reference/testing.md("CI: registryinstalls must be retry-protected") so new e2e/setup lanes inherit it instead of
re-scattering unpinned.