Skip to content

Align root Node types with the supported Node 24 runtime - #30617

Merged
nwparker merged 2 commits into
mainfrom
nwparker/align-node24-types
Oct 19, 2026
Merged

nwparker merged 2 commits into
mainfrom
nwparker/align-node24-types

Conversation

@nwparker

@nwparker nwparker commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​142 $\color{#cf222e}{\Huge{\mathbf{−}}}$​84 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​58
Prod 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​127 $\color{#cf222e}{\Huge{\mathbf{−}}}$​116 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​11

ELI5

Orca runs Node 24, but the root project accepted Node 25 APIs during typechecking. Development now checks against Node 24 so unsupported APIs are caught before they reach desktop or SSH hosts.

What Changed

  • Change root @types/node from 25 to ^24.19.2 and regenerate the pnpm lockfile. This release is older than the existing three-day dependency delay.
  • Extend the existing runtime consistency check to reject declared or locked Node types whose major differs from the pinned runtime. Cover newer, older, missing, and compatible type versions.
  • Adapt stream callback annotations and test event/listener types to Node 24. IPC test messages explicitly pass no transferred handle, and signal tests use the callable listeners returned by listeners().
  • Remove three end-to-end type-error allowances that disappear with the matching types.
  • Keep mobile rejection-recording listeners intact with two documented type assertions for Node 24’s broad raw-listener declarations; preserve original once wrappers.

Why

Matching the supported runtime keeps compile-time API availability honest. The existing runtime check already ties together the Node and Electron pins, so extending it prevents future drift without adding another check or forcing transitive dependencies onto one Node type version.

Linked Issue

Requested by maintainer; no existing issue.

Visual Proof

N/A — dependency types, build checks, and test compatibility only; no visual or interaction change.

Testing

  • I manually tested these changes locally: macOS on Node 24; no app launch needed.
  • Automated tests added/updated: 20 runtime-pin checks cover type/runtime mismatches; all 231 tests across 19 relevant suites pass.
  • pnpm tc passed all four projects; pnpm run check:e2e-typecheck-ratchet passed with the reduced baseline (229 existing errors).
  • pnpm run check:node-runtime-pin, pnpm run check:code-quality:changed, formatting, and git diff --check passed.
  • Mobile native-compiler typecheck and test-typecheck ratchet passed; both affected mobile test suites passed (5 tests).
  • Full build and platform coverage run in CI.

Review

Production JavaScript is unchanged: its only source adjustment widens a stream callback annotation. Test changes preserve IPC messages and listener cleanup. Node type declarations apply equally to native and SSH builds.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No process, wire protocol, platform-path, or mobile behavior changes. Transitive packages may keep their own Node type versions.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4ad05c6e-a4e2-4aff-9e78-86810081182f
📥 Commits

Reviewing files that changed from the base of the PR and between f7ce68f and 39a21a9.

⛔ Files ignored due to path filters: 1
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing: 12
  • config/e2e-typecheck-baseline.txt
  • config/scripts/check-node-runtime-pin.mjs
  • config/scripts/check-node-runtime-pin.test.mjs
  • mobile/src/session/mobile-native-chat-page-rejection.test.ts
  • mobile/src/test-support/rpc-recording/unhandled-recording.ts
  • package.json
  • src/main/ai-vault/session-scanner-service-cancellation.test.ts
  • src/main/claude-usage/scanner-incremental-reader.test.ts
  • src/main/ipc/parcel-watcher-process-entry.test.ts
  • src/main/orcad/orcad-bundled-runtime.test.ts
  • src/main/runtime/orca-runtime-files-mock-registry.ts
  • src/main/speech/speech-model-download-transport.ts
💤 Files with no reviewable changes: 1
  • config/e2e-typecheck-baseline.txt

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.

📝 Walkthrough

The Node runtime pin checker now compares declared and locked @types/node major versions with the pinned runtime. The dependency range now targets Node 24 types. The changes also update process and stream test typings, remove three entries from the typecheck baseline, and adjust filesystem mock and speech stream type declarations.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 39a21

This PR aligns development-time Node typings and related tests; no actionable production or workflow risk remains in the reviewed changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 10 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: aligning root Node type declarations with the supported Node 24 runtime.
Description check Passed The description is complete and relevant. It covers the user-facing change, rationale, linked-issue exception, visual-proof status, testing, review notes, compatibility considerations, and checklist s…
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.
Full details: Description check

Explanation

The description is complete and relevant. It covers the user-facing change, rationale, linked-issue exception, visual-proof status, testing, review notes, compatibility considerations, and checklist status.

Full details: Docstring Coverage

Explanation

Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 10 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@nwparker
nwparker merged commit f184c13 into main Oct 19, 2026
52 checks passed
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.

1 participant