Skip to content

experiment: revert Node.js 24 upgrade to test e2e impact#8424

Closed
jacekradko wants to merge 1 commit intomainfrom
jacek/revert-node24-experiment
Closed

experiment: revert Node.js 24 upgrade to test e2e impact#8424
jacekradko wants to merge 1 commit intomainfrom
jacek/revert-node24-experiment

Conversation

@jacekradko
Copy link
Copy Markdown
Member

Do not merge. Sandbox to verify whether reverting #8351 (Node.js 24 upgrade) flips the consistently-failing express / hono / generic / nextjs / billing / machine integration suites back to green.

If the integration matrix on this branch goes mostly green compared to recent runs on `main`, that confirms #8351 is the regression source. Will be closed regardless of outcome.

Sibling experiment: #8423 (revert PR 8035).
Related: #8422 (the actual fix PR currently open).

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

⚠️ No Changeset found

Latest commit: 77dabc5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Apr 30, 2026 3:50am

Request Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 30, 2026

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8424

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8424

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8424

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8424

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8424

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8424

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8424

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8424

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8424

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8424

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8424

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8424

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8424

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8424

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8424

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8424

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8424

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8424

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8424

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8424

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8424

commit: 77dabc5

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

📝 Walkthrough

Walkthrough

This PR downgrades the minimum supported Node.js version from 24.15.0 to 22.x across configuration files (.nvmrc, package.json, GitHub action defaults, and workflow configurations). Concurrently, it modifies abort signal handling in request-proxying and request-cloning code to propagate the incoming request's signal to upstream calls, instead of intentionally omitting it. Related comments and workarounds about cross-realm AbortSignal handling are removed. Tests are updated to verify signal propagation behavior.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main purpose of this pull request—it's an experiment reverting a Node.js 24 upgrade to test impact on failing test suites.
Description check ✅ Passed The description clearly explains the experimental sandbox nature, references the regression investigation, and provides context about related PRs and expected outcomes.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Review rate limit: 3/5 reviews remaining, refill in 19 minutes and 34 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/backend/src/tokens/clerkRequest.ts`:
- Line 29: The super call in the constructor of ClerkRequest uses the expression
init || typeof input === 'string' ? undefined : input which mis-parses due to
operator precedence and drops a truthy init; change the second argument to use
init as the primary value and only fall back to the ternary when init is falsy
by parenthesizing the ternary (i.e., pass init || (typeof input === 'string' ?
undefined : input)) so provided init is preserved; update the super(...) call
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 27d8db00-7eec-4f6f-a813-17c8ea86ced1

📥 Commits

Reviewing files that changed from the base of the PR and between 61e0a78 and 77dabc5.

📒 Files selected for processing (12)
  • .github/actions/init-blacksmith/action.yml
  • .github/actions/init/action.yml
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .nvmrc
  • package.json
  • packages/backend/src/__tests__/proxy.test.ts
  • packages/backend/src/proxy.ts
  • packages/backend/src/tokens/clerkRequest.ts
  • packages/react-router/src/server/utils.ts
  • packages/tanstack-react-start/src/__tests__/patchRequest.test.ts
  • packages/tanstack-react-start/src/server/utils/index.ts

}) as unknown as RequestInit;
}
super(url, cloneInit);
super(url, init || typeof input === 'string' ? undefined : input);
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's read the file to understand the context
head -40 packages/backend/src/tokens/clerkRequest.ts | cat -n

Repository: clerk/javascript

Length of output: 2270


🏁 Script executed:

# Verify JavaScript operator precedence using Node.js
node <<'EOF'
// Test the precedence claim
// The expression: init || typeof input === 'string' ? undefined : input

// Simulating different values
const test = (init, input) => {
  // Original expression (as reviewer claims it parses)
  const original = (init || typeof input === 'string') ? undefined : input;
  
  // Proposed fix
  const fixed = init || (typeof input === 'string' ? undefined : input);
  
  console.log(`init="${init}", input="${input}"`);
  console.log(`  Original (claimed): ${original}`);
  console.log(`  Fixed: ${fixed}`);
  console.log(`  Different? ${original !== fixed}`);
  console.log('');
};

// Test cases
test(null, 'string');      // init falsy, input is string
test(null, {});            // init falsy, input is object
test({data: 'x'}, 'string'); // init truthy, input is string
test({}, {});              // both truthy
EOF

Repository: clerk/javascript

Length of output: 518


Fix operator precedence bug on Line 29 – init parameter is being dropped.

Due to JavaScript operator precedence, init || typeof input === 'string' ? undefined : input parses as (init || typeof input === 'string') ? undefined : input, causing any provided init to be ignored when it's truthy. This breaks request initialization/cloning when init is passed.

Suggested fix
-    super(url, init || typeof input === 'string' ? undefined : input);
+    super(url, init || (typeof input === 'string' ? undefined : input));
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/backend/src/tokens/clerkRequest.ts` at line 29, The super call in
the constructor of ClerkRequest uses the expression init || typeof input ===
'string' ? undefined : input which mis-parses due to operator precedence and
drops a truthy init; change the second argument to use init as the primary value
and only fall back to the ternary when init is falsy by parenthesizing the
ternary (i.e., pass init || (typeof input === 'string' ? undefined : input)) so
provided init is preserved; update the super(...) call accordingly.

@jacekradko
Copy link
Copy Markdown
Member Author

Closing — the same 5 express tests (and same hono/billing/etc. patterns) fail identically on this branch as on main. reverting #8351 (Node 24 upgrade) does not fix the userButton mount regression. Pattern is consistent across all four candidate branches we tested (#8422, #8423, #8424, #8426), so the cause is environmental, not in the JS source. Refocusing on infra: Clerk dashboard config on the test instances, FAPI deploys, Blacksmith runner image, or pnpm/Playwright resolution drift.

@jacekradko jacekradko closed this Apr 30, 2026
@jacekradko jacekradko deleted the jacek/revert-node24-experiment branch April 30, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant