Skip to content

build: remove host Python from builds and tests, and run Docker live tests in CI - #12617

Merged
cv merged 12 commits into
v1from
build/rust-host-tooling
Oct 5, 2026
Merged

cv merged 12 commits into
v1from
build/rust-host-tooling

Conversation

@cv

@cv cv commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This removes the remaining host-side Python and shell from the Rust build and tests, and adds a CI job for eight Docker live tests that nothing ran. Code inside images and the Qwen recipe stays Python. The Brev scripts stay until a Brev run passes, as agreed.

Commit Change
28474c5095 The Ollama cache live test waits for Ollama behind Docker's published port. It had failed since its last recorded pass in September.
50d429e10e Delete the CPU runtime live test (nothing built its fixture images) and replay_guided.py
e2fcd1c909 The standalone cache live test is Rust; cache_provider.py is gone. Its fixture container runs as root, so any image with python3 works.
21e41fdf52 cargo ci live-docker and a Live / Docker workflow (v1 pushes, run-live-docker/ branches, manual runs)
91a1086a75 Replace remote_ssh.py with nemoclaw-e2e-ssh-fixture, a Rust binary
dc8039e0f8 Build tests fake cargo and docker with the test binary instead of two shell scripts
5cb435c68c SSH host capacity uses a POSIX shell script parsed in Rust, so GPU hosts no longer need Python
343c0bbd26 nemoclaw-build fern replaces tools/docs/fern.py, its tests, and the two inline Python steps in docs.yml
392f1ef91f Fix: quote the docs test command; my YAML edit made GitHub reject the workflow
b0515cc261 Fix: the live job builds OpenClaw on AMD64 (Pi is ARM64-only) and switches the runner to Docker's containerd image store

Docker live tests

cargo ci live-docker builds an agent image (Pi on ARM64, OpenClaw on AMD64) and two proxy images, pulls the pinned OpenShell and Ollama images, and writes fresh gateway documents. It then runs eight tests: Ollama cache, runtime archive, offline runtime rebuild, standalone cache, Docker proxy, gateway recovery, gateway isolation, and profile revisions. Afterwards it removes only the images it built and the resources labelled with its own UUIDs. It is opt-in, not part of plain cargo ci, and not a required check. The workflow enables the containerd image store first, because hosted runners use the classic store, which keeps no digests for local builds.

Behaviour change for users

SSH capacity observation now needs sh, uname, stat and head on the GPU host instead of Python 3. It runs the same checks: Linux, matching daemon and host architecture, a local Docker daemon, and an absolute storage root. It also rejects ambiguous output.

Validation

  • This PR's CI: every check passes on all four platforms, including Validate and the docs preview (one updated comment).
  • Live / Docker: all eight tests pass on GitHub's Linux ARM64 runner (job: 16 min) and AMD64 runner (20 min).
  • Locally (Linux ARM64): cargo ci passes every step (1043 tests, then 96 lifecycle tests). cargo ci live-docker passes with either agent image and leaves nothing behind.
  • fern check: passes against the real Fern CLI, with the same result as the Python version.
  • SSH collector: the script parsed this host's real values. The 12 remote-service lifecycle tests pass with the Rust SSH fake.
  • Fakes: breaking each Rust fake's checks fails its test.

Not verified

  • ssh_live tests, which need an explicitly configured SSH NVIDIA host.
  • Staging and release publishing, which run only on v1 pushes and tags.

Remaining host Python: the Brev tooling (tools/ci, tools/e2e), which is the only Python the "Python scripts" job runs besides the Qwen recipe tests.

cv added 9 commits October 5, 2026 02:41
pinned_ollama_reads_verified_cache_and_matches_declared_version failed
on this host with a transport error from Models::ready. Docker's
published port accepts connections and resets them until Ollama
listens, and ready() retries only refused connections, which is what
the runtime sees when it probes inside the container.

The test now waits up to 30 s for /api/version before checking
readiness. Production readiness is unchanged.

Validation: the test passes in 2 s on Linux ARM64 with the pinned
Ollama image.
cpu_runtime_provider_reconciles_compute_and_retains_data needed CPU
fixture images with a fake runtime executable and runtime labels, and
nothing in the repository builds them, so the test never ran. Remove it
with its module and its fixtures.md section. The Docker provider proxy
and cache provider live tests still exercise real Docker and OpenTofu.

examples/onboarding-tui/scripts/replay_guided.py was a Python and tmux
driver for watching a scripted TUI session. Nothing runs it, and the
TUI's Rust tests already replay every example journey in process.
Remove it and its README section.

The docs/validation record that mentions the CPU test stays as history.

Validation: SDK and onboarding tests pass (522); clippy and fmt are
clean; the docs check and its tests pass.
The cache-provider live test was a Rust shim that ran a 66-line Python
script, so the test needed Python on the host. It also needed a root
image: with a non-root image the container could not write its
credential into the fresh volume, and the no-op plan then failed on a
stopped container.

The test is now Rust and runs the same OpenTofu and Docker sequence:
create, no-op, replacement, failed-start recovery, retained teardown,
cache reconstruction with the same credential, and rejection of a
missing or substituted credential volume. The fixture container runs
as root, so any image with python3 and sha256sum works, including the
agent images the live job already builds. Cleanup still removes only
resources carrying this run's owner label.

Validation: the test passes in 52 s on Linux ARM64 with the non-root Pi
agent image and leaves no containers or volumes.
Eight ignored tests need only a Linux host's Docker engine, but nothing
ran them: each needed images and documents prepared by hand. The Ollama
cache test had been broken since September without anyone noticing.

`cargo ci live-docker` prepares their inputs and runs them. It pulls the
pinned OpenShell and Ollama images, builds a Pi agent image and two proxy
images under a fresh tag, and writes owned gateway documents with fresh
UUIDs, loopback ports and private subnets. The live-docker nextest
profile then runs the Ollama cache, runtime archive, offline rebuild,
standalone cache, Docker proxy, and three gateway tests, one at a time;
each gateway test gets its own document because each refuses resources
from another. The step is opt-in and never part of plain `cargo ci`.
Whatever the outcome, it removes the images it built and only the
containers, volumes and networks labelled with its own UUIDs.

A new Live / Docker workflow runs the step on v1 pushes and manual runs,
on Linux ARM64 and AMD64, and uploads its JUnit results. It is not a
required check.

Validation: `cargo ci live-docker` passes all eight tests on Linux ARM64
in 315 s and leaves no images, containers, volumes or networks. New
tests cover step selection and fresh gateway inputs.
The remote-service, service-capacity and service-readiness lifecycle
tests installed a 221-line Python script as `ssh`, so every lifecycle
run needed Python on the host. It simulated a Docker engine reached
through `docker system dial-stdio` and printed fixed capacity data.

nemoclaw-e2e-ssh-fixture is a Rust port with the same state files,
control flags and responses. The tests link it into `bin/ssh` from
CARGO_BIN_EXE, so Cargo builds it with the tests. It locks the engine
state with std's File::lock instead of fcntl.

Validation: the 12 remote-service, capacity and readiness lifecycle
tests pass against the bundle on Linux ARM64; clippy is clean.
Two build tests ran shell scripts as fake cargo and docker:
runtime_fixture.sh checked retained compilation's arguments, and
image_fixture.sh answered build, load and inspect for the runtime image
load checks.

Each fake is now a test in the same binary that does nothing in an
ordinary run. When re-run with a marker variable, it performs the
script's checks or answers. The cargo fake is a Command on the test
binary. The code under test runs docker by path, so the docker fake
keeps a two-line sh wrapper that re-runs the test binary and relays its
answer and exit status, which the harness's own output would otherwise
garble.

Validation: the build crate's 53 tests pass with and without the SDK
feature. Breaking the cargo fake's input check, or the image test's
expected reference, makes the corresponding test fail.
Capacity observation for an SSH engine ran a 45-line Python script on the
user's GPU host through `ssh python3 -c`, so every such host needed
Python 3. A second Python script mocked the host commands to test it.

The provider now sends a fixed POSIX shell script that runs uname, stat,
head, docker and nvidia-smi and prints each result after a marker line.
Rust parses and validates the output: the same OS, architecture,
local-daemon, storage-root, memory and NVIDIA checks as before, plus
each section exactly once and nothing before the first marker. The old
JSON decoder's tests now feed the new format.

A new Linux test runs the shipped script with fake docker and nvidia-smi
on PATH against this host's real uname, stat and /proc/meminfo, and
checks every NVIDIA query. The E2E SSH fake answers the new script.

Validation: provider SSH collector tests pass (6), including a new test
that rejects other systems, remote daemons and ambiguous output; making
the local-daemon check a no-op fails it. The script parsed this Linux
ARM64 host's real values (daemon ID, 128 GB, compute capability 12.1).
The 12 remote-service, capacity and readiness lifecycle tests pass. The
ssh_live test still needs an explicitly configured SSH NVIDIA host.
The documentation workflow ran tools/docs/fern.py (206 lines) to
validate, preview and publish, plus two inline Python scripts for the
preview comment and merged-preview cleanup, and a Python unittest suite
for the publication guards.

`nemoclaw-build fern` replaces all of them: check, dev, preview,
delete, delete-merged, comment and public. It imports main's pinned
documentation, runs main's generators and the pinned Fern CLI, and
keeps every guard: an immutable main revision, nemoclaw-v1 preview IDs,
a preview URL that must match a successful publish, and a public
release only when enabled, from a v1 tag on v1's history, checked
before any tool sees a token. The guards are pure functions with Rust
tests ported from test_fern.py, plus tests for comment selection and
merged-preview cleanup. The docs workflow and setup no longer need
Python.

Validation: `fern check` passes against the real Fern CLI on Linux
ARM64, the same result as the Python check on the same tree, including
a fresh import of main's documentation. The 12 docs and Fern tests
pass; clippy is clean with and without the SDK feature. Preview,
comment and publish need FERN_TOKEN and run only in CI.
343c0bb wrote the docs workflow's test step as a plain YAML scalar
ending in `docs:: fern::`. A colon followed by a space starts a
mapping, so GitHub rejected the whole workflow file and Validate never
ran. Quote the command.

Validation: every workflow and action file parses as YAML.
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

cv added 3 commits October 5, 2026 05:04
The first Live / Docker run failed on both platforms:
- AMD64 could not build the Pi agent image; the bake file builds Pi for
  ARM64 only.
- On ARM64, three tests could not find the images the step had just
  built by digest, and the runtime archive test refused to run: hosted
  runners use Docker's classic image store, which keeps no repository
  digests for local builds.

The step now builds OpenClaw on AMD64; it also has python3, sha256sum
and node. The workflow enables the containerd image store and restarts
Docker before the tests, and checks that the switch took effect.

Validation: `cargo ci live-docker` passes all eight tests locally both
with Pi and with OpenClaw forced (489 s); the workflow parses. The CI
run on this commit is the check for the store switch.
Merging v1 brought in service_images/managed.rs, which still installed
fixtures/remote_ssh.py as `ssh`. This branch replaced that script with
the nemoclaw-e2e-ssh-fixture binary in 91a1086, so the e2e test crate
no longer compiled and both Linux native jobs failed at clippy.

Link the Rust fake from CARGO_BIN_EXE, as the other remote-service tests
do. The new tests use the same state files and control flags, so the
fake needs no change.

Validation: clippy is clean across the workspace; the managed_ollama and
remote_models tests, which use this fixture, pass against the bundle on
Linux ARM64 with a dummy agent image and a proxy image.
@cv
cv merged commit 42d61b9 into v1 Oct 5, 2026
14 checks passed
@cv
cv deleted the build/rust-host-tooling branch October 5, 2026 17:49
cv added a commit that referenced this pull request Oct 5, 2026
…12630)

## Summary

The follow-up to #12629. `design/onboarding-journeys.md` ended with a
"Remaining work" list, so the design page doubled as a work tracker.
This keeps its five undecided questions but presents them as **open
design questions**: each has a short label, and settling one means
changing the affected rule and removing the question. The three pages
that called the section "remaining work" are updated.

## Fixes along the way
- **Removed replay script:** the page claimed coverage from the tmux
replay script that #12617 deleted. It now names the TUI and authoring
tests that cover those journeys.
- **Removed validation record:** the page cited "earlier pinned live
Fabric qualification", whose record #12627 removed. It now says live
qualification against an explicitly configured bundle is still open.

## Not changed
- **The "Remaining work" column** in the slice table stays. It describes
what each implemented slice doesn't yet cover, which is design content,
not a task list.
- **GitHub issues:** none opened; the questions stay in the design page.

## Validation
- **`fern check`:** passes.
- **Links:** every relative link and anchor in the repository's Markdown
resolves.
- **`git diff --check`:** clean.
@bowenzhu21

Copy link
Copy Markdown

The Rust cache_provider test still reads /data/model once right after key(). The Python version failed on that read in 2 of 12 runs locally (#12559 waits for it the way key() waits for the credential), so it may be worth the same wait here.

bowenzhu21 added a commit to bowenzhu21/NemoClaw that referenced this pull request Oct 6, 2026
NVIDIA#12617 removed the CPU runtime live test and cache_provider.py, and fixed
ollama_cache with its own wait. Take v1's versions of those files. This
branch now keeps the lifecycle test's endpoint pin and adds the model
wait to the Rust cache_provider test.

The Rust test reads /data/model right after key(). On reconstruction the
retained credential already exists, so key() returns before the fixture
script starts, and the read races the script's write.

Validation on 4d15234 with these changes, Linux ARM64 (Colima), bundle
built from this tree: cache_provider 30/30 (11/30 on 4d15234 alone, each
failure `cat: /data/model: No such file or directory`), lifecycle test
15/15 in about 17 s (about 44 s unpinned). nextest ci profile 1042
passed, lifecycle profile 96 passed, doc tests, cargo fmt --check, and
Clippy -D warnings pass; Clippy passes on macOS for nemoclaw-e2e.

Signed-off-by: Bowen Zhu <[email protected]>
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance platform: container Affects Docker, containerd, Podman, or images platform: linux Affects non-Ubuntu Linux environments labels Oct 6, 2026
cv added a commit that referenced this pull request Oct 7, 2026
…int (#12559)

## Outcome

The standalone `cache_provider` live test no longer races its fixture,
and a lifecycle-profile test no longer depends on how an unroutable
endpoint fails. Only test code changes.

## Reason

- `cache_provider` reads `/data/model` right after `key()`. On
reconstruction the retained credential already exists, so `key()`
returns before the fixture script starts, and the read races the
script's write. On `4d15234` it failed 19 of 30 runs on Linux ARM64
(Colima), each with `cat: /data/model: No such file or directory`. It
runs in the Live / Docker lane, which has passed it so far.
-
`apply_health_failure_retains_resources_and_unchanged_apply_checks_again`
uses an unroutable inference endpoint, which can fail as a transport
error or a timeout, so passive discovery can differ between applies. It
failed on darwin_arm64 in CI runs 36622807113 and 37363419187
(2026-10-05).

## Changes

- `cache_provider`: wait for the model as `key()` waits for the
credential.
- Lifecycle test: pin the endpoint to a closed loopback port, as other
`deployment.rs` tests do.

## Verification

Linux ARM64 (Colima), Docker 29.5.2, Rust 1.98.1, on `4d15234` with this
change, bundle built from this branch:

- `cache_provider` 30/30 (11/30 without the wait).
- Lifecycle test 15/15 in about 17 s, compared with about 44 s unpinned.
- nextest `ci` profile: 1042 passed. `lifecycle` profile: 96 passed. Doc
tests, `cargo fmt --check`, and Clippy with `-D warnings` pass. Clippy
also passes on macOS ARM64 for `nemoclaw-e2e`.
- No test containers remained. The diff contains no secrets, API keys,
or credentials.

## Review notes

- #12617 removed the CPU runtime live test and fixed `ollama_cache`,
which this PR also changed, so it now keeps v1's versions of those
files.

---
Signed-off-by: Bowen Zhu <[email protected]>

---------

Signed-off-by: Bowen Zhu <[email protected]>
Co-authored-by: Carlos Villela <[email protected]>
@cv cv added the v1 NemoClaw v1 branch label Oct 12, 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: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance platform: container Affects Docker, containerd, Podman, or images platform: linux Affects non-Ubuntu Linux environments v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants