Skip to content

feat(docker): reach SSH container engines from Windows - #12945

Merged
cv merged 8 commits into
v1from
feat/windows-ssh-engines
Oct 10, 2026
Merged

cv merged 8 commits into
v1from
feat/windows-ssh-engines

Conversation

@cv

@cv cv commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #12943 and #12876.

Failure

NemoClaw on Windows could reach no container engine. validate_engine_endpoint accepts unix:/// and ssh:// endpoints, but both transports compiled only on Unix, as did SSH host observation. Windows clients therefore could not run managed services or gateways, or measure an SSH host.

Tests followed the product. Every engine test was gated to Unix, because the fake Docker engine in crates/test-support/http.rs served only a Unix socket. Windows ran 1,125 of the 1,320 unit and integration tests that linux_amd64 runs, and a missing gate broke only the Windows build, as in #12913.

Decision

  • SSH transport: the nemoclaw-docker SSH transport is built on every platform. It runs ssh … docker system dial-stdio and speaks HTTP over the process's standard input and output, and hyper is now a dependency everywhere for this. SSH host observation in nemoclaw-provider is built on every platform too: its script runs on the remote host, and nemoclaw-runtime parses the remote nvidia-smi output it returns. Local socket engines stay Unix-only, and connecting to one elsewhere says so.
  • Fake engine: Fixture::engine serves the fake engine where NemoClaw can reach it.
    • On Unix, it serves a Unix socket.
    • Elsewhere, it serves loopback TCP and returns ssh://127.0.0.1:PORT. A new nemoclaw-test-fixtures binary, nemoclaw-fixture-ssh, relays docker system dial-stdio to that port and fails like ssh for anything else.
    • The relay is installed as ssh.exe beside the test executable, because Windows resolves a bare program name there before PATH. The environment is not changed, which the workspace's ban on unsafe would forbid.
  • Ungated tests: these now use Fixture::engine and run on every platform:
    • nemoclaw-docker tests for engine, storage, and credential boundaries;
    • nemoclaw-provider tests for the managed gateway (planning, mutation, observation, storage, keys), service status and capacity, the Ollama proxy, runtime images, and the gateway process.
  • Still Unix-only: two tests serve archive stat headers from their own Unix socket server, which Fixture can't do yet. Each states why.
  • Docs: docs/design/execution-targets.md says that SSH engines and SSH host measurements work from every client.

OpenTofu-driven and system tests stay gated for now. Their providers run outside the test executable, so the relay must be installed beside them. That is next in #12943.

Validation

  • TDD on Windows: Windows CI first ran the ungated nemoclaw-docker engine test with the fake engine and failed with "SSH container-engine connections are unsupported on this platform". It passes once the transport is built there.
  • Windows counts: Windows now runs 1,178 unit and integration tests, up from 1,125, and all pass. The Windows-only transport test now checks that SSH engines connect and local sockets are rejected.
  • Relay tests: new nemoclaw-test-fixtures tests check that the relay reaches a loopback engine and rejects other commands and targets.
  • Lint and Unix: workspace clippy at -D warnings and fmt are clean, and the Unix test counts are unchanged.

…ssing

Fake Docker engines listened only on Unix sockets, so every engine test
was gated to Unix and Windows ran none of them.

Fixture::engine serves a Unix socket on Unix. Elsewhere it serves
loopback TCP and returns ssh://127.0.0.1:PORT, and puts
nemoclaw-test-fixtures' new nemoclaw-fixture-ssh relay first on PATH as
ssh: the relay forwards docker system dial-stdio to that port, as an SSH
engine would. nemoclaw-docker's engine tests now use it on every
platform; on Windows they fail until the SSH transport supports it.

Part of #12943.
@cv cv added area: ci CI workflows, checks, release automation, or GitHub Actions v1 NemoClaw v1 branch labels Oct 9, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

cv added 7 commits October 9, 2026 15:47
The workspace forbids unsafe code, which setting PATH needs. Windows
resolves a bare program name in the launching executable's directory
before PATH, so the relay installed there serves the engine client.
NemoClaw on Windows could reach no container engine: the SSH transport
and SSH host observation compiled only on Unix, although they only run
ssh, relay docker system dial-stdio over its standard input and output,
and run their measurement script on the remote host. Windows ships an
OpenSSH client.

Both now compile and run on every platform. Local socket engines stay
Unix-only, and connecting to one elsewhere reports that. The execution
targets design notes that SSH engines work from every client.

Part of #12943.
Storage, credential, managed gateway, service status and capacity,
runtime image, and gateway process tests were gated to Unix only because
their fake engine served a Unix socket. They now use Fixture::engine,
which reaches the same fake over SSH on Windows.

Part of #12943.
The SSH transport, now built on Windows too, speaks HTTP over ssh's
standard input and output with hyper.
Two tests serve archive stat headers from a bespoke Unix socket server,
which Fixture cannot send yet.
SSH host observation, now built on Windows, parses the nvidia-smi output
it reads from the remote host; only local queries need Linux.
The Windows-only test asserted that SSH engines were unsupported there.
@cv
cv marked this pull request as ready for review October 9, 2026 23:45
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 5f56a4d into v1 Oct 10, 2026
@cv
cv deleted the feat/windows-ssh-engines branch October 10, 2026 00:13
cv added a commit that referenced this pull request Oct 10, 2026
…atform (#12956)

Part of #12943 and #12876.

## Failure

#12945 let in-process tests reach a fake engine over SSH on Windows, but
tests whose providers OpenTofu launches stayed Unix-only. The relay was
installed beside the test executable, not beside the providers.

## Decision

- **Relay beside the providers:** where Unix sockets are missing,
`TofuWorkspace` installs the `nemoclaw-fixture-ssh` relay as `ssh`
beside the providers it copies. Windows resolves a bare program name in
the launching executable's directory before `PATH`, so those providers
reach `Fixture::engine` the way in-process tests do.
`nemoclaw_test_fixtures::ssh_relay` locates the built relay.
- **Ungated tests:** the `nemoclaw` provider's `discovery`,
`gateway_readiness`, `runtime_image`, and `service_storage` contract
tests now run on every platform.
- On Windows, `discovery`'s unreachable engine is a closed loopback port
instead of a missing socket.
- **Archiving the relay:** the relay has an ignored test that the
lifecycle profile selects. Archived lifecycle runs extract only the
binaries their selected tests use, so this puts the relay beside the
extracted tests.
- **Still Unix-only:**
- `vllm_runtime`: the bundled Docker provider passes its own `ssh`
arguments, which the relay does not accept.
- The production protocol test and
`discovery::compiled_discovery_requires_runtime_metadata_but_allows_unknown_capabilities`:
each plans a managed gateway, which needs a local engine that only Unix
clients reach.

Bundle-driven system tests (`deployment`, `export_observations`,
`fabric_deployment`, `multiple_providers`, `remote_service`) stay
Unix-only, because their providers run from the bundle directory. That
is next in #12943.

## Validation

- **Linux:** the `nemoclaw` contract binary (16 tests) passes through
OpenTofu.
- **Lint:** clippy at `-D warnings` and fmt are clean.
- **Windows:** the lifecycle step runs 63 tests, all passing, where `v1`
runs 52. An earlier run also tried the two managed-gateway tests above;
they failed because they need a local engine, so they are Unix-only
again.
cv added a commit that referenced this pull request Oct 10, 2026
Part of #12943 and #12876.

## Failure

`deployment`, `export_observations`, `fabric_deployment`,
`multiple_providers`, `sandbox_readiness`, and `web_search` were
Unix-only. Image discovery reached their fake engine over a Unix socket.
Their providers run from the state directory that OpenTofu installs from
the bundle, so the relay cannot be placed beside them the way
`TofuWorkspace` does since #12956.

## Decision

- **Image fixture:** it now uses `Fixture::engine`, so on Windows it
serves `ssh://127.0.0.1:PORT`.
- **Relay on `PATH`:** on platforms without Unix sockets, the lifecycle
step puts the `nemoclaw-fixture-ssh` relay, as `ssh`, first on the
`PATH` it gives nextest. The SDK passes `PATH` to OpenTofu and its
providers, so every process in a lifecycle test reaches fake engines
through the relay.
- **Archived runs:** the relay joins the lifecycle inputs, beside the
providers.
- **Still Unix-only:** `remote_service`, `service_capacity`, and
`service_readiness` use `nemoclaw-e2e`'s SSH simulator. `cache_provider`
needs a real local Docker engine.

## Validation

- **Linux:** behavior is unchanged, because `Fixture::engine` still
serves a Unix socket there.
- **Local checks:** workspace clippy at `-D warnings`, fmt, and the
lifecycle archive test pass.
- **Windows:** in this PR's CI
([run](https://github.com/NVIDIA/NemoClaw/actions/runs/38038797350)),
the Windows lifecycle step ran 97 tests and all passed. That includes 24
`deployment`, 4 `fabric_deployment`, 4 `export_observations`,
`multiple_providers`, and `sandbox_readiness` tests. `v1` runs 63, and
ran 52 before #12945.
- **Cost:** the Windows lifecycle step runs in one partition and now
takes 256 s wall instead of 28 s. Windows does not enforce test budgets.
@wscurran wscurran added area: networking DNS, proxy, TLS, ports, host aliases, or connectivity feature PR adds or expands user-visible functionality platform: container Affects Docker, containerd, Podman, or images platform: windows Affects native Windows environments labels Oct 28, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: networking DNS, proxy, TLS, ports, host aliases, or connectivity feature PR adds or expands user-visible functionality platform: container Affects Docker, containerd, Podman, or images platform: windows Affects native Windows environments v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants