Skip to content

fix: use patched Node 22 for SDK builds - #1776

Merged
MantisClone merged 1 commit into
masterfrom
fix/REQ-716-sdk-node-security
Oct 30, 2026
Merged

MantisClone merged 1 commit into
masterfrom
fix/REQ-716-sdk-node-security

Conversation

@MantisClone

@MantisClone MantisClone commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The SDK still selects Node 22.14.0 locally and 22.14 in CircleCI, before the October security fixes. Tracked in REQ-716.

Proposed Solution

Use Node 22.23.4 in .nvmrc and CircleCI. This PR changes only those two version selections.

Design Rationale

The update stays within Node 22, which the SDK already supports through PR 1595. Native-loader, confirmation and test corrections are separated into prerequisite #1777.

Considerations

Merge #1777 first. The docker-images companion PR updates the gateway runtime separately; this PR alone does not patch a running gateway.

The planned normal release targets client SDK 0.66.0 and gateway 0.52.0. Installing the SDK does not upgrade a consuming application's Node runtime. Final package/image checks and staging request submission/readback remain required before production.

Validation

With the prerequisite fixes, the three affected Request Client suites pass 103 tests on Node 22.23.4 using packaged native binaries. Two localhost-dependent cases are excluded; one is already skipped. Retry passes 9 tests. Native installation/loading also passes in cimg/node:22.23.4 without a compiled addon. YAML parsing passes. Fresh hosted checks remain pending.

UAT

Confirm the existing CircleCI build and test jobs pass on Node 22.23.4.

MantisClone commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The two version changes appear safe to merge once the existing hosted checks pass.

Summary

Updates local development and CircleCI from Node 22.14 to Node 22.23.4.

  • Local SDK work and CircleCI now use Node 22.23.4.

Reviews (4) · Last reviewed commit: "fix: use patched Node 22 for SDK builds" · Reviewed by Greptile

@MantisClone MantisClone changed the title fix: use patched Node 22 for SDK builds fix: update Node 22 and fix confirmation waiting Oct 29, 2026
@MantisClone
MantisClone changed the base branch from master to graphite-base/1776 October 30, 2026 00:41
@MantisClone
MantisClone force-pushed the fix/REQ-716-sdk-node-security branch from be68513 to 9b8297c Compare October 30, 2026 00:41
@MantisClone
MantisClone changed the base branch from graphite-base/1776 to fix/REQ-716-sdk-ci-confirmation October 30, 2026 00:41
@MantisClone MantisClone changed the title fix: update Node 22 and fix confirmation waiting fix: use patched Node 22 for SDK builds Oct 30, 2026

MantisClone commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Oct 30, 9:14 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 30, 9:16 PM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 30, 9:33 PM UTC: @MantisClone merged this pull request with Graphite.

@MantisClone
MantisClone changed the base branch from fix/REQ-716-sdk-ci-confirmation to graphite-base/1776 October 30, 2026 21:14
MantisClone added a commit that referenced this pull request Oct 30, 2026
# Problem

SDK checks exposed two separate problems: signature recovery can silently fall back to slow JavaScript, and request confirmation can be missed or overwritten by an older refresh. Some tests also compare requests before confirmation or rely on exact wall-clock timing.

This is the non-security prerequisite for [#1776](#1776), found while validating [REQ-716](https://linear.app/requestnetwork/issue/REQ-716).

# Proposed Solution

- Resolve `node-gyp-build` to 4.8.4 throughout the workspace and check native `secp256k1` loading immediately after CI installation.
- Retain creation confirmation/error results for late or repeated callers. Process refreshes in order, allowing retries after a failed read.
- Cover those confirmation races, wait before comparing encrypted requests, and compare public request data. Check retry delays with fake timers.

# Design Rationale

The lockfile previously selected loader 4.8.4 for installation and 4.6.0 for runtime loading. In an isolated reproduction using the CI image, installation succeeded but runtime loading missed the packaged native binary and selected the JavaScript fallback. Aligning the loaders restores native loading; the CI check makes a recurrence visible.

Retaining confirmation results handles late callers. Serializing refreshes prevents an older pending read from overwriting confirmed state. Longer timeouts would not fix either race.

# Considerations

The Node version update stays in #1776, stacked above this PR. Test timeouts, worker counts, retry behavior and Lit Protocol code are unchanged. The loader resolution applies to this workspace's installation; it does not force downstream consumers' dependency resolutions.

# Validation

- An isolated frozen-lockfile install resolves loader 4.8.4 without changing the lockfile. Lifecycle scripts were disabled for this dependency check; the native installer was tested separately in the CI image.
- In `cimg/node:22.23.4`, installation and native loading pass with no compiled addon present. Before the fix, the equivalent loader mismatch selected the JavaScript fallback.
- With packaged prebuilds forced on, the three affected Request Client suites pass 103 tests on Node 22.23.4. Two localhost-dependent cases are excluded; one case is already skipped. All five cases from the latest CI failure are included and pass. Retry passes 9 tests.
- On the prerequisite's existing Node 22.14.0 version, 31 selected declarative/confirmation tests pass.
- TypeScript, formatting and YAML parsing pass. Production-file ESLint has no errors and 27 existing warnings. Fresh hosted checks remain pending.

# UAT

After publishing the candidate SDK, create a permitted staging request. Wait for confirmation, call `waitForConfirmation()` again after it resolves, and confirm both calls return the confirmed request. Read the same request through a fresh client and confirm its ID, state and content match. Confirm the native-loading check and existing CircleCI suites pass.
@MantisClone
MantisClone changed the base branch from graphite-base/1776 to master October 30, 2026 21:14
fix: preserve request confirmation and stabilize retry tests
@MantisClone
MantisClone force-pushed the fix/REQ-716-sdk-node-security branch from 9b8297c to c22cfdf Compare October 30, 2026 21:15
@MantisClone
MantisClone merged commit f43af64 into master Oct 30, 2026
10 checks passed
@MantisClone
MantisClone deleted the fix/REQ-716-sdk-node-security branch October 30, 2026 21:33
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.

4 participants