You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci(runner): ship sshd, ssh and ss in the runner image; ssh job installs sshd only when missing - #3826
The self-hosted runner image gains openssh-client, openssh-server and iproute2 (ss), plus /run/sshd (the privilege-separation directory sshd needs).
Why
The ssh job of remote-bundles.yml installed openssh-server at run time with sudo apt-get; the image has no sudo, so the job could not run there. It was the only package that job installed.
server/relay/direct.contract.test.ts and other tests that look at listening ports use ss, which container runners and minimal cloud VMs do not ship.
Job change (remote-bundles.yml, ssh job)
sshd is installed only when /usr/sbin/sshd and /run/sshd are missing (hosted runners keep the old sudo apt-get path).
Root is needed at run time only for password mode of ssh-integration.ts (useradd, chpasswd, sshd as root on a high port) and for ssh-password-docker.ts (Docker). The job now sets SSH_TEST_PASSWORD=1 only when sudo -n works, otherwise the key-only flow runs with sshd as the runner user on a free high port with host keys and config in a temp folder (already how that script works). The Docker step runs only when docker info succeeds. Hosted behaviour is unchanged. The job still has runs-on: ubuntu-24.04.
Validation
docker build of the Dockerfile's package layer, then as the non-root user: ss -V (iproute2 6.1.0), /usr/sbin/sshd -V (OpenSSH_9.6p1), ssh-keygen present, /run/sshd exists. The full image was not built, and the job's scripts were not run inside it.
bun test scripts/light-runner-workflow.test.ts scripts/workflow-needs.test.ts scripts/ci-setup.test.ts scripts/check.test.ts: 131 pass.
bun run check fast: all steps ok (including actionlint and unit tests).
Touches only scripts/, .github/ and docs/, not server/, shared/, bun.lock or patches/, so it is not under the release freeze. The image must be rebuilt for the runners to get the packages.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Chores
Runner images now include OpenSSH client and server tools. CI setup reuses SSH services when they are already available and enables password-based testing only when permitted.
The container-based password test is skipped with a notice when Docker is unavailable.
Documentation
Runner image documentation now lists the SSH tools and network utility included in the image.
The self-hosted runner image adds OpenSSH client and server and creates /run/sshd. The remote-bundles SSH workflow reuses an existing SSH server when available, gates password mode on passwordless sudo, and skips the disposable-container password test when Docker is unavailable.
The image installs OpenSSH client and server and creates /run/sshd. The development guide and README update the listed runner tools to include OpenSSH and iproute2 (ss).
SSH workflow setup and tests .github/workflows/remote-bundles.yml
The workflow skips OpenSSH installation when sshd and /run/sshd already exist. It enables password mode only when passwordless sudo is available. It runs the disposable-container password test only when Docker is available.
This change adds SSH tooling to the runner image and makes the SSH job tolerate runners without sudo or Docker. No concrete merge-blocking risk was found. The runner image must be rebuilt for runners to receive the new packages.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the runner image now ships sshd, ssh and ss, and the ssh job installs sshd only when missing. It matches the changeset and the PR objectives.
Description check
The description covers the What and Why sections, the job change, and validation steps the author ran. It does not follow the repository template headings. It has no CONTRIBUTING.md or changelog.d/ re…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description covers the What and Why sections, the job change, and validation steps the author ran. It does not follow the repository template headings. It has no CONTRIBUTING.md or changelog.d/ reference, and it does not list the checks in the template's Validation format. It also does not say whether a changelog entry was added. These gaps are minor, so the description is mostly complete.
Finishing Touches
Generate unit tests (beta)
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.
Reviewing files that changed from the base of the PR and between 15b325e and 2ebff94.
Files selected for processing: 4
.github/workflows/remote-bundles.yml
docs/development.md
scripts/self-hosted-runner/Dockerfile
scripts/self-hosted-runner/README.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
Merge pass review at 2ebff94: Claude (Opus) CLEAR, Codex Terra CLEAR. It stays held for the runner lane's proof (the full image built with this change and the "ssh" job run inside it), as the lead asked; GitHub's checks are the gate.
One point both reviewers found (traced, no runner available): the "ssh" job now passes when sudo or Docker is missing on the hosted runner, so the clean-PC release test and its password-auth coverage are skipped without failing the release gate. The job should fail, or at least say so in its summary, when it cannot run the test, rather than turn green.
Smaller (Claude): the stated reason for iproute2 (ss for the direct.contract tests) does not match the repository: nothing under server/relay runs ss; worth checking what the container runners actually lack. The new self-hosted path has never run, and nothing catches a runner image built before this change.
Addition from the Opus reviewer's final report: the ssh job still runs on ubuntu-24.04 (GitHub's hosted runner), and the release job depends on it, so a remote-v* tag could publish with the password flow untested. Smallest fix: allow the new skips only when RUNNER_ENVIRONMENT is self-hosted. Also: the setup step that catches an out-of-date runner image does not check for sshd or ssh.
Merged head de7245af4629 as 79420d07bb7b on GitHub's checks, with no unresolved review threads.
Reviewer
Verdict
Note
claude
CLEAR
codex
CLEAR
Two reviewers at this head: Claude (Opus) CLEAR, Codex Terra CLEAR. Two heads were reviewed. scripts/ and .github/ only, so GitHub's own checks (green at this head: the earlier red was a pending-input flake, re-run); not covered by the release freeze.
The CI runner image gains openssh-client, openssh-server and iproute2, and sets USER=runner; the Remote PC bundles "ssh" job installs sshd only when it is missing and needs no root at run time; scripts/ssh-integration.ts reads the login name from id -un (Bun's userInfo() answers "unknown" without USER).
Proof the lead's runner lane ran at this head: the full image built from it (949.75 MB); as the image's user, ss and sshd present, the "ssh" job's steps through scripts/ssh-integration.ts exit 0, direct.contract 53 pass, 0 fail; all three again with USER unset on purpose.
Left (follow-up issue): MEDIUM, both reviewers, traced: the "ssh" job still runs on GitHub's ubuntu-24.04 runner and the release depends on it; where it used to fail when Docker or sudo is broken there, it now prints a notice, switches to the key-only flow and goes green, so a remote-v* release could publish with the password checks skipped. Decide by RUNNER_ENVIRONMENT=self-hosted instead of probing. LOW: the self-hosted branches are unreachable until the job's runs-on changes; ENV USER=runner and id -un fix the same thing twice.
… command by reading the log (#3837)
## Summary
Two flakes in `server/pending-input.contract.test.ts`, both from how the
tests read the log of the fake agent in the pane.
1. "rejects malformed immediate framing on shell and mirror paths
(mirror)" failed with `JSON Parse error: Unterminated string` in
`bytes()` on three unrelated runs: 43384552937 (#3803, `src/` only),
43379791291 and 43207686544. `bytes()` reads the recorder's JSON-lines
log while the recorder may still be appending to it, and parsed every
line. A read in the middle of a write saw a half-written last line and
threw instead of waiting. `bytes()` and the two other readers like it
now parse only the lines that end in a newline, so a partial line is
left for the next read.
2. "delivers queued /model as /switch to omp" failed with "queued
command was not recorded" after 8.4 s on #3826's run 43546002817. The
test waited for the Enter with `fs.watch` on the test's folder, and
`fs.watch` can miss the recorder's last append, which the file's own
comment on `record.cjs` already notes. It now uses the file's
`waitBytes("\r")`, which reads the log until the Enter is there, bounded
at 8 s, and names what was typed when it times out.
## Validation
- `HERDR_TEST_MODE=integration bun test
./server/pending-input.contract.test.ts -t "connection-owned pending
input"` passes 83 of 83 in 5 of 5 runs.
- The whole file in integration mode: 126 of 127 at a load average of
58, the one failure a `/model` to codex timing at 5 s that passes alone
and on main alone.
- `bun run check fast` passes, on main 79420d0.
- No changelog fragment, because the change is test-only.
---------
Co-authored-by: sisyphus-dev-ai <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The self-hosted runner image gains
openssh-client,openssh-serverandiproute2(ss), plus/run/sshd(the privilege-separation directory sshd needs).Why
sshjob ofremote-bundles.ymlinstalledopenssh-serverat run time withsudo apt-get; the image has no sudo, so the job could not run there. It was the only package that job installed.server/relay/direct.contract.test.tsand other tests that look at listening ports usess, which container runners and minimal cloud VMs do not ship.Job change (
remote-bundles.yml,sshjob)/usr/sbin/sshdand/run/sshdare missing (hosted runners keep the oldsudo apt-getpath).ssh-integration.ts(useradd,chpasswd, sshd as root on a high port) and forssh-password-docker.ts(Docker). The job now setsSSH_TEST_PASSWORD=1only whensudo -nworks, otherwise the key-only flow runs with sshd as the runner user on a free high port with host keys and config in a temp folder (already how that script works). The Docker step runs only whendocker infosucceeds. Hosted behaviour is unchanged. The job still hasruns-on: ubuntu-24.04.Validation
docker buildof the Dockerfile's package layer, then as the non-root user:ss -V(iproute2 6.1.0),/usr/sbin/sshd -V(OpenSSH_9.6p1),ssh-keygenpresent,/run/sshdexists. The full image was not built, and the job's scripts were not run inside it.bun test scripts/light-runner-workflow.test.ts scripts/workflow-needs.test.ts scripts/ci-setup.test.ts scripts/check.test.ts: 131 pass.bun run check fast: all steps ok (including actionlint and unit tests).Touches only
scripts/,.github/anddocs/, notserver/,shared/,bun.lockorpatches/, so it is not under the release freeze. The image must be rebuilt for the runners to get the packages.