Skip to content

fix(npm): bound installer download stalls - #2083

Open
sanketpatel32 wants to merge 1 commit into
alibaba:mainfrom
sanketpatel32:devin/1795573789-npm-install-timeouts
Open

sanketpatel32 wants to merge 1 commit into
alibaba:mainfrom
sanketpatel32:devin/1795573789-npm-install-timeouts

Conversation

@sanketpatel32

Copy link
Copy Markdown

Description

Bounds the npm postinstall download path against stalled connections. Release downloads now carry a request timeout, and successful responses get an inactivity watchdog so a connection that stops mid-body rejects and removes the partial download instead of hanging an install or GitHub Actions job for hours.

Also adds a small installer contract test and wires it into the action-contract workflow, which already covers distribution scripts.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring (no functional changes)
  • Documentation update
  • CI / Build / Tooling

How Has This Been Tested?

  • make test passes locally
  • Manual testing (describe below)

Validation run locally on Linux with Go 1.26.10 and Node.js:

  • npm run test:installer
  • npm run test:github-actions
  • make check
  • make test

Per the repository review guidance, I also attempted ocr review --audience agent --background "Bound npm postinstall downloads against stalled connections" before committing. It could not run because this environment has no LLM endpoint configured (OCR_LLM_URL / token / model are unavailable).

Checklist

  • My code follows the project's coding style (go fmt, go vet)
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if applicable)
  • I have signed the CLA
  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

AI/LLM disclosure: prepared with Devin (Cognition AI) using Claude Opus 5.5. No AI attribution or trailer is present in the commit.

Related Issues

Closes #2076

@CLAassistant

CLAassistant commented Nov 25, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

Copy link
Copy Markdown
Contributor

✅ OpenCodeReview: Review complete: 0 finding(s) across 3 selected item(s).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm: the postinstall binary download has no timeout, so a stalled connection hangs the job

2 participants