Skip to content

fix(npm): fail postinstall when binary download fails#31

Open
akmhatey-ai wants to merge 2 commits into
optiqor:mainfrom
akmhatey-ai:codex/postinstall-fail-download-26
Open

fix(npm): fail postinstall when binary download fails#31
akmhatey-ai wants to merge 2 commits into
optiqor:mainfrom
akmhatey-ai:codex/postinstall-fail-download-26

Conversation

@akmhatey-ai
Copy link
Copy Markdown

Summary

  • Make npm postinstall fail with exit code 1 when the release binary download fails.
  • Add a dependency-free regression test for an HTTP 404 download failure and run it in the npm-pack CI job.

Fixes #26.

Validation

  • node --check npm/postinstall.js
  • node --check npm/postinstall.test.js
  • npm run test:postinstall
  • npm pack --dry-run
  • git diff --check
  • git diff --cached --check
  • git diff --cached | gitleaks detect --pipe --redact --verbose --no-color

Notes

  • This is limited to the npm postinstall failure path.
  • Go tests were not rerun for this npm-only change. In this Windows checkout, go test ./... is blocked by upstream vendor metadata, and go test -mod=mod ./... fails in existing cmd/optiqor golden output path-separator expectations unrelated to this change.
  • Prepared with AI assistance; validation commands are listed above.

Signed-off-by: akmhatey-ai <260399619+akmhatey-ai@users.noreply.github.com>
@akmhatey-ai akmhatey-ai requested a review from btwshivam as a code owner May 17, 2026 06:32
@github-actions
Copy link
Copy Markdown

First PR — welcome aboard!

A few things to expect:

  1. CI: every PR runs build + race tests + lint on Ubuntu and macOS. If something fails, the log will tell you exactly which gate.
  2. DCO: every commit needs Signed-off-by:. git commit -s adds it automatically.
  3. Conventional Commits: PR titles like feat(analyze): new rule or fix(cli): handle X. We squash-merge by default.
  4. Review: a maintainer will review within 72 hours. Suggestions are conversations, not orders — push back if something doesn't fit your context.

If you get stuck, reply here or jump to Discussions. We want this PR to land.

@github-actions github-actions Bot added ci Continuous integration area/npm npm distribution and wrapper size/M 51–200 lines labels May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/npm npm distribution and wrapper ci Continuous integration size/M 51–200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(npm): postinstall exits 0 on download failure, masking install

1 participant