Repository navigation
test(e2e): migrate system scenarios to HCL integration tests - #14063
Merged
Merged
Conversation
Move graph outcomes of the kubernetes_agents, multiple_providers, travel examples, Fabric harness, and multi-agent removal scenarios into tofu test scenarios that reuse the shared runner, fixtures, and observed module. Keep Rust tests only for SDK and CLI behavior tofu test cannot observe, and consolidate the export and drift checks into one test. Refs #14060 Signed-off-by: San Dang <[email protected]>
Collaborator
Author
Authoring session — opening
|
Contributor
Move the fixture-backed system tests, including the tofu test runner, into crates/nemoclaw-e2e/tests/system as the system binary, and rename the remaining binary of live end-to-end tests to e2e. The lifecycle profile now selects the system binary; the live profiles and the HCL live workflow use the e2e binary. Refs #14060 Signed-off-by: San Dang <[email protected]>
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.
This reverts commit 845ee5a.
…nto test/14060-hcl-integration-migration Signed-off-by: San Dang <[email protected]> # Conflicts: # .config/nextest.toml # crates/nemoclaw-e2e/cases/external-multiple-providers-writer.yaml # crates/nemoclaw-e2e/cases/external-multiple-providers.yaml # crates/nemoclaw-e2e/tests/integration/deployment.rs # crates/nemoclaw-e2e/tests/integration/export_observations.rs # crates/nemoclaw-e2e/tests/integration/fabric_deployment.rs # crates/nemoclaw-e2e/tests/integration/hcl/tests/external-multiple-providers.tftest.hcl # crates/nemoclaw-e2e/tests/integration/hcl/tests/kubernetes-external-three-agents.tftest.hcl # crates/nemoclaw-e2e/tests/integration/hcl/tests/travel-team.tftest.hcl # crates/nemoclaw-e2e/tests/integration/hcl/tests/travel.tftest.hcl # crates/nemoclaw-e2e/tests/integration/kubernetes_agents.rs # crates/nemoclaw-e2e/tests/integration/multiple_providers.rs # crates/nemoclaw-e2e/tests/integration/tofu_test/mod.rs # crates/nemoclaw-e2e/tests/integration/travel_example.rs # crates/nemoclaw-e2e/tests/integration/travel_team_example.rs # crates/nemoclaw-e2e/tests/main.rs # docs/contributing/integration-tests.md # docs/contributing/testing.md # examples/hcl/travel-team/README.md
sandl99
added a commit
that referenced
this pull request
Nov 2, 2026
) ## Failure Provider contract scenarios lived in Rust: large HCL strings embedded in test code, a Rust command sequence for each scenario, and a test per generated OpenShell fixture that repeated the same provider lifecycle for every harness. The vLLM runtime contract also ran the bundle's vllm provider instead of the one built from the checkout. ## Decision Implements #14059 (to close after merge, as v1 PRs do not close issues). Part of #13933; coordinates with #14060 (#14063), whose system tests now share the OpenShell observations. Scenarios move into authored modules beside each provider, run with OpenTofu 1.12's native `tofu test`: | Provider | Modules | |---|---| | fabric | `fixtures/` (Pi agent lifecycle, a sandbox that is already gone), `capabilities/` | | openshell | `standalone/`, `credentials/`, `sandbox/`, `gateway/` | | nemoclaw | `runtime/`, `host/`, `storage/` | Shared support in `nemoclaw-test-fixtures`: - The system tests' OpenShell observations and gateway declarations move into `openshell::State::observations` and `State::declare`; the system tests and the contract tests both use them. Credentials are reported by source, never by value. - The fake OpenShell gateway serves them through the existing `fixture_state` data source (`Fixture::control`). The data source depends on each module's resources, so every run checks its own result. - `TofuWorkspace` copies a module and runs its test files, and stages non-NVIDIA bundle providers such as Docker; `tofu::contract_sources` feeds the coverage guards from every file under `tests/contract`. - `openshell::test_against_gateways` runs a module's files side by side, each against its own gateway. Rust keeps only what `tofu test` cannot express: a failed command (any provider error fails a run), a saved plan or its planned actions, and the state file. Superseded Rust tests and helpers are deleted. Generated OpenShell fixtures now run once per resource shape (8 shapes) instead of once per example (22), replacing the per-file test registry; the fixtures themselves are unchanged. Assertions were consolidated rather than translated: plan actions became observable outcomes (objects created again or kept); runtime decoding is the provider's own check; rejected settings already owned by schema snapshots or unit tests, request counts, and `fabric_harnesses` checks repeated in the nemoclaw contract were dropped. Still in Rust, with reasons in the module docs: failure paths in each family, saved-plan rechecks, state-file comparisons, `references` plan shapes, `replacement_cleanup` state edits, SSH-simulator services, and `kubernetes_lifecycle`, which changes the in-memory Kubernetes API between steps. Net: Rust +1,122/-3,325; HCL +1,232/-37; docs +36/-12. #14063 moves `crates/nemoclaw-e2e/tests/hcl_integration/fixtures.rs`; whichever PR merges second keeps that file's call to the shared observations. ## Validation - `cargo test -p fabric-provider -p openshell-provider -p nemoclaw-provider --test contract -- --include-ignored` with a v1 bundle: all pass. Times before → after: fabric 4.28 s → 4.63 s; openshell 11.71 s (69 tests) → 10.03 s (36); nemoclaw 7.78 s (28) → 7.25 s (22). The slowest test under full nextest load, `pi_agent_lifecycle`, takes 7.4 s, within the Fabric per-test limit. - Regression checks: removing the runtime contract from the vLLM launch environment fails the runtime assertion with its message; changing the default service authorization mode fails both sandbox tests. - The system `hcl_integration` shards with the `lifecycle` profile, which now use the shared observations: all pass. - `cargo nextest run` for `nemoclaw-test-fixtures`, `openshell-provider`, `fabric-provider`, `nemoclaw-provider`, and `nemoclaw-build`; `openshell_contract_fixtures` in `nemoclaw-e2e`. - `cargo clippy --tests -- -D warnings` for the changed crates, `cargo fmt --check`, and `tofu fmt` on the changed modules. - Deferred to CI: the full lifecycle profile on every platform, including Windows. No production code changed, so the bundle is unchanged.
Pair the Rust integration tests with the hcl/ scenarios as rust/, beside #14088's integration tree. Signed-off-by: San Dang <[email protected]>
Move the slow sandbox deletion check, registration scoping for web search, the in-sandbox model change, and the no-probe check out of the Rust integration tests into HCL scenarios, with fixture support for a delete delay and a model change inside a sandbox. Refs #14060 Signed-off-by: San Dang <[email protected]>
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.
…nto test/14060-hcl-integration-migration Signed-off-by: San Dang <[email protected]> # Conflicts: # crates/nemoclaw-e2e/tests/integration/tofu_test/fixtures.rs
sandl99
added a commit
that referenced
this pull request
Nov 2, 2026
…14088) <!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. --> <!-- SPDX-License-Identifier: Apache-2.0 --> ## 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 #13849) and `cases/docker-openclaw-nvidia.yaml` (through #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 #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.
…tate The merged base moved declarations and observations into openshell::State. Keep the upstream model list, the portable engine, and the named teardown leftovers in the runner, and add the delete delay, in-sandbox model change, and delete count to State. Signed-off-by: San Dang <[email protected]>
…ion-migration Signed-off-by: San Dang <[email protected]> # Conflicts: # crates/nemoclaw-e2e/tests/deployment.rs # crates/nemoclaw-e2e/tests/export_observations.rs # crates/nemoclaw-e2e/tests/helm_recovery.rs # crates/nemoclaw-e2e/tests/helm_recovery/destroy_faults.rs # crates/nemoclaw-e2e/tests/integration/deployment.rs # crates/nemoclaw-e2e/tests/integration/export_observations.rs # crates/nemoclaw-e2e/tests/integration/fabric_deployment.rs # crates/nemoclaw-e2e/tests/integration/hcl/harness/main.tf # crates/nemoclaw-e2e/tests/integration/hcl/modules/observed/main.tf # crates/nemoclaw-e2e/tests/integration/helm_recovery.rs # crates/nemoclaw-e2e/tests/integration/helm_recovery/destroy_faults.rs # crates/nemoclaw-e2e/tests/integration/kubernetes_agents.rs # crates/nemoclaw-e2e/tests/integration/main.rs # crates/nemoclaw-e2e/tests/integration/multi_agent.rs # crates/nemoclaw-e2e/tests/integration/multiple_providers.rs # crates/nemoclaw-e2e/tests/integration/remote_service.rs # crates/nemoclaw-e2e/tests/integration/rust/deployment.rs # crates/nemoclaw-e2e/tests/integration/rust/export_observations.rs # crates/nemoclaw-e2e/tests/integration/rust/helm_recovery.rs # crates/nemoclaw-e2e/tests/integration/rust/helm_recovery/destroy_faults.rs # crates/nemoclaw-e2e/tests/integration/rust/multi_agent.rs # crates/nemoclaw-e2e/tests/integration/rust/remote_service.rs # crates/nemoclaw-e2e/tests/integration/tofu_test/mod.rs # crates/nemoclaw-e2e/tests/integration/travel_example.rs # crates/nemoclaw-e2e/tests/integration/travel_team_example.rs # crates/nemoclaw-e2e/tests/multi_agent.rs # crates/nemoclaw-e2e/tests/remote_service.rs # docs/contributing/integration-tests.md # docs/contributing/testing.md # docs/provider.md # docs/security.md # examples/hcl/travel-team/README.md
This was referenced Nov 2, 2026
…indows Managed gateway storage takes only a unix:// engine, so Windows compiled these scenarios with an ssh:// relay engine that the schema rejects. Every platform now compiles them with the fixed Unix socket, which keeps the Docker alias their test files name; Windows still skips running them. Signed-off-by: San Dang <[email protected]>
Match the scenario filter against OpenTofu's backslash path on Windows, where a forward-slash filter found no tests, and keep the Windows system variables that OpenTofu and the providers need after the runner clears the environment. 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.
This was referenced Nov 3, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 testintegration 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
v1don't close issues; close #14060 after merge.Decision
Move graph outcomes into
tofu testscenarios that reuse the existing runner, fixtures, harness, andobservedmodule, and keep Rust only for what OpenTofu's test framework cannot observe.Runner and fixtures
./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.gateway_change,sandbox_create_delay_ms, andbaseline, and outputsgatewayandbaselineso a later run can compare with an earlier one.sshrelay that the lifecycle step puts onPATH, and skips scenarios with a managed Docker gateway, recording them as skipped in the CI summary.New scenarios
kubernetes-external-three-agents(examples/kubernetes/external-gateway.yamlunchanged)kubernetes_agents, Fabric harness tests, stopped runtime, missing registration, concurrent sandboxes, agent removalexternal-multiple-providers(+-writercase)multiple_providerskubernetes-search-scopesexport_observations::mixed_search_export…kubernetes-slow-sandbox-deletedeployment::destroy_waits_for_graceful_sandbox_stop_without_retryingtraveltravel_exampletravel-teamtravel_team_exampleRust 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_failurescannot 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_serviceandhelm_recoverystay as they were, except two Ollama rows that repeat the vLLM storage and post-pull image checks.Builds on #14088 (merged), which split
nemoclaw-e2einto theintegrationande2ebinaries. This PR then organizescrates/nemoclaw-e2e/tests/integrationby format:main.rsdeclares eachrust/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_turnsand temperature, the OpenShift duplicate of the Kubernetes example, and the Service-host policy check that SDKkubernetes_inferencetests 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.deployment,export_observations,fabric_deployment, andmulti_agent: 19 pass.destroy = true.every_scenario_test_names_its_inputsfailed on a missing example.cargo ci lifecycleon24b35280fbversus this branch: 162 → 140 tests, 151.8 s → 112.7 s wall, 1204 s → 894 s summed; thenemoclaw-e2esystem tests went from 62 tests and 1046 s to 40 tests and 742 s.hcl_integrationgrew from 8 scenarios in 52 s to 12 in 67 s.kubernetes-external-three-agentsalso owns two checks moved out ofexport_observations: no sandbox runs an inference or runtime probe, and a model changed inside another sandbox is not drift.kubernetes-search-scopesdetected a deliberate, reverted regression: the Pi agent using the deployment's Tavily search instead of its own.rust/:cargo cipassed every step, including test (1748 tests), bundle, and lifecycle (140 tests). After moving four more checks into HCL,cargo ci lifecyclepassed 139 tests. After mergingv1with refactor(e2e): separate integration and live end-to-end test trees #14088 and test(contract): migrate provider contract scenarios to tofu test #14064, whose shared fixture state now holds declarations and observations,cargo cipassed every step: 1748 tests, bundle, and lifecycle (100 tests; the slowest scenario shard took 47 s). Theintegrationbinary 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.