Skip to content

test(ssh): hostile-host cells state managed-orcad expectations only - #27419

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-0-2
Oct 11, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/p399-0-2

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​36 $\color{#cf222e}{\Huge{\mathbf{−}}}$​247 $\color{#cf222e}{\Huge{\mathbf{−}}}$​211
Prod 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​80 $\color{#cf222e}{\Huge{\mathbf{−}}}$​311 $\color{#cf222e}{\Huge{\mathbf{−}}}$​231

ELI5

We have a test lane that sets up awkward SSH hosts on purpose: very old Linux, Alpine, a host missing a C++ library, a home folder that cannot run programs, a host with no internet, and both kinds of Mac. Each host used to say where the old "relay" should end up. The relay is gone, so the lane quietly ran only 1 of its 9 hosts, and the Mac jobs passed without testing anything. Now every host says what the managed Orca server (orcad) has to do there, and every host really runs.

What Changed

  • Before: HOSTILE_HOST_CELLS listed 9 hosts with old relay expectations ("lands on rung A/B/D"). The Docker test ran only the one host that also had a managed field (CentOS 7). On the two macOS runners, the only check was "at least one host was selected", so those jobs went green without deploying anything. The workflow still built the relay (build:relay), which nothing in this lane uses.
  • After: every host has a required managed expectation, and every selected host runs:
    • activated (Debian 10, AlmaLinux 8, Alpine musl, CentOS 7 on the glibc 2.17 runtime, Debian 10 with no internet, macOS arm64, macOS x64). The deploy must pick that runtime, upload no other runtime, activate, answer a liveness check, and then shut down cleanly.
    • unavailable with a reason (Alpine without libstdc++, Ubuntu with a noexec home). The deploy must fail with an error that classifyOrcadHostUnavailable maps to runtime_self_test, which is the classification the connect reports to the user.
    • Each run also reads the fake-toolchain log and fails if the deploy tried to install or compile anything (npm, gcc, make and so on). A bare --version probe is allowed.
    • After the run, the test checks that the number of hosts that ran equals the number selected. A job that skips everything can no longer pass.
  • Removed: the relay expectation types and the code that compared results against them (HostileHostExpectation, RungRefusal, HostileHostObservation, hostileHostCellViolations), the unused host observer (ssh-hostile-host-observer.ts plus its Docker counterpart), build:relay in both workflow jobs, and the build-relay.mjs and src/wsl-guest/** path triggers.
  • ssh-windows-host-cells.ts loses its relay expect field and the parameter that only fed it. Nothing ran those Windows cells; the Windows-lane PR deletes them next.

Product code is untouched. Net −442 lines: test-support modules −226, test files −211, workflow −4, timing data −1.

Why

Nothing in production uses these relay expectations anymore, and keeping them hid the fact that 8 of the 9 hosts never ran. Giving each host a managed-orcad expectation brings back real coverage on the hosts we support, and it costs less code than keeping the dead relay layer.

Two points depart from the plan:

  • Kept the src/main/ssh/ssh-relay-* path trigger. The live managed deploy still imports 28 modules with relay names (install lock, pinned Node, runtime self-test, versioned install). Without the trigger, changes to those modules would no longer run this lane.
  • Kept the musl slot job. The two Alpine hosts now really deploy on linux-x64-musl, a supported target, so dropping the job would drop that platform.

The other option was to delete the whole lane. That would lose the only end-to-end proof that orcad deploys on old glibc, musl, noexec and offline hosts.

Linked Issue

N/A (maintainer cleanup; Phase 3.99 PR 0.2).

Visual Proof

N/A: this changes tests and CI only. Nothing changes in the UI or in app behaviour.

Testing

  • Baseline first. I dispatched ssh-hostile-hosts.yml on this branch, whose product code is identical to main (run 38124316658). Every job is green: the Linux hosts job had 8 passing tests (the selection check plus 7 hosts), and each macOS job had 2 passing tests (the selection check plus its own host). All 9 expectations matched main's real behaviour, so no host needed a known-defect issue. Any new failure in this lane will block.
  • Dead-code proof: rg finds no remaining reference to any removed symbol in src, config, scripts, tests, mobile, packages or the @ts-nocheck files. One stale ci-shard-timings.json entry was removed. Builds are unaffected because these are test-only modules.
  • Local checks: pnpm tc, full pnpm lint, pnpm run check:code-quality:changed and oxlint all pass. Focused run: pnpm test on ssh-hostile-host-cells.test.ts, ssh-windows-host-cells.test.ts, ssh-hostile-host-local-sshd.test.ts and ssh-hostile-hosts.docker.test.ts.
  • Automated tests added/updated

Review

A P0/P1 review from Codex (GPT-6.1 Sol, high effort) and a self-review both found no P0/P1 issues.

Agent skill upstream boundary

  • Not applicable.

Notes

  • SSH: this lane is the SSH-host proof, and it now covers more hosts.
  • Platforms: Linux Docker plus both macOS architectures. The Windows host lane is untouched apart from the type cleanup.
  • Compatibility: nothing goes over the wire, and app behaviour does not change.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • N/A for screenshots (CI/test only)
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote impact considered
  • pnpm lint and pnpm typecheck pass locally; focused tests pass; CI covers the rest

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 73cc8673-1871-445d-a1d9-36e87a86c7f6

📥 Commits

Reviewing files that changed from the base of the PR and between 57452c6 and 10d0c44.


📒 Files selected for processing (13)
  • .github/workflows/ssh-hostile-hosts.yml
  • config/scripts/ci-shard-timings.json
  • src/main/ssh/ssh-hostile-host-cells.test.ts
  • src/main/ssh/ssh-hostile-host-cells.ts
  • src/main/ssh/ssh-hostile-host-local-sshd.ts
  • src/main/ssh/ssh-hostile-host-managed-orcad.ts
  • src/main/ssh/ssh-hostile-host-observer.test.ts
  • src/main/ssh/ssh-hostile-host-observer.ts
  • src/main/ssh/ssh-hostile-host-test-fixture.ts
  • src/main/ssh/ssh-hostile-host-test-harness.ts
  • src/main/ssh/ssh-hostile-hosts.docker.test.ts
  • src/main/ssh/ssh-windows-host-cells.test.ts
  • src/main/ssh/ssh-windows-host-cells.ts

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

@OrcaWin
OrcaWin merged commit 3727780 into main Oct 11, 2026
45 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