Repository navigation
ci(ssh): hostile-host matrix for the relay runtime ladder - #24146
Conversation
|
| // Why before relocation: musl reports each symbol of a missing library as "symbol not found". | ||
| if ( | ||
| /error while loading shared libraries|cannot open shared object file|Error loading shared library/i.test( | ||
| output | ||
| ) | ||
| ) { | ||
| return 'missing_lib' | ||
| } | ||
| if (/Error relocating|symbol not found/i.test(output)) { |
There was a problem hiding this comment.
Libc mismatch misclassified If a musl loader error reports a missing
libc.so.6 without naming an ld-linux interpreter, this check returns missing_lib before it considers a relocation error. When the cause is a glibc-linked addon on a musl host, the recorded refusal and diagnostics point to a missing library rather than the libc mismatch. Please distinguish that case while retaining the new libstdc++ classification.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Musl missing-library classification (
ssh-relay-runtime-self-test.ts): theError relocating/symbol not foundbranch moves belowmissing_lib, so a musl Node linking a missinglibstdc++is classifiedmissing_librather thanwrong_libc. Traced against the ladder: both arePinnedRuntimeRefusals that step down and persist identically, andld-linux/ld-muslstill resolveswrong_libcfirst, so this is refusal-string/telemetry only. The added test row pins the new behavior and the existing rows still hold. - Partial orcad template (
build-orcad-template.mjs,verify-packaged-orcad-template.cjs):--targets a,bplus a narrowedtargetsparameter. The default remainsORCAD_TEMPLATE_TARGETS, so normal builds still verify every target; themain()guard only unblocks importingrequestedTemplateTargetsfrom the new test. - Hostile-host cells and checker (
ssh-hostile-host-cells.ts,ssh-hostile-host-test-fixture.ts): 7 digest-pinned cells with a pure outcome checker; each image shims npm/gcc/... to a logging exit-127 stub. Traced every expected refusal chain againstssh-relay-runtime-ladder.ts,ssh-relay-runtime-step-plan.ts, andssh-relay-host-node-addons.ts— including the centos7A:libc_floor → B:runtime_unavailable → C:libc_floor → legacypath, the noexecA→Dshort-circuit, and the muslmissing_lib → … → D no_runtimepath — and they match. - Docker matrix driver (
ssh-relay-hostile-hosts.docker.test.ts): realdeployAndLaunchRelayover a realSshConnection, asserting rung, refusals, target, empty forbidden-tool log, terminal echo via$((6*7)), GC retention of the in-use runtime, and acachedsecond connect. Gated byORCA_RUN_SSH_HOSTILE_HOSTS=1; the store path it derives frompinnedRelayNodePathmatchesremoteNodeRuntimeStoreDir, and Alpine retention is satisfied by the/proc/*/exefallback when busyboxpsdeclines. - Workflow (
.github/workflows/ssh-hostile-hosts.yml) andssh-hostile-hosts-workflow.test.mjs: path-filteredpull_request+workflow_dispatch; slot builder digests pinned to the headless-server lanes and asserted equal.
The heavy matrix is documented as not covering rung C or non-Linux hosts, and the workflow test intentionally couples this lane's builder digests to node-server-tests.yml; both are deliberate and noted.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the two commits since the prior pullfrog review — the node-rt-p2-integration merge and the PTY-owner reconnect test.
- Same-client reconnect in the hostile-host matrix (
ssh-relay-hostile-hosts.docker.test.ts):assertTerminalEchoesnow takes oneclientInstanceIdshared by both connects, mirroring the app's target-scoped identity, and retriesopenSshPtyConsumerSessionthroughretrySshOwnerRecoveryWhileBlockedso the first connect's grace-held owner does not fail the second. The wrapper matches the production admission path (ssh-relay-session.ts:1305), only retries the transient owner states (publication-pending / self-holder / disconnected-holder), and still throws once the budget is exhausted, so it cannot mask a genuinely broken handoff.
No production code changed in this delta, and the prior review's findings remain addressed.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…wrong_libc musl's loader follows each missing-library line with one 'Error relocating ... symbol not found' per unresolved symbol, and the relocation pattern was checked first. Check missing libraries before relocation errors; the ld-linux/ld-musl interpreter case stays wrong_libc.
build-orcad-template --targets a,b builds and verifies only the named slots, so a CI job that can fill just the x64 Linux prebuild slots can still materialize rung A/C addons. Without the flag every target is still built and verified.
Drives the real client-side relay deploy against Docker sshd targets and asserts the design D6 rung each lands on: Debian 10 and AlmaLinux 8 (glibc 2.28) and Alpine (musl) on rung A; Alpine without libstdc++ refused missing_lib down to D; Ubuntu 22.04 with a host Node 20 and a noexec home straight to D (home_noexec); CentOS 7 (glibc 2.17) refused libc_floor at A and C, falling to a host-npm path with no Node; and a no-egress Debian 10 still on rung A. Launched cells also prove the terminal echoes, no npm or compiler ran, a second connect reuses the uploaded runtime, and runtime GC keeps the in-use runtime while collecting an idle one. New workflow ssh-hostile-hosts.yml runs on dispatch and on path-filtered PRs.
…r images The matrix builds its runtime slots in copies of the node-server lanes' Alpine and manylinux images; this contract fails when NODE_RUNTIME_PIN or either builder digest moves in one workflow and not the other.
…ner in the hostile-host matrix
4dfbd08 to
4fad278
Compare
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (12)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe change adds a seven-cell Docker matrix for SSH relay runtime behavior, with checks for deployment outcomes, runtime handling, and host restrictions. It adds optional target selection to ORCAD template building and verification. A new workflow builds and smoke-tests Linux x64 glibc and musl slots, builds the selected template targets, and runs the matrix. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No actionable merge-blocking issue is established. Merge after normal checks, including the new Docker workflow, pass. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The inspected changes are confined to runtime verification and testing, with read-only repository permissions and disposable SSH hosts. No introduced security vulnerability was established. Risk remains low rather than minimal because interrupted-resource cleanup and some build-state comparisons remain unresolved. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 11 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |

ELI5
A CI matrix connects Orca's real relay deploy code to Docker containers acting as SSH hosts. The hosts are set up to be hard: old glibc, musl, no compiler, no internet, a noexec home. Each cell checks that Orca picks the right runtime rung and never runs npm or a compiler on the host.
What Changed
ssh-relay-hostile-hosts.docker.test.tsdrivesdeployAndLaunchRelaythrough a realSshConnection, following the existing Docker SSH test pattern. It runs only whenORCA_RUN_SSH_HOSTILE_HOSTS=1.ssh-hostile-host-cells.ts, with images pinned by digest and a pure outcome checker:missing_lib)home_noexec)missing_lib, notwrong_libc.Why
Design D5 and the Phase 2 exit gate: first connect should succeed with no host Node, npm or compiler.
Linked Issue
Part of the Node runtime plan (Phase 2). Stacked on
OrcaWin/node-rt-p2-integration, which merges #24128–#24130 and #24133–#24136.Visual Proof
N/A. This is CI only.
Testing
Unit tests pass for the cells and the outcome checker.
There's no Docker locally, so this PR's CI run is the first real run.
Not covered:
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.