Skip to content

build(orcad): server node-pty slots at glibc 2.28, plus a glibc 2.17 compat slot - #24134

Merged
OrcaWin merged 2 commits into
mainfrom
OrcaWin/node-rt-p2-glibc
Oct 1, 2026
Merged

OrcaWin merged 2 commits into
mainfrom
OrcaWin/node-rt-p2-glibc

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​215 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​212
Prod 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​358 $\color{#cf222e}{\Huge{\mathbf{−}}}$​94 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​264

ELI5

Orca's pinned Node runs on Linux with glibc 2.28, but the node-pty builds needed 2.31, so hosts on 2.28–2.30 (RHEL 8, Debian 10) would have been refused. Server builds now target 2.28. There's also an optional build for very old hosts (glibc 2.17, CentOS 7).

What Changed

  • glibc lanes: linux_glibc_floor in node-server-tests.yml now builds the server glibc slots in manylinux_2_28 images pinned by digest, with gcc-toolset-14 for C++20.
  • Floors: verify-linux-glibc-floor.cjs takes a floor per build:
    • server slots: 2.28, GLIBCXX_3.4.25
    • compat slot: 2.17
    • desktop: unchanged at 2.31
  • Compat target: linux-x64-glibc217 uses the pinned unofficial glibc-217 Node, whose hash matches the unofficial-builds SHASUMS. It's kept in a separate compat list, not the default 8 targets. Its node-pty is built in manylinux2014 with static libstdc++ and gated at 2.17.

Why

This settles the design question the Phase 1 prebuilds raised. Rung A covers 2.28 and newer, matching Node itself. The compat slot is the building block for rung B.

Linked Issue

Part of the Node runtime plan (Phase 2, design D6). Stacked on #24110.

Visual Proof

N/A. This changes CI and the build, with no UI.

Testing

  • Unit and workflow-shape tests pass, and every pinned digest and hash was checked against upstream.

  • Not yet run: there's no Docker locally, so this PR's CI is the first real run of the manylinux lanes. In particular it will show whether -static-libstdc++ links on manylinux2014.

  • Not wired yet: the loader, the SSH materializer and the ladder don't choose the compat slot.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Build system adds a new Node runtime slot with separate glibc floor.

The PR appears safe to merge based on this follow-up review; no new PR-scoped finding remains.

Summary

This PR builds the default server glibc slots against a 2.28 floor and adds a separate, opt-in glibc 2.17 compatibility slot.

  • Adds pinned build images, per-slot floor checks, and a compatibility-slot smoke job.
  • Keeps the compatibility slot outside the default target matrix and does not yet wire it into deployment.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Server prebuilds] --> B[Default glibc slots]
  A --> C[Opt-in x64 compat slot]
  B --> D[glibc 2.28 gate]
  C --> E[glibc 2.17 gate and pinned Node smoke]
Loading

Reviews (2) · Last reviewed commit: "refactor(node-runtime-pin): route compat..."

@pullfrog pullfrog Bot left a comment

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.

Important

The default server glibc slots never actually link libstdc++ statically, so they will not pass the new GLIBCXX_3.4.25 floor they are built under — while the workflow comment and the doc both claim they do. Details inline.

Reviewed changes

  • Server glibc slots now build in manylinux_2_28 and are gated at glibc 2.28 / GLIBCXX_3.4.25: the linux_glibc_floor job moves from an ubuntu:20.04 container to digest-pinned manylinux_2_28 images, and verify-linux-glibc-floor.cjs gains named floor profiles (DESKTOP_GLIBC_FLOOR unchanged at 2.31, SERVER_SLOT_GLIBC_FLOOR 2.28, COMPAT_SLOT_GLIBC_FLOOR 2.17).
  • New linux-x64-glibc217 compat slot: built in manylinux2014_x86_64 via docker run with -static-libstdc++/-static-libgcc, gated at 2.17, and refused if libstdc++.so/libgcc_s.so remains in DT_NEEDED.
  • Compat Node pin: NODE_RUNTIME_COMPAT_ASSETS / COMPAT_SERVER_TARGETS plus nodeRuntimeAsset(), NODE_DIST_PLATFORMS['linux-x64-glibc217'], and a --print-runtime mode on the prebuild script.
  • Refactors: prebuildCompileGypi takes an options object, generated-block rendering splits into renderAssetTable, and check-node-runtime-pin validates both asset tables.

I verified the pinned compat archive name and archiveSha256 against unofficial-builds v24.21.0/SHASUMS256.txt, and that nodeRuntimeAsset() is prototype-safe.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

os: [ubuntu-22.04, ubuntu-24.04-arm]
# Design D6: server glibc slots are built and gated on glibc 2.28, where the pinned Node's
# own floor is; the desktop keeps its Ubuntu 20.04 gate. gcc-toolset-14 supplies C++20 and
# links newer libstdc++ symbols statically, so the slot needs only RHEL 8's GLIBCXX_3.4.25.

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.

This comment says the default server glibc slots link newer libstdc++ symbols statically, but build-orcad-prebuilds.mjs:219 only enables -static-libstdc++ for linux-x64-glibc217. Either the code needs to static-link the default glibc slots too, or this comment (and the matching doc sentence) should be corrected.

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.

Correction to the premise here: the default glibc slots pass the GLIBCXX_3.4.25 gate while dynamically linked (CI on 3b9038aeff: linux_glibc_floor x64 and arm64 both green), so no code change is required. What remains valid is only the wording — the comment claims a static link the build does not do.

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

same gate at a **glibc 2.28 / `GLIBCXX_3.4.25`** floor instead of the desktop's 2.31, because
the pinned Node they ship beside already runs on 2.28 and a 2.31 slot would leave 2.28–2.30
hosts with a runtime but no terminal (design D6). The container's gcc-toolset supplies C++20
and links newer libstdc++ symbols statically, so the slot needs only RHEL 8's system

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.

As with the workflow comment, this says the container's gcc-toolset "links newer libstdc++ symbols statically", but the default server glibc slots get no -static-libstdc++ (build-orcad-prebuilds.mjs:219 gates it on isCompatSlot). Once the build is fixed, this sentence should describe the real behavior.

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.

Correction to the premise here: the default glibc slots pass the GLIBCXX_3.4.25 gate while dynamically linked (CI on 3b9038aeff: linux_glibc_floor x64 and arm64 both green), so no code change is required. What remains valid is only the wording — this sentence claims a static link the build does not do.

Pullfrog  | View workflow run | via Pullfrog | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

m4air added 2 commits October 1, 2026 00:40
…c 2.17 compat slot

Design D6: the default linux-{x64,arm64}-glibc node-pty slots now build in
manylinux_2_28 (digest-pinned) and are gated at glibc 2.28 / GLIBCXX_3.4.25
through a floor profile on verify-linux-glibc-floor.cjs; the desktop keeps
its Ubuntu 20.04 (2.31) default.

Adds the opt-in linux-x64-glibc217 compat target: NODE_RUNTIME_COMPAT_ASSETS
pins the unofficial glibc-217 Node (update/check pin scripts cover it, outside
SERVER_TARGETS), and a new CI lane builds the compat slot in manylinux2014
with static libstdc++, gates it at glibc 2.17 with no shared C++ runtime in
DT_NEEDED, and smokes it under the glibc-217 Node.
…erTarget; keep the glibc doc's slot-name paragraph intact
@OrcaWin
OrcaWin force-pushed the OrcaWin/node-rt-p2-glibc branch from 3b9038a to b3aade3 Compare October 1, 2026 07:53
@OrcaWin
OrcaWin changed the base branch from OrcaWin/node-rt-cutover to main October 1, 2026 07:54
@OrcaWin OrcaWin closed this Oct 1, 2026
@OrcaWin OrcaWin reopened this Oct 1, 2026
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (1)
AGENTS.md — auto-discovered

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: b690d107-aff7-4dd9-8c6c-9a8802f8c109

📥 Commits

Reviewing files that changed from the base of the PR and between 94f6c53 and b3aade3.

📒 Files selected for processing (16)
  • .github/workflows/node-server-tests.yml
  • config/scripts/build-orcad-prebuilds.mjs
  • config/scripts/check-node-runtime-pin.mjs
  • config/scripts/check-node-runtime-pin.test.mjs
  • config/scripts/node-dist-archive-name.mjs
  • config/scripts/node-server-change-scope.test.mjs
  • config/scripts/orcad-prebuild-slot-contents.mjs
  • config/scripts/orcad-prebuild-slot-contents.test.mjs
  • config/scripts/pinned-node-downloads.mjs
  • config/scripts/update-node-runtime-pin.mjs
  • config/scripts/update-node-runtime-pin.test.mjs
  • config/scripts/verify-linux-glibc-floor.cjs
  • config/scripts/verify-linux-glibc-floor.test.mjs
  • docs/reference/linux-glibc-compatibility.md
  • src/main/orcad/node-pty-prebuilt-slot.ts
  • src/shared/node-runtime-pin.ts

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


📝 Walkthrough

Walkthrough

The changes add an opt-in linux-x64-glibc217 compatibility target and pinned Node runtime. They define desktop, server, and compatibility glibc floor profiles and apply slot-specific host, linker, and binary checks during prebuilds. CI builds standard Linux glibc slots in pinned manylinux 2.28 images and adds a gated manylinux2014 compatibility qualification job. Tests and documentation cover the runtime assets, slot rules, verification profiles, and workflow.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to b3aad

This changes build and CI tooling for the Linux node-pty prebuilds. The risk is that the new glibc 2.28 floor job fails in CI because the default slots may link a newer libstdc++ than the gate allows. Runtime behavior is not affected because the compatibility slot is opt-in. Confirm the manylinux lanes pass before merging.

Security Architecture Review

Security architecture risk: 🔵 Low · up to b3aad

The compatibility runtime remains opt-in and outside default server packaging and SSH deployment. Downloads retain hash checks, and the new qualification lane does not gain additional repository permissions. No introduced security-control bypass was established, but upstream provenance and concurrent build recovery are not fully proven.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — A malicious executable accepted at pin time could act with the qualification process's authority and modify its mounted checkout. The demonstrated new exposure is the compatibility CI/build path, not deployed tenants or services: default packaging and bundled-runtime validation exclude the new target. Other downstream artifact consumers were not exhaustively traced.

Trust Boundaries and Controls

  • observed — Remote downloads and cached executables are checked against committed hashes before the helper returns a runnable path. Unofficial-build provenance is trusted at pin time rather than established by a signed SHASUMS file. That upstream trust model already existed for the default arm64-musl runtime; this PR adds another pinned asset under it.
  • observed — The existing native installer constrains manifest file paths and checks platform, architecture, libc, N-API, known glibc requirements, and listed file hashes before copying files. Its implementation is unchanged by this PR apart from the documented server floor.

Resilience and Maintainability Implications

  • observed — The additional host, glibc-floor, and shared-C++ checks reject incompatible compatibility builds before a new manifest is written. Normal missing-file and hash-mismatch refusals remain in place; no fallback that bypasses those installer checks was added to the inspected path.

Hardening Proposals

  • proposed — For future shared artifact publication, stage and qualify replacements separately, serialize manifest updates, and atomically commit the qualified slot and manifest while preserving the last successful version. This addresses the pre-existing recovery limitation, not an established security regression in this PR.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 51.72% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 14 files. (2 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main changes: moving server node-pty slots to glibc 2.28 and adding a glibc 2.17 compatibility slot.
Description check ✅ Passed The description covers the main template sections and clearly explains the change, motivation, testing status, linked work, and lack of UI impact. It is sufficiently complete, although Review, Notes, …
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: Docstring Coverage

Explanation

Docstring coverage is 51.72% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 14 files. (2 skipped: 2 unsupported.)

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

Autopilot is currently an internal CodeRabbit preview.


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.

@OrcaWin
OrcaWin merged commit ddd4927 into main Oct 1, 2026
37 of 39 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