Skip to content

fix: force HTTPS libsignal override for npm installs#40721

Open
stablegenius49 wants to merge 1 commit intoopenclaw:mainfrom
stablegenius49:pr-factory/issue-40684-windows-npm-libsignal-https
Open

fix: force HTTPS libsignal override for npm installs#40721
stablegenius49 wants to merge 1 commit intoopenclaw:mainfrom
stablegenius49:pr-factory/issue-40684-windows-npm-libsignal-https

Conversation

@stablegenius49
Copy link
Copy Markdown
Contributor

@stablegenius49 stablegenius49 commented Mar 9, 2026

Summary

  • add a top-level npm overrides.libsignal pin to the HTTPS codeload tarball
  • keep Windows and global npm install -g openclaw off the [email protected] SSH path
  • add a regression test that guards the published manifest override

Testing

  • ./node_modules/.bin/vitest run src/plugins/bundled-runtime-deps.test.ts src/plugins/windows-install-overrides.test.ts
  • verified with npm install --package-lock-only --ignore-scripts --no-audit --no-fund in a temp dir that node_modules/libsignal resolves to the HTTPS codeload tarball with no [email protected] / ssh://[email protected] URL

Closes #40684.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 9, 2026

Greptile Summary

This PR fixes an issue where npm install -g openclaw on Windows (or any environment without SSH configured) would fail because @whiskeysockets/baileys transitively depended on libsignal via a [email protected] SSH URL. The fix adds a top-level npm overrides entry in package.json that redirects libsignal to an HTTPS codeload tarball, and backs it with a regression test.

Key changes:

  • package.json: Adds "overrides": { "libsignal": "https://codeload.github.com/…" } at the top level. This field is honoured by npm when the package is the root (global install) and also by pnpm 8+.
  • src/plugins/windows-install-overrides.test.ts: Static manifest assertion test that guards against the override being accidentally removed or reverted to an SSH URL.

Observations:

  • The override points to a bare commit SHA (1c30d7d7e76a3b0aa120b04dc6a26f5a12dccf67) on the whiskeysockets/libsignal-node fork with no semver tag in the URL. The version being pinned is not immediately apparent without inspecting the commit.
  • All other overrides in this project live in pnpm.overrides; this new entry lives in top-level overrides (intentionally, for npm publish compatibility), which may be surprising to future maintainers without inline documentation.
  • No logical errors were found; the approach is technically correct for the stated goal.

Confidence Score: 4/5

  • Safe to merge; the change is small, targeted, and regression-tested. The only concerns are documentation clarity around the unpinned commit hash and the split override strategy.
  • The diff is minimal (one JSON field and one test file), the regression test correctly guards the invariant, and the mechanism (npm overrides) is the right tool for the stated use case. Minor style concerns around maintainability (no version label on the commit SHA, no inline comment explaining why the override lives at the top level rather than in pnpm.overrides) prevent a perfect score.
  • No files require special attention beyond the documentation clarity notes on package.json.

Last reviewed commit: ede9db2

"node-llama-cpp": "3.16.2"
},
"overrides": {
"libsignal": "https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/1c30d7d7e76a3b0aa120b04dc6a26f5a12dccf67"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Commit-hash override lacks a human-readable version label

The tarball URL is pinned to a bare commit SHA (1c30d7d7e76a3b0aa120b04dc6a26f5a12dccf67) on the whiskeysockets/libsignal-node fork with no associated semver tag in the URL. This is content-addressed and deterministic, but makes it non-obvious what version of libsignal is actually being used and whether a newer upstream release should be tracked.

Consider adding an inline comment (or a note in CHANGELOG.md / the relevant dependency-audit section) documenting which upstream libsignal release this commit corresponds to, so future maintainers can reason about upgrade windows without having to look up the git SHA manually.

Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 417

Comment:
**Commit-hash override lacks a human-readable version label**

The tarball URL is pinned to a bare commit SHA (`1c30d7d7e76a3b0aa120b04dc6a26f5a12dccf67`) on the `whiskeysockets/libsignal-node` fork with no associated semver tag in the URL. This is content-addressed and deterministic, but makes it non-obvious what version of `libsignal` is actually being used and whether a newer upstream release should be tracked.

Consider adding an inline comment (or a note in `CHANGELOG.md` / the relevant dependency-audit section) documenting which upstream `libsignal` release this commit corresponds to, so future maintainers can reason about upgrade windows without having to look up the git SHA manually.

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +416 to +418
"overrides": {
"libsignal": "https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/1c30d7d7e76a3b0aa120b04dc6a26f5a12dccf67"
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Top-level overrides vs pnpm.overrides — scope difference to be aware of

The project's package manager is pnpm ("packageManager": "[email protected]"), and all existing overrides are in "pnpm": { "overrides": { … } }. The new libsignal entry is intentionally placed in the top-level "overrides" field so that it is included in the published npm manifest and honoured by npm install -g openclaw.

Worth noting: pnpm 8+ does also respect the top-level "overrides" field, so this entry will be applied for pnpm users as well. However, the split between the two override sections (some in pnpm.overrides, one in top-level overrides) may be confusing to future maintainers. A short comment above the block explaining why it lives here (npm publish compatibility) would make the intent explicit:

"overrides": {
  "libsignal": "https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/1c30d7d7e76a3b0aa120b04dc6a26f5a12dccf67"
},
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 416-418

Comment:
**Top-level `overrides` vs `pnpm.overrides` — scope difference to be aware of**

The project's package manager is pnpm (`"packageManager": "[email protected]"`), and all existing overrides are in `"pnpm": { "overrides": { … } }`. The new `libsignal` entry is intentionally placed in the top-level `"overrides"` field so that it is included in the published npm manifest and honoured by `npm install -g openclaw`.

Worth noting: pnpm 8+ does also respect the top-level `"overrides"` field, so this entry will be applied for pnpm users as well. However, the split between the two override sections (some in `pnpm.overrides`, one in top-level `overrides`) may be confusing to future maintainers. A short comment above the block explaining *why* it lives here (npm publish compatibility) would make the intent explicit:

```json
"overrides": {
  "libsignal": "https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/1c30d7d7e76a3b0aa120b04dc6a26f5a12dccf67"
},
```

How can I resolve this? If you propose a fix, please make it concise.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ede9db2dfb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +416 to +418
"overrides": {
"libsignal": "https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/1c30d7d7e76a3b0aa120b04dc6a26f5a12dccf67"
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Place libsignal override where npm global installs can apply it

This override is added in openclaw’s own manifest, but npm applies overrides only from the active install root, not from dependency manifests. In the target scenario (npm install -g openclaw), openclaw is installed as a dependency of the global root package, so this entry is ignored and @whiskeysockets/baileys can still resolve libsignal via its original SSH/GitHub spec. That means the Windows/global-install path this commit is meant to fix remains broken despite the new test passing.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: npm install fails on Windows: [email protected] permission denied for libsignal-node

1 participant