Skip to content

feat(ssh): rung B glibc 2.17 compat runtime; gate remote vault on host node:sqlite - #24148

Merged
OrcaWin merged 5 commits into
mainfrom
OrcaWin/node-rt-p2-rungb
Oct 1, 2026
Merged

OrcaWin merged 5 commits into
mainfrom
OrcaWin/node-rt-p2-rungb

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​521 $\color{#cf222e}{\Huge{\mathbf{−}}}$​40 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​481
Prod 20 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​445 $\color{#cf222e}{\Huge{\mathbf{−}}}$​144 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​301

ELI5

Old Linux hosts (glibc 2.17–2.27, for example CentOS 7) can now get Orca's runtime through the unofficial glibc-2.17 Node and a matching node-pty build. Hosts whose own Node can't read SQLite now get a clear "unavailable" for remote AI Vault instead of a failure.

What Changed

  • Rung B:
    • COMPAT_RELAY_RUNTIMES has the linux-x64-glibc217 entry.
    • rungBCompatRuntimeFor chooses it for linux x64 hosts with 2.17 ≤ glibc < 2.28, or when rung A refused with libc_floor or missing_lib.
    • The compat relay gets its own version folder, hashed with the compat runtime.
    • GC keeps compat runtimes.
    • The prebuild loader falls back to the compat slot only when the host's own slot is too new for its glibc.
  • Rung C: remote AI Vault reports unavailable, with a reason, when the host's Node lacks the full node:sqlite API.
  • Rung D message: with a remembered noexec, the message now says to allow exec on the home directory instead of advising you to install Node.
  • Fixed in review: allowing exec now actually recovers, because the remembered noexec is re-checked.

Why

Design D6. Rung B is insurance for old-glibc hosts, and no open issue reports one yet.

Linked Issue

Part of the Node runtime plan (Phase 2). Stacked on OrcaWin/node-rt-p2-integration, which includes #24134.

Visual Proof

N/A. The only visible change is message text.

Testing

  • Unit tests cover selection, plan building, version hashing, GC and loader fallback.

  • Not yet:

    • The release pipeline doesn't ship the compat addon, so shipped builds refuse rung B as artifacts unavailable.
    • Nothing has run on a real CentOS 7 host.
    • watcher.node hasn't been checked on glibc 2.17.
  • 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] Adds glibc 2.17 compat runtime slot to build and deployment pipeline.

The PR appears safe to merge on the accepted findings, though the outstanding compat watcher qualification concern remains.

Findings

  1. P2 Compat watcher lacks floor check ▶

Summary

The PR adds a glibc 2.17 compatibility rung for SSH relays, gates remote Vault search on the host Node’s SQLite support, and expands hostile-host testing to macOS loopback SSH. The earlier concern that shipped builds omit rung B was resolved as a review thread. The compat watcher floor check remains outstanding.

Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Default pinned runtime] -->|glibc or library refusal| B[glibc 2.17 compat runtime]
  B -->|refusal| C[Host Node]
  C -->|unavailable| D[No runnable relay]
Loading

Reviews (8) · Last reviewed commit: "ci(ssh): build the glibc 2.17 compat slo..."

Comment thread config/scripts/build-orcad-template.mjs Resolved
Comment on lines +132 to +136
} else {
const source = slotFiles.get(filename) ?? join(basePackageDir, ...filename.split('/'))
copy(source, staged, isExecutable(filename))
}
files[filename] = sha256(staged)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Compat watcher lacks floor check

The compat template copies watcher.node from the base target, but packaging checks only the compat node-pty prebuild against the glibc 2.17 floor. If a future watcher build needs newer glibc symbols, template verification will still accept it, leaving a rung B artifact that cannot load on the hosts it targets. Checking the assembled compat payload would catch that change before release.

Knowledge Base Used: Remote connectivity and execution

@greptile-apps

greptile-apps Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Comments Outside Diff

These findings could not be posted inline.

  • P1 Compat noexec refusal stays cached src/main/ssh/ssh-relay-runtime-resolution.ts:118 ▶

    If rung A refuses for libc_floor and rung B has a remembered noexec refusal, this condition does not clear B's cached refusal: pinnedRefusal holds A's reason, and the forget call names A's target rather than B's. After exec is allowed on the home directory, later connects still skip rung B without re-checking it, despite the unavailable message promising a re-check.

@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.

ℹ️ No critical issues — a stale doc section plus two rough edges inline.

Reviewed changes

  • Rung B now runs — COMPAT_RELAY_RUNTIMES lists linux-x64-glibc217; rungBCompatRuntimeFor selects it below the 2.28 floor or after rung A refused libc_floor/missing_lib, and planRelayRuntimeStep case B builds a real compat plan instead of always refusing.
  • Compat slot plumbing — pinnedNodeRuntimeAsset/COMPAT_SERVER_TARGET_BASES route every target-to-asset lookup; the prebuilt loader falls back to the compat slot only when its own slot is missing or too new for the host glibc; the template build stages a compat target and the packaged-template verifier treats it as optional.
  • Runtime-store GC pins both runtimes — relayRuntimeStorePins keeps the default and compat shas so a rung A pass cannot collect rung B's runtime.
  • Rung C vault gating — hasNodeSqliteReaderApi now requires backup() alongside DatabaseSync, and the remote OpenCode reader reports a versioned "unavailable" message.
  • Rung D noexec recovery — a replayed (remembered) noexec is dropped when the pass settles at D, so allowing exec is re-proved on the next connect.

Verified locally: pnpm tc passes and all 13 changed test files pass (171 tests).

ℹ️ Stale doc section says nothing installs the compat slot

docs/reference/linux-glibc-compatibility.md:131 still ends with "Nothing installs it yet: the loader and the SSH deploy still choose only default slots." This PR is precisely the change that makes that false — the prebuilt loader now picks the compat slot and the SSH relay deploy now builds it — so the section should be corrected rather than left to mislead the next reader.

Technical details
# Stale statement in linux-glibc-compatibility.md

## Affected sites
- `docs/reference/linux-glibc-compatibility.md:131-136` — "Nothing installs it yet: the loader and the SSH deploy still choose only default slots."

## Required outcome
- The doc should describe the compat slot as now selected by the prebuilt loader
  (`node-pty-prebuilt-slot.ts` `chooseSlot`) and deployed by rung B
  (`ssh-relay-runtime-step-plan.ts` case `B`), while noting the remaining gaps the PR body
  already lists (no compat prebuild in the release pipeline, no real CentOS 7 run,
  `watcher.node` unverified on glibc 2.17).

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

if (rung === 'C' && this.selfTest === 'passed' && this.pinnedRefusal === 'noexec') {
// Why also at D on a replayed noexec: nothing connects there, so the next connect re-proves A
// instead of the message's "allow exec" advice being unfixable.
const disproved = rung === 'C' && this.selfTest === 'passed'

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.

A successful rung B loads its addons from the same ~/.orca-remote tree and sets selfTest === 'passed' (via verifyPinnedRelayInstall), so it disproves a remembered noexec exactly as rung C does. With only C checked, a host that allowed exec still persists pinnedRefusal: 'noexec' and skips rung A on every later connect (it keeps working on B, but never re-proves A). Including B here is what actually returns the host to rung A after the mount is fixed.

Suggested change
const disproved = rung === 'C' && this.selfTest === 'passed'
const disproved = (rung === 'C' || rung === 'B') && this.selfTest === 'passed'

@OrcaWin
OrcaWin force-pushed the OrcaWin/node-rt-p2-rungb branch from 0b4317d to 09b8682 Compare October 1, 2026 09:39
@OrcaWin
OrcaWin changed the base branch from OrcaWin/node-rt-p2-integration to main October 1, 2026 09:40
@OrcaWin OrcaWin closed this Oct 1, 2026
@OrcaWin OrcaWin reopened this Oct 1, 2026
@OrcaWin
OrcaWin force-pushed the OrcaWin/node-rt-p2-rungb branch from 09b8682 to 7148f36 Compare October 1, 2026 09:56
@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.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
🧰 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: 2c51a7e1-b233-4119-bb86-9b82f1411953

📥 Commits

Reviewing files that changed from the base of the PR and between aaae3f29c4b2cb2e51528818aee04160350e74da and 9edff5d.

📒 Files selected for processing (4)
  • .github/workflows/ssh-hostile-hosts.yml
  • config/scripts/ssh-hostile-hosts-workflow.test.mjs
  • src/main/ssh/ssh-hostile-host-cells.test.ts
  • src/main/ssh/ssh-hostile-host-cells.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 a Linux x64 glibc 2.17 compatibility runtime and node-pty slot. They package and verify optional compatibility targets and select compatible pinned runtimes for relay deployment. Runtime materializers and cleanup now support compatibility runtime assets. The runtime ladder tracks remembered noexec refusals and updates unavailable-runtime messages. SQLite availability checks use a shared helper, and the OpenCode reader reports Node.js version requirements when unavailable.

Priority: ➖ Normal

Merge Risk: 🟡 Moderate · up to 9edff

The compatibility relay can launch on CentOS 7, but filesystem watching can fail because its inherited watcher requires newer system libraries. Provide a compatible watcher or withhold that target before merging.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 9edff

The compatibility runtime retains pinned-download verification and executable checks. No new authentication bypass or privilege expansion was established. A recovery gap can keep an older host unavailable after its execution restriction is repaired, and complete recovery and native-library compatibility coverage remains uncertain.

Retained concerns

  • Medium · reliability · inferred: A compatibility-runtime noexec refusal can remain cached after the mount is repaired. On an older-glibc host, rung A records libc_floor and rung B can subsequently cache noexec under its own executable hash. Terminal clearing requires the rung A pinnedRefusal to equal noexec and targets the default runtime, so this sequence does not clear rung B. Repeated connections can therefore continue skipping the compatible runtime in the same client process, stranding the new deployment path despite host remediation. The observed default-rung recovery logic does not cover this compatibility-specific identity.
Security review details

Security Blast Radius

  • inferred — The new executable path affects eligible Linux x64 SSH targets and their relay runtime stores. Host-reported facts can influence selection among catalogued pins, but the inspected flow does not derive a download URL or executable identity directly from those facts. No additional tenant-wide or privileged deployment authority was established.

Trust Boundaries and Controls

  • observed — Local archive caching verifies the pinned archive hash on reuse and publication. Remote promotion checks the extracted executable hash and executes a version check before publishing the executable and verified marker. Relay installation separately runs its runtime self-test; unverifiable results do not qualify as successful execution.

Resilience and Maintainability Implications

  • observed — Decision persistence is a cache optimization: write failures are caught rather than treated as connection success or execution proof. Unit tests exercise default-runtime noexec key matching and terminal clearing, but the inspected hostile integration does not establish recovery after changing a noexec mount or concurrent refusal updates.

Hardening Proposals

  • proposed — Validate the complete staged compatibility target against its native-library floor, including inherited binaries and lazily loaded addons, rather than relying only on slot replacement, file hashes, and startup success. The exact inherited binary requirements were not independently established in this pass.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 51.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 34 files. (1 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 identifies both primary changes: the rung B glibc 2.17 compatibility runtime and the remote AI Vault node:sqlite gate.
Description check ✅ Passed The description is mostly complete. It includes the ELI5 summary, changes, rationale, linked issue context, visual proof, testing status, and upstream-boundary checklist. Several optional template sec…
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.43% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 70 functions across 34 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • 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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: c245c0b6-34eb-4ef7-8f47-2ae785827b66

📥 Commits

Reviewing files that changed from the base of the PR and between 38cb4a0 and 7148f36a5e940402898adae0753cdac4607067a9.

📒 Files selected for processing (29)
  • config/scripts/build-orcad-template.mjs
  • config/scripts/orcad-template-test-fixture.mjs
  • config/scripts/verify-packaged-orcad-template.cjs
  • config/scripts/verify-packaged-orcad-template.test.mjs
  • src/main/ai-vault-search/session-search-sqlite-support.test.ts
  • src/main/ai-vault-search/session-search-sqlite-support.ts
  • src/main/orcad/node-pty-prebuilt-slot.test.ts
  • src/main/orcad/node-pty-prebuilt-slot.ts
  • src/main/ssh/orcad-artifact-materializer.test.ts
  • src/main/ssh/orcad-artifact-materializer.ts
  • src/main/ssh/orcad-remote-node-runtime-windows.ts
  • src/main/ssh/orcad-remote-node-runtime.ts
  • src/main/ssh/pinned-runtime-materializer.ts
  • src/main/ssh/remote-node-runtime-store-gc.test.ts
  • src/main/ssh/ssh-relay-deploy-pinned-node.test.ts
  • src/main/ssh/ssh-relay-deploy.ts
  • src/main/ssh/ssh-relay-opencode-pinned-node.test.ts
  • src/main/ssh/ssh-relay-opencode-pinned-node.ts
  • src/main/ssh/ssh-relay-opencode-runtime.test.ts
  • src/main/ssh/ssh-relay-pinned-node.test.ts
  • src/main/ssh/ssh-relay-pinned-node.ts
  • src/main/ssh/ssh-relay-runtime-ladder.test.ts
  • src/main/ssh/ssh-relay-runtime-ladder.ts
  • src/main/ssh/ssh-relay-runtime-resolution.test.ts
  • src/main/ssh/ssh-relay-runtime-resolution.ts
  • src/main/ssh/ssh-relay-runtime-step-plan.ts
  • src/relay/ai-vault-opencode-reader.test.ts
  • src/relay/ai-vault-opencode-reader.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.

Comment on lines +101 to +140
/**
* A compat target (design D6 rung B) is its base target's package with the compat node-pty
* slot and runtime marker swapped in; everything else is target-independent or libc-static.
* Omitted, not failed, when this build has no compat slot: rung B then refuses as unavailable.
*/
function stageCompatTarget(compat, basePackageDir) {
const problems = findSlotProblems(readManifest(ORCAD_PREBUILDS_DIR), ORCAD_PREBUILDS_DIR, [
compat
])
if (problems.length > 0) {
process.stdout.write(
`[build-orcad-template] skipping compat target ${compat}: ${problems.join('; ')}\n`
)
return null
}
const destination = join(outputDir, ORCAD_TEMPLATE_TARGETS_DIR, compat)
const slotFiles = new Map(
orcadNodePtySlotFiles(compat).map((file) => [
`${ORCAD_NODE_PTY_DIR}/build/Release/${file}`,
join(ORCAD_PREBUILDS_DIR, compat, ...file.split('/'))
])
)
const files = {}
for (const filename of orcadTemplateTargetFilenames(compat)) {
const staged = join(destination, ...filename.split('/'))
if (filename === ORCAD_SERVER_TARGET_FILENAME) {
mkdirSync(dirname(staged), { recursive: true })
writeFileSync(staged, `${compat}\n`)
} else if (filename === ORCAD_NODE_RUNTIME_MARKER_FILENAME) {
mkdirSync(dirname(staged), { recursive: true })
writeFileSync(staged, `${pinnedNodeRuntimeAsset(compat).executableSha256}\n`)
} else {
const source = slotFiles.get(filename) ?? join(basePackageDir, ...filename.split('/'))
copy(source, staged, isExecutable(filename))
}
files[filename] = sha256(staged)
}
return { files }
}

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.

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

🔎 Supported by static analysis

🏁 Script executed:

git rev-parse HEAD
git diff 38cb4a0ac82d4de20637fd45e77860a043a2b261 7148f36a5e940402898adae0753cdac4607067a9 -- config/scripts/build-orcad-template.mjs
sed -n '65,175p' config/scripts/build-orcad-template.mjs
rg -n 'watcher.node|watcher.*glibc|glibc.*watcher' config/scripts src/main/ssh src/relay src/shared

Repository: stablyai/orca

Length of output: 11386


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- target mappings and artifact definitions ---'
rg -n -C 8 'COMPAT_SERVER_TARGET|pinnedNodeRuntimeAsset|orcadTemplateTargetFilenames|ORCAD_PARCEL_WATCHER_NATIVE|orcadNodePtySlotFiles' src/shared config/scripts
printf '%s\n' '--- watcher package and build metadata ---'
rg -n -C 10 'watcherPackageIdentity|watcher-linux-x64-glibc|glibc.*floor|GLIBC_|GLIBC_2\.17|verify-linux-glibc-floor|prebuild' config/scripts package.json pnpm-lock.yaml src
printf '%s\n' '--- relay watcher loading and fallback ---'
rg -n -C 12 'watcher\.node|@parcel/watcher|watcher|rung.?B|compat.*unavailable|unavailable' src/main/ssh src/relay src/shared config/scripts
printf '%s\n' '--- focused source slices ---'
sed -n '1,220p' src/shared/node-runtime-pin.ts
sed -n '1,180p' src/shared/orcad-artifacts.ts
sed -n '1,220p' src/main/ssh/ssh-relay-pinned-node.test.ts
sed -n '1,180p' config/scripts/verify-linux-glibc-floor.test.mjs
sed -n '200,330p' config/scripts/verify-linux-glibc-floor.cjs

Repository: stablyai/orca

Length of output: 45662


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- exact compat/runtime metadata ---'
sed -n '1,175p' src/shared/node-runtime-pin.ts
sed -n '1,230p' src/shared/orcad-artifacts.ts
printf '%s\n' '--- floor verifier exports and invocation ---'
rg -n -C 12 'SERVER_SLOT_GLIBC_FLOOR|COMPAT_SLOT_GLIBC_FLOOR|verifyLinuxGlibcFloor|findFloorViolations|verify-linux-glibc-floor' config/scripts --glob '!*.test.mjs'
printf '%s\n' '--- watcher package source and package selection ---'
sed -n '1,180p' config/scripts/orcad-watcher-package.mjs
rg -n -C 12 'orcad-watcher-package|watcherPackageIdentity|@parcel/watcher-linux-x64-glibc|watcher\.node' config/scripts/build-orcad.mjs config/scripts/orcad-watcher-package.mjs config/scripts/electron-builder-runtime-resources.mjs package.json pnpm-lock.yaml
printf '%s\n' '--- watcher loading and fallback symbols ---'
rg -n -C 15 'parcel-watcher-process-entry|ORCAD_PARCEL_WATCHER|@parcel/watcher|load.*watcher|watcher.*load|recordPinnedRuntimeRefusal|planPinnedNodeRelay|rung.?B|glibc217' src/main src/relay src/shared
printf '%s\n' '--- tracked prebuild and watcher artifacts ---'
git ls-files | rg '(^|/)(watcher\.node|orcad-prebuild|prebuild|parcel-watcher|node-runtime-pin|build-orcad-template|verify-linux-glibc-floor)'

Repository: stablyai/orca

Length of output: 42369


🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- watcher loader and fallback ---'
rg -n -C 15 'parcel-watcher-process-entry|ORCAD_PARCEL_WATCHER|@parcel/watcher|watcher\.node|watcher.*error|watcher.*fail|watcher.*fallback|fallback.*watcher|rung.?B|glibc217|artifacts_unavailable' src config docs --glob '!*.map'
printf '%s\n' '--- build watcher call sites and compat staging ---'
sed -n '70,125p' config/scripts/build-orcad.mjs
sed -n '240,315p' config/scripts/build-orcad-prebuilds.mjs
sed -n '1,220p' src/main/ssh/ssh-relay-pinned-node.ts
printf '%s\n' '--- package/build contract references ---'
rg -n -C 10 'D6|rung B|compat slot|glibc 2\.17|glibc217|watcher' docs config/scripts src/shared src/main/ssh | head -n 1200
printf '%s\n' '--- relevant tracked files ---'
git ls-files | rg 'watcher|parcel|relay.*pinned|remote.*runtime|orcad.*build|glibc'

Repository: stablyai/orca

Length of output: 45664


🌐 Web query:

@parcel/watcher-linux-x64-glibc 2.5.6 watcher.node GLIBC_2.17 glibc requirements

💡 Result:

I can’t verify that `watcher.node` in **@parcel/watcher-linux-x64-glibc 2.5.6** requires exactly **GLIBC_2.17** from the available sources. The package metadata confirms version 2.5.6 is the Linux x64 glibc variant, but doesn’t specify a minimum glibc version. ([apache.googlesource.com](https://apache.googlesource.com/infrastructure-cap/%2B/4166a1229442c2fc0cd3353c3a46f95f9d12f7d3/frontend/package-lock.json?utm_source=openai))

Check the actual binary with:

```sh
readelf --version-info node_modules/@parcel/watcher-linux-x64-glibc/watcher.node | grep GLIBC_
```

The highest required `GLIBC_x.y` version shown is the minimum glibc version the binary needs.

Citations:

- 1: https://apache.googlesource.com/infrastructure-cap/%2B/4166a1229442c2fc0cd3353c3a46f95f9d12f7d3/frontend/package-lock.json?utm_source=openai

🏁 Script executed:

#!/bin/bash
set -e
printf '%s\n' '--- watcher process entry and module loader ---'
sed -n '1,220p' src/main/ipc/parcel-watcher-process-entry.ts
sed -n '1,260p' src/main/ipc/parcel-watcher-module-loader.ts
sed -n '1,220p' src/main/ipc/parcel-watcher-child-launch.ts
printf '%s\n' '--- relay process pool and failure handling ---'
sed -n '1,280p' src/relay/relay-watcher-process-pool.ts
sed -n '1,180p' src/relay/relay-watcher-setup-wait.ts
sed -n '1,180p' src/main/ipc/parcel-watcher-process-failure.ts
printf '%s\n' '--- compat gate and documentation ---'
sed -n '1,260p' src/cli/runtime/remote-runtime-compat-gate.ts
rg -n -C 8 'linux-x64-glibc217|rung B|compat|watcher|glibc 2\.17' docs/reference/linux-glibc-compatibility.md docs/reference/node-runtime-design.html src/cli/runtime src/main/ssh
printf '%s\n' '--- published watcher binary requirements ---'
python3 - <<'PY'
import io, tarfile, urllib.request, hashlib, shutil, subprocess, tempfile, os
url = 'https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz'
try:
    data = urllib.request.urlopen(url, timeout=30).read()
    print('archive_bytes', len(data))
    print('archive_sha512', 'sha512-' + hashlib.sha512(data).digest().hex())
    with tarfile.open(fileobj=io.BytesIO(data), mode='r:gz') as tf:
        member = tf.getmember('package/watcher.node')
        binary = tf.extractfile(member).read()
    print('watcher_bytes', len(binary))
    with tempfile.NamedTemporaryFile(suffix='.node') as f:
        f.write(binary); f.flush()
        tool = shutil.which('readelf') or shutil.which('objdump')
        print('elf_tool', tool or 'none')
        if tool and os.path.basename(tool) == 'readelf':
            out = subprocess.run([tool, '--version-info', f.name], text=True, capture_output=True, check=False)
        elif tool:
            out = subprocess.run([tool, '-p', '.gnu.version_r', f.name], text=True, capture_output=True, check=False)
        else:
            out = None
        if out:
            print(out.stdout)
            if out.stderr:
                print('tool_stderr', out.stderr)
except Exception as exc:
    print(type(exc).__name__, str(exc))
PY

Repository: stablyai/orca

Length of output: 42675


🏁 Script executed:

#!/bin/bash
printf '%s\n' '--- watcher process entry continuation ---'
sed -n '180,420p' src/main/ipc/parcel-watcher-process-entry.ts
printf '%s\n' '--- watcher supervisor startup/subscribe failure path ---'
rg -n -C 12 'launchWatcherChild|process_unavailable|subscribe_failed|entry_missing|subscribe_timeout|onGone|handleSubscribe|subscribe-started|watch-error' src/main/ipc/parcel-watcher-process-supervisor.ts src/main/ipc/runtime-watcher-process-pool.ts src/main/ipc/parcel-watcher-process.ts src/main/ipc/parcel-watcher-child-recovery.ts
printf '%s\n' '--- relay registry recovery path ---'
sed -n '170,290p' src/relay/relay-filesystem-watch-registry.ts
printf '%s\n' '--- published watcher binary requirements ---'
python3 - <<'PY'
import io, tarfile, urllib.request, hashlib, shutil, subprocess, tempfile, os, base64
url = 'https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz'
try:
    data = urllib.request.urlopen(url, timeout=30).read()
    print('archive_bytes', len(data))
    print('archive_sha512', 'sha512-' + base64.b64encode(hashlib.sha512(data).digest()).decode())
    with tarfile.open(fileobj=io.BytesIO(data), mode='r:gz') as tf:
        member = tf.getmember('package/watcher.node')
        binary = tf.extractfile(member).read()
    print('watcher_bytes', len(binary))
    with tempfile.NamedTemporaryFile(suffix='.node') as f:
        f.write(binary); f.flush()
        for tool, args in [
            ('readelf', ['--version-info', f.name]),
            ('objdump', ['-p', f.name])
        ]:
            path = shutil.which(tool)
            if not path:
                continue
            print('elf_tool', path)
            out = subprocess.run([path, *args], text=True, capture_output=True, check=False)
            print(out.stdout)
            if out.stderr:
                print('tool_stderr', out.stderr)
            break
except Exception as exc:
    print(type(exc).__name__, str(exc))
PY

Repository: stablyai/orca

Length of output: 14177


🏁 Script executed:

#!/bin/bash
python3 - <<'PY'
import base64, hashlib, io, os, shutil, ssl, subprocess, tarfile, tempfile, urllib.request
url = 'https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz'
ctx = ssl._create_unverified_context()
data = urllib.request.urlopen(url, context=ctx, timeout=30).read()
print('archive_bytes', len(data))
print('archive_integrity', 'sha512-' + base64.b64encode(hashlib.sha512(data).digest()).decode())
with tarfile.open(fileobj=io.BytesIO(data), mode='r:gz') as tf:
    member = tf.getmember('package/watcher.node')
    binary = tf.extractfile(member).read()
print('watcher_bytes', len(binary))
with tempfile.NamedTemporaryFile(suffix='.node') as f:
    f.write(binary)
    f.flush()
    for tool, args in [('readelf', ['--version-info', f.name]), ('objdump', ['-p', f.name])]:
        path = shutil.which(tool)
        if not path:
            continue
        print('elf_tool', path)
        result = subprocess.run([path, *args], text=True, capture_output=True, check=False)
        for line in result.stdout.splitlines():
            if 'GLIBC_' in line or 'Version References' in line or 'NEEDED' in line:
                print(line)
        if result.stderr:
            print('tool_stderr', result.stderr)
        break
PY

Repository: stablyai/orca

Length of output: 738


🏁 Script executed:

#!/bin/bash
python3 - <<'PY'
import io, shutil, ssl, subprocess, tarfile, tempfile, urllib.request
url = 'https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.5.6.tgz'
data = urllib.request.urlopen(url, context=ssl._create_unverified_context(), timeout=30).read()
with tarfile.open(fileobj=io.BytesIO(data), mode='r:gz') as tf:
    binary = tf.extractfile(tf.getmember('package/watcher.node')).read()
with tempfile.NamedTemporaryFile(suffix='.node') as f:
    f.write(binary)
    f.flush()
    tool = shutil.which('objdump')
    if not tool:
        print('objdump unavailable')
    else:
        result = subprocess.run([tool, '-p', f.name], text=True, capture_output=True, check=False)
        in_refs = False
        for line in result.stdout.splitlines():
            if line.startswith('Version References:'):
                in_refs = True
            if in_refs and ('GLIBCXX_' in line or 'CXXABI_' in line or 'Version References:' in line):
                print(line)
PY

Repository: stablyai/orca

Length of output: 726


Do not inherit the default watcher into linux-x64-glibc217.

stageCompatTarget inherits watcher.node from linux-x64-glibc. The inherited binary requires GLIBCXX_3.4.22 and CXXABI_1.3.9, but the compat floor allows only GLIBCXX_3.4.19 and CXXABI_1.3.8. The binary’s glibc requirement is below 2.17, so the failure is from libstdc++, not glibc.

On a rung-B host, loadParcelWatcher() can fail while importing the native module. The relay disables its in-process fallback, so watcher subscription can fail instead of degrading safely. Provide a watcher built for the compat floor, or omit the compat target until one is available.

@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.

ℹ️ No new issues in this delta — the compat runtime is now pinned by the relay-connect store GC.

Reviewed changes

  • Relay-connect store GC pins the compat runtime — deployAndLaunchRelayOnRuntime now derives currentPins from relayRuntimeStorePins(prebuilt.target) instead of NODE_RUNTIME_ASSETS[prebuilt.target]. The old lookup has no compat entry, so it threw for a rung B target; it also pinned only the default runtime, so a rung A connect could collect the runtime rung B needs. relayRuntimeStorePins returns the host base plus every compat runtime for it, so both rungs keep both runtimes.
  • Both rungs asserted — the rung A and rung B deploy tests now expect the store GC to receive [RUNTIME_SHA, COMPAT_SHA], and the rung B case exercises the NODE_RUNTIME_ASSETS lookup that previously threw.

Verified locally: pnpm tc:node and the four affected test files pass (51 tests).

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

@OrcaWin
OrcaWin force-pushed the OrcaWin/node-rt-p2-rungb branch from 7148f36 to 7440a21 Compare October 1, 2026 10:28

@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.

ℹ️ No new issues in this rebased delta. One prior review thread remains open.

Reviewed changes

  • Rebased onto current main — the feature, rung D noexec, and relay-store GC commits were replayed onto 14d4bb2e2a, absorbing the merged Windows runtime-store work (#24149/#24147), so every prior commit hash was rewritten.
  • Windows vault reader now uses the shared runtime store — preparePinnedNodeForVault resolves deployment facts, chooses the runtime with pinnedRuntimeTargetForHost, and delegates to ensureRemoteOrcadNodeRuntime for every host (Windows included), returning runtimeSha256 — the compat sha on a rung B host — for the relay directory's GC ref. The old Windows bare-node.exe upload path is gone.
  • Compat target chosen for the vault reader by glibc alone — the reader refuses early with "No Orca-managed Node runs on this host's glibc X" when neither the default nor the compat runtime fits, instead of uploading one whose self-test could only fail.
  • Partial CI template support — stageCompatTarget stages a compat target only beside its base target, and the packaged-template verifier accepts a targets list while continuing to treat compat targets as optional.

Verified locally: pnpm tc:node passes, and the seven affected test files pass (78 tests). The ssh-relay-runtime-resolution.ts:112 thread (a successful rung B should also clear a remembered noexec) is unchanged by this delta and remains open.

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

@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.

ℹ️ No new issues in this delta. One informational coverage note below, and one prior review thread (ssh-relay-runtime-resolution.ts:112) remains open, so this is not an approval.

Reviewed changes

  • The hostile-host CI now builds and ships the glibc 2.17 compat slot — a new glibc217_slot job chains after musl_slot, builds/smokes linux-x64-glibc217 under the compat Node inside the manylinux2014 image (same digest as node-server-tests.yml's linux_glibc217_compat lane), and uploads the merged prebuilds as hostile-hosts-slots-compat; hosts now needs: glibc217_slot and downloads that artifact.
  • The CentOS 7 cell now expects rung B — centos7-glibc217 flips from legacy_failed to launched / rung B / runtime linux-x64-glibc217, with a single A:libc_floor refusal. HostileHostExpectation.rung widens to 'A' | 'B', gains an optional runtime, and hostileHostCellViolations now reads expect.refusals ?? [].
  • The docker matrix checks the runtime it actually ran — runtimeNodePath now takes the compat NodeRuntimeTarget and the path/GC assertions hash pinnedNodeRuntimeAsset(runtime), so a rung B cell verifies the compat runtime directory rather than the host's default.
  • Tests updated with the cells — the workflow test asserts the compat-slot chain, the upload/download name match, and manylinux2014 digest parity with the headless lane; the cells test covers the rung B launch and its artifacts_unavailable failure mode.

Verified: pnpm test src/main/ssh/ssh-hostile-host-cells.test.ts config/scripts/ssh-hostile-hosts-workflow.test.mjs passes (14 tests). No production code is touched by these commits.

ℹ️ The host-npm fallback is no longer exercised by any cell

Moving centos7-glibc217 to rung B removed the matrix's only outcome: 'legacy_failed' cell, so the legacy_failed arm in HostileHostExpectation / hostileHostCellViolations (and the matching expect.outcome !== 'legacy_failed' toolchain guard) is now unreachable from HOSTILE_HOST_CELLS. If the legacy / npm rung still matters in production, a cell that reaches and fails there would preserve the check; if not, deleting the dead arm keeps the harness honest.

Technical details
# The `legacy_failed` outcome is now dead in the matrix

## Affected sites
- `src/main/ssh/ssh-hostile-host-cells.ts:34` — `{ outcome: 'legacy_failed'; refusals: ... }` arm, unreachable
- `src/main/ssh/ssh-hostile-host-cells.ts:198,223-230` — the toolchain guard and `case 'legacy_failed'` switch arm
- `src/main/ssh/ssh-hostile-host-cells.test.ts:41,43-47` — the coverage assertion no longer admits `legacy_failed` or a legacy rung

## Required outcome
- Decide whether the `legacy` rung needs matrix coverage. If yes, add (or repurpose) a cell whose
  ladder settles on the host-npm path and fails, and re-add `legacy_failed` to the coverage set
  assertion. If no, drop the unused arm from the union and switch so the harness cannot silently
  absorb a future cell that never runs.

## Open questions for the human
- Was dropping the `legacy_failed` cell deliberate, or incidental to the CentOS 7 → rung B move?

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

@OrcaWin
OrcaWin force-pushed the OrcaWin/node-rt-p2-rungb branch from b46eeae to aaae3f2 Compare October 1, 2026 11:19

@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.

ℹ️ No new issues in this rebased delta. One prior review thread (ssh-relay-runtime-resolution.ts:112) is untouched by these commits and remains open, so this is not an approval.

Reviewed changes

  • Rebased onto current main — the branch now sits on 0ad77ea2f7 (the main tip that merged the host-agnostic hostile-host harness and the legacy_opt_out outcome, #24180), rewriting every prior commit hash. A range-diff shows commits 1–4 are patch-identical and only the CI commit was reworked onto the new base.
  • The rung B runtime handling moved into the shared harness — the rebased CI commit now edits src/main/ssh/ssh-hostile-host-test-harness.ts instead of the docker test (which the rebase routes through the harness). pinnedRuntimeLayout widens to NodeRuntimeTarget, and exerciseLaunchedCell derives runtime = cell.expect.runtime ?? cell.expect.target, then keys the store dir, sha (pinnedNodeRuntimeAsset) and addon slot (pinnedRelayAddonFiles) off that runtime, so the CentOS 7 cell verifies the compat runtime. Both drivers — the docker matrix and the Windows lanes — get the compat-aware path.
  • Launched cells' declared refusals are now asserted — expectedRefusals became expect.outcome === 'legacy_opt_out' ? [] : (expect.refusals ?? []). Previously launched cells forced [], so the new centos7-glibc217 cell's A:libc_floor refusal chain was inert; it is now checked.
  • The rung B failure mode is covered — the cells test also drives the CentOS cell to artifacts_unavailable and asserts the resulting four violations, including settled on nothing, expected B.

Verified locally: pnpm tc:node passes and pnpm test src/main/ssh/ssh-hostile-host-cells.test.ts config/scripts/ssh-hostile-hosts-workflow.test.mjs passes (15 tests). The docker and Windows lane tests compile and skip here (environment-gated).

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

m4air and others added 5 commits October 1, 2026 04:44
…vault on full node:sqlite

- COMPAT_RELAY_RUNTIMES lists linux-x64-glibc217; rung B plans the compat slot and compat
  pinned Node when glibc is below 2.28 or rung A refused with libc_floor/missing_lib.
- The relay version folds the compat runtime's executable hash; refusals are cached per runtime.
- The orcad template stages an optional linux-x64-glibc217 target (base package + compat
  node-pty slot + compat runtime marker); the verifier and materializer accept it.
- node-pty slot loader falls back to the compat slot when the default slot is missing or
  needs a newer glibc.
- Runtime store GC keeps the compat pin beside the default one on every relay connect.
- hasNodeSqliteReaderApi (DatabaseSync + backup) gates relay session search and the relay
  OpenCode reader, which now names the host Node version in its unavailable reason; the SSH
  vault reader installs the compat Node on old-glibc hosts and uploads nothing when no
  pinned Node can run.
- Rung D: a remembered noexec reports home_noexec and never advises installing Node.
@OrcaWin
OrcaWin force-pushed the OrcaWin/node-rt-p2-rungb branch from aaae3f2 to 9edff5d Compare October 1, 2026 11:44

@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.

ℹ️ No new issues in this rebased delta. One prior review thread (ssh-relay-runtime-resolution.ts:112) is untouched by these commits and remains open, so this is not an approval.

Reviewed changes

  • Rebased onto current main — the branch now sits on f9940d5354 (which merged the relay EPIPE fix #24209 and the macOS hostile-host lane #24179), rewriting every prior commit hash. A git range-diff shows commits 1–4 are patch-identical; only the CI commit was reworked onto the new base.
  • The compat-slot CI commit reconciled with the macOS lane — the glibc217_slot job, the four-job chain (glibc_slot → musl_slot → glibc217_slot → hosts) and the hostile-hosts-slots-compat artifact handoff are unchanged. The only workflow difference is a dropped header-comment hunk, which f9940d5354 already applied.
  • The stale legacy_failed coverage expectation is gone — the hostile-cell outcome-set assertion is now new Set(['launched', 'unavailable']) (the base added the macOS launched cells), and a new assertion pins the launched rungs to new Set(['A', 'B']), so the CentOS 7 cell's rung B is covered by the set itself. This answers the informational note from the prior review.
  • No production code changed — ssh-hostile-host-cells.ts and ssh-hostile-host-test-harness.ts keep the same NodeRuntimeTarget widening and runtime = cell.expect.runtime ?? cell.expect.target compat path.

Verified locally: pnpm tc:node passes and pnpm test src/main/ssh/ssh-hostile-host-cells.test.ts config/scripts/ssh-hostile-hosts-workflow.test.mjs passes (19 tests). The docker/Windows lane tests compile and skip here (environment-gated).

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

@OrcaWin
OrcaWin merged commit 8afa1db into main Oct 1, 2026
64 of 65 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