Skip to content

refactor(e2e): separate integration and live end-to-end test trees - #14088

Merged
sandl99 merged 2 commits into
v1from
refactor/e2e-split-test-trees
Nov 2, 2026
Merged

sandl99 merged 2 commits into
v1from
refactor/e2e-split-test-trees

Conversation

@sandl99

@sandl99 sandl99 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Failure

nemoclaw-e2e builds one test binary, integration (tests/main.rs), with three kinds of test in it: system tests against local fixtures, live tests against real Docker, Kubernetes, images, or inference, and non-ignored offline checks.
Only the module lists in .config/nextest.toml say which is which.
hcl/ also mixes the shared NemoClaw documents (hcl/cases), the live HCL (hcl/main.tf, hcl/tests, hcl/verifier), and the integration tofu test root (hcl/integration), whose runner lives in tests/hcl_integration/.

Related to #14060 and #14061; this PR resolves neither. #14063 will be rebased on top of it.

Decision

Split the binary into two trees, following the repository's tests/<layer>/main.rs convention. This PR moves and renames files only: no test, assertion, fixture behavior, or scenario changes. Rust module names and test names are unchanged, so nextest filters and test IDs keep working; only the binary ID changes.

Before                                   After
crates/nemoclaw-e2e/                     crates/nemoclaw-e2e/
├── hcl/                                 ├── cases/                  # from hcl/cases
│   ├── cases/                           ├── fixtures/               # unchanged (hosted parity)
│   ├── integration/                     ├── src/
│   │   ├── main.tf                      └── tests/
│   │   ├── harness/ modules/ tests/         ├── integration/        # binary integration: local fixtures only
│   ├── main.tf                              │   ├── main.rs
│   ├── tests/                               │   ├── hcl/            # from hcl/integration
│   └── verifier/                            │   ├── tofu_test/      # from tests/hcl_integration
├── fixtures/                                │   ├── helm_recovery.rs, helm_recovery/
├── src/                                     │   └── deployment.rs, remote_service.rs, ...
└── tests/                                   ├── e2e/                # binary e2e: live tests
    ├── main.rs        # binary integration  │   ├── main.rs
    ├── brev.rs        # binary brev         │   ├── hcl/            # from hcl/: main.tf, tests/, verifier/
    ├── fixtures/                            │   ├── fixtures/       # from tests/fixtures
    ├── hcl_integration/                     │   ├── service_images/
    ├── helm_recovery/                       │   └── hcl_live.rs, kubernetes_live.rs, ...
    ├── service_images/                      └── brev.rs             # binary brev, unchanged
    └── *.rs (41 modules)

In every other crate, integration is the ordinary unit-test binary; testing.md now says so once.

Placement

Module Binary Reason
deployment, export_observations, fabric_deployment, kubernetes_agents, multi_agent, multiple_providers, remote_service, helm_recovery (+ destroy_faults), travel_example, travel_team_example integration System tests against fixture gateways, simulated engines and SSH hosts, and the in-memory Kubernetes API.
hcl_integration integration The tofu test runner. Its directory is now tests/integration/tofu_test/, declared with #[path = "tofu_test/mod.rs"] mod hcl_integration; so that test names, the hcl-integration test group filter, and documentation stay the same.
docker_engine, kube_api, transport (crates/test-support) integration Used only by hcl_integration and helm_recovery.
docker_fixture integration Tests nemoclaw_e2e::http_fixture, which the system tests and the tofu test fixtures use.
fabric_bridge, tls, web_search integration Test the providers against the fake OpenShell gateway (nemoclaw_e2e::openshell::Fixture), the system tests' gateway. They use no real infrastructure.
agent_compatibility integration Tests image_runtime binding and policy, which the system tests use through image_runtime::engine and metadata_bundle.
openshell_contract_fixtures integration Keeps the openshell-provider contract fixtures in sync with the SDK; it serves the lifecycle layer, not the live suites.
cache_provider, docker_provider_proxy, docker_registry, dummy_agent, interfaces_live, managed_gateway e2e live-docker profile.
kubernetes_live (+ kubernetes_oidc, kubernetes_registry, kubernetes_requests), kubernetes_chart e2e live-kind profile. kubernetes_requests and kubernetes_registry hold non-ignored checks of kubernetes_live's helpers, and are its #[path] submodules.
hcl_live, fabric_live, model_live, hosted_parity, spark, managed, existing_ollama, managed_ollama, remote_models, shared_service, service_images e2e Opt-in live tests. The non-ignored checks in fabric_live, hosted_parity, and interfaces_live test those modules' own helpers and stay with them.
pseudo_terminal e2e Helper for interfaces_live; its non-ignored tests check that helper.
registry_fixture e2e Helper for docker_registry and kubernetes_registry.

Every #[cfg(...)] gate is unchanged: a script compared each of the 41 module declarations in the old tests/main.rs with the new main.rs files and found each declared exactly once with the same gate.

Crate-root fixtures/ (hosted parity) stays where it is. Moving it would also change tools/e2e/brev-v1-guest.sh and live-tests.md and gain nothing for this split.

Consumers updated

  • crates/nemoclaw-e2e/Cargo.toml: [[test]] targets integration (tests/integration/main.rs) and e2e (tests/e2e/main.rs); the comment explains the split.
  • Source paths: include_str!/include_bytes! gain one ../. #[path] attributes to crates/test-support are updated. The tofu test runner reads CARGO_MANIFEST_DIR/cases and CARGO_MANIFEST_DIR/tests/integration/hcl. hcl_live reads cases/<case>.yaml and runs OpenTofu in tests/e2e/hcl, still relative to the crate directory that the workflow uses as its working directory. Paths inside the HCL harness are unchanged, because the integration root moved as one directory.
  • every_scenario_test_names_a_case reads tests/e2e/hcl/tests and tests/integration/hcl/tests and looks up each name in cases/. It is still a non-ignored test.
  • .config/nextest.toml: lifecycle selects package(nemoclaw-e2e) & binary(=integration) whole. live-docker and live-kind keep their module filters, now on binary(=e2e). The hcl-integration test group and its max-threads = 1 limit are unchanged. .config/test-budgets.yaml names no nemoclaw-e2e binary, so it is unchanged.
  • .github/workflows/hcl-e2e.yml: builds and copies the e2e executable, runs candidate/e2e hcl_live::case, and pins images in crates/nemoclaw-e2e/cases/. The working directory stays crates/nemoclaw-e2e.
  • cargo ci archive derives its binaries from the profiles, so on Linux it now archives nemoclaw-e2e::e2e for the live jobs; no code change was needed. No determinator rule or tools/ script names the moved paths. brev.yml and brev-v1-guest.sh use only the unchanged brev binary and crate-root fixtures/.
  • Docs: testing.md (layer table, unit, system, and live text), integration-tests.md (tofu test paths and the system-test binary), live-tests.md (every nemoclaw-e2e command now names --test e2e, plus the cache_provider.tf link), and links in docs/provider.md, docs/security.md, docs/design/fabric-management.md, and examples/hcl/travel-team/README.md. The remaining --test integration commands for nemoclaw-e2e, including the one in .agents/skills/add-fabric-harness/SKILL.md, run modules that are in integration.

Not moved cleanly

  • tests/main.rs was rewritten as two new files, so Git records it as deleted and tests/integration/main.rs and tests/e2e/main.rs as added; git log --follow does not connect them. Every other file is a rename.
  • tests/e2e/fixtures/gateway_readiness.tf had no consumer before this PR and still has none. It moved with tests/fixtures; this PR does not decide whether to remove it.
  • hcl_live::probe's #[ignore] reason names its caller's path, so it now reads tests/e2e/hcl/verifier. Two include lines also changed wrapping after cargo fmt.

Validation

On darwin_arm64 at a98fc08603:

  • Test lists. I ran cargo nextest list --workspace --all-targets --profile P --run-ignored only for lifecycle, live-docker, and live-kind, and the ci profile's non-ignored list, before the move (origin/v1 at 24b35280fb) and after it. After removing the nemoclaw-e2e::integration/nemoclaw-e2e::e2e binary ID, each pair of sets is identical, and no test changed ignored state:

    Profile Before After nemoclaw-e2e after
    lifecycle 162 162 62 in integration
    live-docker 8 8 4 in e2e
    live-kind 7 7 7 in e2e
    ci (non-ignored) 1748 1748 14 integration, 12 e2e, 2 brev, 9 lib
    All nemoclaw-e2e tests 116 116 76 integration, 28 e2e, 3 brev, 9 lib

    These lists cover macOS only. The Linux-only modules (docker_registry, existing_ollama, managed_ollama, remote_models, service_images, shared_service) are covered by the module-declaration comparison above and by CI's Linux jobs.

  • cargo ci --base origin/v1 passed all selected steps (tools, fmt, clippy, build, test, schema, bundle, lifecycle) in 466 s. Test: 1748 passed. Lifecycle: 162 passed, the same count as the baseline list, including all four hcl_integration::scenarios_in_shard_* tests.

  • cargo nextest run -p nemoclaw-e2e --test integration --test e2e --profile ci: 26 passed.

  • cargo run -p nemoclaw-build -- fern check: 0 errors (Node 25.9.0 locally; CI uses 24.22.1).

  • git log --follow works on moved files, for example tests/integration/tofu_test/mod.rs (through test(e2e): run SDK-compiled cases under tofu test against shared fixtures #13849) and cases/docker-openclaw-nvidia.yaml (through test(e2e): define verification scenarios in HCL #13723).

CI / Bundle on a98fc08603 passed every job:

  • Lifecycle: 162 tests on linux_amd64, linux_arm64, and darwin_arm64 (two partitions of 81 each), and 138 on windows_amd64 (three partitions of 46), which omits the Unix-only modules.
  • Live / Docker ran the e2e binary's live-docker tests on linux_amd64 and linux_arm64: 7 tests, then one in each of the three gateway runs, all passed.
  • Live / Kind ran the e2e binary's 7 live-kind tests on linux_amd64 and linux_arm64, all passed.

Merging origin/v1 at c17761c8fe (merge commit 84cf54f5e9) brought in #14064 and #14080. Git applied #14064's change to tests/hcl_integration/fixtures.rs through the rename, and the merged tests/integration/tofu_test/fixtures.rs is identical to v1's file. After the merge:

  • The nemoclaw-e2e test lists for every profile are unchanged from a98fc08603. The other changes, all from test(contract): migrate provider contract scenarios to tofu test #14064, are in the provider contract binaries: lifecycle now lists 123 tests.
  • cargo ci --base origin/v1 passed in 251 s: test 1748 passed, lifecycle 123 passed.
  • CI / Bundle on 84cf54f5e9 passed. The first linux_amd64 / Live / Kind attempt ran all 7 tests and passed them, but took 304 s against the 270 s budget in .config/test-budgets.yaml, so the job failed. Two kubernetes_live tests took about 197 s each, against the 150 s per-test limit. The rerun took 234 s and stayed within budget. The e2e binary's code is the same as at a98fc08603, where this job took 231 s.

No live suite ran locally: Docker was not running.
After merge, dispatch Live / HCL (hcl-e2e.yml). It is manual-only, and its executable name, case path, and OpenTofu directory changed.

Move nemoclaw-e2e's local-fixture tests to tests/integration (binary
integration) and its live tests to tests/e2e (binary e2e). The shared
NemoClaw documents move from hcl/cases to cases, the tofu test root to
tests/integration/hcl, its runner to tests/integration/tofu_test, and the
live HCL to tests/e2e/hcl. Module and test names are unchanged.

Related to #14060 and #14061.
@sandl99

sandl99 commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded pi 1.2.0, TUI mode Session metadata (format v3) and the harness install path in the injected system prompt
Skills recorded nemoclaw-contributor-create-pr (complete read) Tool reads in the session record to the cutoff; no skill was injected
Instruction files recorded AGENTS.md of the main checkout (injected at startup); v1 AGENTS.md (complete read); WRITING.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read) Startup injection and tool reads to the cutoff; v1 has no CONTRIBUTING.md
Tool calls recorded typescript: 102, including 9 failed Wrapper calls in the record to the cutoff; nested host calls (shell, git, gh, workspace) inside each program are not counted
Session window recorded 2026-11-02T10:25Z to 2026-11-02T10:55Z; 30 min First event to the cutoff, after PR creation, including idle time; the whole session was this task
Compactions recorded 0 Complete record to the cutoff
Models recorded nvidia-internal/azure/anthropic/claude-opus-5-5 Model change event and assistant messages; no change
Reasoning levels recorded medium; high Thinking-level change events, in order

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@sandl99
sandl99 requested a review from cv November 2, 2026 11:47
@sandl99 sandl99 added the v1 NemoClaw v1 branch label Nov 2, 2026
sandl99 added a commit that referenced this pull request Nov 2, 2026
Pair the Rust integration tests with the hcl/ scenarios as rust/, beside #14088's integration tree.

Signed-off-by: San Dang <[email protected]>
@sandl99
sandl99 requested a review from kaofelix November 2, 2026 13:52
sandl99 added a commit that referenced this pull request Nov 2, 2026
#14090)

<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION &
AFFILIATES. All rights reserved. -->
<!-- SPDX-License-Identifier: Apache-2.0 -->

## Failure

Part of #14061 (parent #13933). Stacked on #14082, which is stacked on
#14088.

The live checks for several agents sharing one local model, and for
agents on a managed Ollama model, were Rust tests that no workflow ran:
the Spark plan-and-apply test needs GB10 hardware, and `shared_service`,
`managed_ollama`, and `existing_ollama` run against a simulated Ollama
service. Two more, `managed.rs` and `nemoclaw-sdk`'s `managed_live`,
only re-read state an earlier manual run left behind.

## Decision

Add two HCL E2E scenarios on the Live / HCL NVIDIA GPU runner. Each has
the four runs from #14082: apply through the bundled CLI, a reply from
each agent's recorded runtime, a plan without changes, and destroy that
keeps only the expected storage.

| Case | Deployment | Reply check |
|---|---|---|
| `docker-openclaw-hermes-vllm` | OpenClaw and Hermes sharing one vLLM
Qwen3-4B service with bearer authentication | Any reply from each |
| `docker-openclaw-hermes-ollama` | OpenClaw on NVIDIA hosted inference
beside Hermes on a managed Ollama `qwen3:0.6b` | OpenClaw answers
`FOUR`; Hermes any reply |

Both documents copy the integration cases
`docker-vllm-shared-two-agents` and `docker-hosted-ollama-two-agents`,
changing only what the GPU runner needs: the `rtx-pro-6000-blackwell`
hardware profile, candidate agent image templates, and their own
identity, port, and subnet. I first changed the shared cases instead,
but the profile and image changes alter resource addresses that the
#14063 integration scenarios assert, so `hcl_integration` failed; the
shared cases are unchanged here.

Live / HCL builds the `ollama` image for the Ollama case and binds
`nc-prototype-ollama@sha256:a…` to it, as it binds the vLLM and agent
images.

Deleted, with where each remaining check belongs:

| Deleted | Happy path now in | Other checks |
|---|---|---|
| `spark::spark_yaml_plans_and_applies_expected_resources` |
`docker-openclaw-hermes-vllm` | The Spark document's exact plan set:
#14063. GB10 hardware: a later Spark case. The image-change test stays
in `tests/e2e/rust/spark.rs`. |
| `shared_service` | `docker-openclaw-hermes-vllm` | Export/reapply of a
shared service: #14063 export test |
| `managed_ollama` | `docker-openclaw-hermes-ollama` | Capacity and
container-creation failures, storage retained without a container:
#14063 and #14064 `nemoclaw/storage` |
| `existing_ollama` | `docker-openclaw-hermes-ollama` (managed Ollama) |
A changed upstream model digest is refused: #14063. Reusing an existing
Ollama server has no live case yet. |
| e2e `managed.rs`, `nemoclaw-sdk` `managed_live` | Every scenario's
unchanged plan and destroy | None; they re-read an earlier run's state |

The service-image helpers that only those tests used are removed;
`remote_models` keeps the rest.

Net: +354/−641 across 16 files.

## Validation

- `cargo ci fmt`, `cargo ci clippy`, and `cargo ci test` (1,746 tests)
passed on darwin_arm64.
- `cargo ci lifecycle` on darwin_arm64: `hcl_integration` shards pass
with the shared cases unchanged. One run failed `nemoclaw-provider`
`service_readiness::standalone_readiness_defers_to_apply_rechecks_unchanged_services_and_allows_destroy`
under load; it passed twice when run alone, and this PR doesn't touch
providers.
- The Linux-only service-image modules don't compile on macOS. I
compiled them with clippy `-D warnings` after stripping their
`cfg(target_os = "linux")` gates in a scratch copy, which found the
helpers removed here; the files in the PR keep their gates.
- Both scenarios pass against a fake CLI and probe with the pinned
OpenTofu 1.12.9.
- Not run: the two Live / HCL GPU lanes. They need a push to
`run-hcl-e2e/**`, which hasn't been authorized. Until they pass, this PR
should not merge.

@kaofelix kaofelix left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 84cf54f, the merge with v1 after #14064. The tree matches the trial merge I checked: every module from the old tests/main.rs is declared once with the same gate, include_str!/#[path] targets and the HCL module sources resolve, no old paths remain in code, docs, workflows, or tools, and the integration binary uses only local fixtures. CI is green, including Lifecycle on all platforms and Live / Docker and Live / Kind on Linux.

Non-blocking:

  • hcl-e2e.yml is opt-in, so this PR's CI didn't run it. Please dispatch it once after merge to confirm candidate/e2e and cases/.
  • lifecycle now selects the whole integration binary, so a live test added there by mistake would run in lifecycle. Worth a line in the contributor docs that live tests go in tests/e2e.
  • Please file a v1 issue to decide what happens to the unused tests/e2e/fixtures/gateway_readiness.tf.

@sandl99
sandl99 merged commit 61e98eb into v1 Nov 2, 2026
138 of 142 checks passed
@sandl99
sandl99 deleted the refactor/e2e-split-test-trees branch November 2, 2026 14:34
sandl99 added a commit that referenced this pull request Nov 2, 2026
Resolve the squashed #14088 against this branch's earlier merge of its unsquashed branch: keep this branch's tests/e2e/hcl and tests/e2e/rust layout and take v1's other changes, including #14064 and #14080.
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance labels Nov 2, 2026
cv pushed a commit that referenced this pull request Nov 3, 2026
## Failure

The v1 system tests repeated the same deployment flows in many Rust
scenarios. Graph outcomes such as registrations, bindings, policy, agent
configuration, isolation, and unchanged reconciliation were checked
through the SDK lifecycle, often with export, reapply, and destroy
repeated at the end of each test. Several assertions froze counts or
authored defaults that did not identify the behavior under test. The
`tofu test` integration layer from #13849 already compiled shared
documents against the same fixtures, but only covered eight documents
and could not apply examples or authored HCL.

Resolves #14060. Pull requests into `v1` don't close issues; close
#14060 after merge.

## Decision

Move graph outcomes into `tofu test` scenarios that reuse the existing
runner, fixtures, harness, and `observed` module, and keep Rust only for
what OpenTofu's test framework cannot observe.

**Runner and fixtures**

- A test file names the modules it applies: `./cases/<name>` (shared
catalog), `./examples/<path>` for an example document compiled
unchanged, or `./examples/<path>` for an authored HCL directory copied
with the bundle's NVIDIA provider versions pinned.
- Fixtures can declare the models the upstream lists, a sandbox creation
or deletion delay, and a one-time gateway change (stop one agent
runtime, change an agent's model inside its sandbox, or forget
registrations). Observations add gateway effects, the most sandboxes
created at once, and current sandbox IDs and registration names. The
teardown check names what remains.
- The harness adds `gateway_change`, `sandbox_create_delay_ms`, and
`baseline`, and outputs `gateway` and `baseline` so a later run can
compare with an earlier one.
- The runner now builds on every platform. Windows reaches the fixture
engine through the `ssh` relay that the lifecycle step puts on `PATH`,
and skips scenarios with a managed Docker gateway, recording them as
skipped in the CI summary.

**New scenarios**

| Scenario | Replaces | Owns |
|---|---|---|
| `kubernetes-external-three-agents`
(`examples/kubernetes/external-gateway.yaml` unchanged) |
`kubernetes_agents`, Fabric harness tests, stopped runtime, missing
registration, concurrent sandboxes, agent removal | Shared registration
and credential reference, per-agent configuration, concurrent creation,
unchanged apply with no gateway effects or agent starts, restart in the
same sandbox, re-registration without sandbox changes, one sandbox's
replacement leaving the others |
| `external-multiple-providers` (+ `-writer` case) |
`multiple_providers` | Provider union per sandbox, two deployments with
separate workspaces and owners, reapplying one after the other changes
nothing |
| `kubernetes-search-scopes` | Registration count in
`export_observations::mixed_search_export…` | One inference and one web
search registration per harness, each with the credential its
deployment, sandbox, or agent scope names; the unused integration is not
registered |
| `kubernetes-slow-sandbox-delete` |
`deployment::destroy_waits_for_graceful_sandbox_stop_without_retrying` |
A 31 s sandbox deletion is requested once, and the replacement follows |
| `travel` | `travel_example` | Authored example with Docker mocked:
readiness, registration, policy, agent configuration, unchanged apply |
| `travel-team` | `travel_team_example` | Per-role attachments, grants,
toolsets, and a hosted-model change replacing only the scheduler's and
buyer's sandboxes |

**Rust that remains** covers SDK and CLI behavior: CLI output, saved
state and intent, export, interrupted and cancelled operations, saved
plans, and provider errors, which `expect_failures` cannot expect. The
six export/reapply tests become one test that applies a document with
integrations, an authored inference API, native settings, grants,
exposures, and a tool limit, then checks each kind of observed drift
with one table. `remote_service` and `helm_recovery` stay as they were,
except two Ollama rows that repeat the vLLM storage and post-pull image
checks.

**Builds on #14088** (merged), which split `nemoclaw-e2e` into the
`integration` and `e2e` binaries. This PR then organizes
`crates/nemoclaw-e2e/tests/integration` by format:

```
tests/integration/
├── main.rs
├── hcl/              # tofu test scenarios: main.tf, harness/, modules/, tests/
├── tofu_test/        # their runner, the hcl_integration module
├── rust/    # Rust tests for what tofu test cannot express
│   ├── deployment.rs, export_observations.rs, fabric_deployment.rs
│   ├── multi_agent.rs, remote_service.rs
│   └── helm_recovery.rs, helm_recovery/
└── agent_compatibility.rs, docker_fixture.rs, fabric_bridge.rs,
    openshell_contract_fixtures.rs, tls.rs, web_search.rs   # offline checks, run with the unit tests
```

`main.rs` declares each `rust/` file with `#[path]`, so module and test
names do not change. Migrating the failure cases further is a later
step.

**Assertions removed or consolidated:** exact effect and change counts,
repeated export/reapply tails, the text row of the startup-failure test
(renderer tests own it), authored defaults such as `max_turns` and
temperature, the OpenShift duplicate of the Kubernetes example, and the
Service-host policy check that SDK `kubernetes_inference` tests cover.

**OpenTofu 1.12 limits found and documented** in
`docs/contributing/integration-tests.md`: assertions cannot reference
runs, only the latest applying run's outputs per module are kept,
cleanup silently skips the destroy when the last run's variables
reference a dropped run, and a JSON array never equals a list.

## Validation

- `cargo ci` (fmt, clippy, build, test, schema, bundle, lifecycle)
passed on darwin_arm64.
- `hcl_integration`: 14 scenarios pass in 4 shards. With the 31 s
deletion, the slowest local shard took 52 s; the others took 18 to 27 s.
- Retained Rust boundary tests in `deployment`, `export_observations`,
`fabric_deployment`, and `multi_agent`: 19 pass.
- Each new scenario detected a deliberate, reverted regression: a
timestamp-triggered replacement on unchanged apply, two deployments with
one owner, an extra researcher change during the hosted-model change, a
second replaced sandbox, and teardown without `destroy = true`.
`every_scenario_test_names_its_inputs` failed on a missing example.
- Same machine and bundle, `cargo ci lifecycle` on `24b35280fb` versus
this branch: 162 → 140 tests, 151.8 s → 112.7 s wall, 1204 s → 894 s
summed; the `nemoclaw-e2e` system tests went from 62 tests and 1046 s to
40 tests and 742 s. `hcl_integration` grew from 8 scenarios in 52 s to
12 in 67 s.
- Net: Rust −1813 lines, HCL +801, case YAML +102.
- `kubernetes-external-three-agents` also owns two checks moved out of
`export_observations`: no sandbox runs an inference or runtime probe,
and a model changed inside another sandbox is not drift.
- `kubernetes-search-scopes` detected a deliberate, reverted regression:
the Pi agent using the deployment's Tavily search instead of its own.
- After merging #14088 and moving the Rust tests to `rust/`: `cargo ci`
passed every step, including test (1748 tests), bundle, and lifecycle
(140 tests). After moving four more checks into HCL, `cargo ci
lifecycle` passed 139 tests. After merging `v1` with #14088 and #14064,
whose shared fixture state now holds declarations and observations,
`cargo ci` passed every step: 1748 tests, bundle, and lifecycle (100
tests; the slowest scenario shard took 47 s). The `integration` binary
lists 40 ignored tests: the 36 failure cases and the 4 scenario shards.

Deferred to CI: Linux and Windows lifecycle. The Windows path of the
runner is untested locally; no Windows target is installed here.

---------

Signed-off-by: San Dang <[email protected]>
cv pushed a commit that referenced this pull request Nov 3, 2026
## Failure

v1 live coverage was spread across separate Rust lifecycles that each
repeated the same apply, invoke, reapply, and destroy code with their
own state readers: `brev.rs` (its own test executable),
`fabric_live.rs`, `model_live.rs`, `dummy_agent.rs`, and
`hosted_parity`'s live module. Only Brev and the dummy test ran in CI;
the others were manual. The HCL E2E pattern from #13723 covered two
cases, and the CLI applied each deployment before `tofu test` started.

## Decision

Part of #14061 (parent #13933). Builds on #14088, now merged into `v1`;
this branch also contains #14090, which was merged into it.

Each scenario is a `cases/<case>.yaml` document and a
`tests/e2e/hcl/tests/<case>.tftest.hcl` with four runs:

1. `apply` through the bundled CLI.
2. A real reply from the recorded runtime after the apply process
exited, with an exact answer when the case names one.
3. A `plan` with no changes.
4. `destroy` that retains only the case's persistent storage.

| Case | Runner | Replaces |
|---|---|---|
| `docker-openclaw-nvidia` | Live / HCL | The existing reply check, now
also applying, planning, and destroying in HCL |
| `docker-openclaw-v0-parity` (moved from
`fixtures/openclaw-nvidia-hosted/v1.yaml`) | Live / HCL, Live / Brev |
`brev.rs`, `fabric_live.rs`, `hosted_parity` OpenClaw live |
| `docker-hermes-v0-parity` (moved from
`fixtures/hermes-nvidia-hosted/v1.yaml`) | Live / HCL | `hosted_parity`
Hermes live |
| `docker-openclaw-vllm` | Live / HCL GPU runner | `model_live.rs` |
| `docker-dummy` | `cargo ci live-docker` | `dummy_agent.rs` |
| `docker-openclaw-hermes-vllm` (#14090) | Live / HCL GPU runner |
`spark` plan-and-apply test, `shared_service` |
| `docker-openclaw-hermes-ollama` (#14090) | Live / HCL GPU runner |
`managed_ollama`, `existing_ollama` |

Layout of the `e2e` test tree:

- `tests/e2e/hcl/`: the HCL E2E scenarios and their modules, run by
`hcl_live::case`.
- `tests/e2e/rust/`: live tests not yet migrated, with their fixtures
and helpers, moved unchanged except for relative include paths. Module
names are unchanged, so test names and the `live-docker` and `live-kind`
filters still match.
- `hcl_live.rs` and `hosted_parity.rs` stay at the top: the HCL runner,
and the deterministic v0 comparisons of the parity cases.

Components:

- `tests/e2e/hcl/cli` runs one bundled `nemoclaw` command (`plan`,
`apply`, `destroy`) and returns its exit status, error, and JSON result.
`hcl_live::case` no longer applies.
- `tests/e2e/hcl/verifier` gains an optional exact `answer`. The probe
writes reply text to the run's private `work` directory; published
reports still hold outcomes only.
- `cargo ci live-docker` binds the dummy case's template to a fresh UID,
port, subnet, and image (`bind_case`) and passes the copy as
`NEMOCLAW_HCL_DOCUMENT`. Its labelled-resource cleanup is unchanged.
- Live / HCL builds the Hermes image and binds
`nc-fabric-hermes@sha256:0…`. Brev runs the `e2e` executable's
`hcl_live::case` (the separate `brev` test target is removed), then
`nemoclaw destroy`, and uploads the reports, destroy receipt, and
fresh-host checks; deleting the VM remains the required cleanup.
- `hosted_parity`'s deterministic v0 comparisons read the moved case
documents.

Removed checks that were not on the successful path, and their owners:

| Removed check | Owner |
|---|---|
| Export equals the document; reapplying it changes nothing | The
SDK/CLI export test #14063 keeps |
| Runtime and resource identities unchanged by reapply; restart of a
stopped agent runtime in the same sandbox | #14063
`kubernetes-external-three-agents` |
| Exact created resources; plan matches apply; `plan --destroy` preview
| #14063 graph scenarios |
| Undeclared egress denied | Policy sent to OpenShell: HCL integration
`docker-openclaw-nvidia`. Enforcement is OpenShell's. |
| First plan leaves Docker unchanged | Proposed: #14064
`openshell/gateway` plan contract; not yet confirmed |
| vLLM manifest, storage reuse, `USR1` memory guard, recovery of the
stopped container | Proposed: #14064 `nemoclaw/runtime` and
`nemoclaw/storage`, and the vLLM supervisor tests; not yet confirmed for
the stopped-container recovery |
| Workspace file kept across reapply | Redundant with the unchanged plan
|
| Dummy: no sandbox objects after destroy | `cargo ci live-docker`
cleanup fails on leftovers |
| Dummy: derived image's executable in the sandbox | Dropped; the image
is still built and deployed |
| `fabric_live` against an external gateway | Was manual only; no CI
case before or after |

Not in this PR: `spark.rs`, `managed_gateway.rs`, `interfaces_live.rs`,
`cache_provider.rs`, `docker_registry.rs`, the Kind suite,
`service_images`, and the read-only SDK and provider live tests. Their
happy paths and failure owners are a follow-up under #14061.

OpenTofu 1.12.9 limits found here (also in #14063): assertions cannot
read `run.<name>`, and a run's outputs become unknown once a later run
applies the same module. The scenarios avoid both.

Net against `v1`, including #14090: +1,114/−2,583 across 63 files, many
of them renames into `tests/e2e/rust`. #14090 also deleted `managed.rs`
and `nemoclaw-sdk`'s `managed_live`, which only re-read an earlier run's
state.

## Validation

- After merging `v1` (the squashed #14088, #14064, and #14080): `cargo
ci fmt`, `cargo ci clippy`, and `cargo ci test` (1,746 tests) passed on
darwin_arm64. The merge keeps this branch's `tests/e2e/hcl` and
`tests/e2e/rust` layout; every other file matches `v1`.

- After merging #14088's branch and adding `tests/e2e/rust`: `cargo ci
fmt`, `cargo ci clippy`, and `cargo ci test` (1,746 tests) passed on
darwin_arm64. The Linux-only modules (`docker_registry`,
`service_images`, and the Ollama tests) don't compile on macOS; I
checked that each of their moved include paths names an existing file,
and Linux CI compiles them. One run hit
`release_assessment::scanner::tests::subprocess_failures_hide_stderr_and_timeouts_reap_the_owned_process`
under load; it passed three isolated reruns and the next full run.
- `hcl_live::case`, `hosted_parity::`,
`hcl_integration::every_scenario_test_names_a_case`,
`live_docker::tests::the_dummy_case_binds_its_identity_gateway_and_image`,
and the two `ci_lifecycle::live_docker_*` tests pass.
- Every scenario passes under OpenTofu 1.12.9 with a fake `nemoclaw` and
probe. A wrong answer and a failed apply each fail the expected run.
- `tofu fmt -check`, `shellcheck` on the Brev scripts, and
`tools/ci/test_brev*.py` pass.
- Deferred to CI: `cargo ci live-docker` runs `docker-dummy` on this PR.
Not run: Live / HCL (four cases, including the GPU lane) and Live / Brev
need a push to `run-hcl-e2e/**` or `run-brev-v1-e2e/**`. Run them before
merge; the deleted Rust live tests have no live replacement evidence
until they pass. `cargo ci lifecycle` was not run locally.
@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: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants