Repository navigation
test(e2e): run SDK-compiled cases under tofu test against shared fixtures - #13849
Merged
Merged
Conversation
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
…ures Add a shared tofu test runner for integration cases. Each case is a NemoClaw document, main.tf, and a .tftest.hcl file. The runner compiles the document with the SDK, points it at the OpenShell gRPC, Docker engine, and inference fixtures, runs the bundle's OpenTofu and NVIDIA providers with the Docker provider mocked, and checks what teardown leaves. A test-only fixture provider lets HCL declare engine images, containers, and upstream replies, and read recorded requests and fixture state. The first case is Docker + OpenClaw + NVIDIA hosted inference with one agent. Signed-off-by: San Dang <[email protected]>
|
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. |
Add three integration cases that need only a NemoClaw document, main.tf, and a .tftest.hcl file: a managed Ollama service, a managed vLLM service with bearer authentication, and two agents on hosted inference and Ollama. The shared fixtures gain what these services need once: declared containers with a start time, volume mounts, files and their metadata, and optional lookup by name; credential provenance from declared container files; response headers in the HTTP fixture; and a teardown rule that follows references and data sources from retained storage. Providers of managed services keep their own endpoint. Signed-off-by: San Dang <[email protected]>
## Outcome The two HCL E2E suites in #13723 now have one hard outcome assertion across their configured agent targets. A fast policy test rejects additional HCL test blocks or assertions. The existing wrapper still requires successful teardown. ## Reason Live E2Es should prove that the configured agent responds through Fabric and that owned resources are cleaned up. The POC's separate gateway, sandbox, binding, policy, and vLLM assertions make the live suite carry checks that can be covered at faster layers. ## Changes - Keep one `agents_answer` assertion in each HCL suite, requiring an attempted and valid response for every target. - Add a nonignored Rust test that checks each suite has exactly one approved `integration.tftest.hcl`. Changing a hard verdict requires changing this policy test in the same review. - Update the bundle-backed fixture test to show that a diagnostic health flag alone does not fail HCL, while an invalid response does. The wrapper's existing destroy check remains the cleanup verdict. This is stacked on #13723 (`poc/v1-hcl-e2e-openclaw-hosted`). The guard covers the HCL suites only. The Rust Brev E2E is outside its scope. ## Verification - `PROTOC=$PWD/.tools/protoc-36.2/bin/protoc cargo test --offline --locked -p nemoclaw-e2e --bin nemoclaw-hcl-e2e`: 2 passed, 1 bundle-backed fixture test ignored. - `PROTOC=$PWD/.tools/protoc-36.2/bin/protoc cargo clippy --offline --locked -p nemoclaw-e2e --bin nemoclaw-hcl-e2e --tests -- -D warnings`: passed. - `cargo fmt --all -- --check` and `git diff --check`: passed. - Bundle-backed validation is pending CI. Local `cargo ci bundle` could not run because this host has Rust 1.98.1 and V1 pins 1.99.1. - Reviewed the three-file diff; no secrets or credentials added. ## DCO Sign-Off Signed-off-by: Rebecca Sliter <[email protected]> Co-authored-by: Rebecca Sliter <[email protected]>
Signed-off-by: San Dang <[email protected]>
Add five integration cases with only a NemoClaw document, main.tf, and a .tftest.hcl file: vLLM without authentication, one authenticated vLLM service shared by two agents, three agents on an external Kubernetes gateway, two hosted providers on an OpenShift gateway, and a Kubernetes document rejected by a gateway that reports Docker. The shared layers gain a fixture_gateway data source for the compute driver the gateway reports. The runner drops an external gateway's credential and TLS for the plaintext fixture gateway, names the fixture image's metadata bundle in image metadata variables, redirects only engines a document names, and fails a case that has no test file or no passing run. Signed-off-by: San Dang <[email protected]>
Split the runner into a short case runner and a fixtures module, reduce the fixture provider to one data source, fixture_state, with a declare input and observations output, and add shared docker and observed modules so cases declare engine state from nemoclaw.yaml and read keyed observations. The runner now sets the openshell and fabric providers' destroy from var.permit_destroy, so cases need no provider blocks, and checks only fixture-side teardown and retention refusals. Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
…into test/v1-hcl-integration-openclaw-nvidia Signed-off-by: San Dang <[email protected]> # Conflicts: # crates/openshell-provider/tests/contract/gateway_storage.rs
Signed-off-by: San Dang <[email protected]>
Integration scenarios now pair hcl/cases/<scenario>.yaml, shared with the live E2E suites, with hcl/integration/tests/<scenario>.tftest.hcl. The runner compiles each document once beside a generic harness, runs tofu init once, and runs tofu test -filter per scenario with the fixtures reset between scenarios. The hosted and local vLLM scenarios use the E2E documents directly. The external Kubernetes scenario is removed because kubernetes_agents covers it. One fixed engine socket gives every scenario the same Docker alias, and a sandbox described by image metadata runs the fixture image. The fake engine lists running declared containers for the gateway port check, and coverage-instrumented providers receive LLVM_PROFILE_FILE. Signed-off-by: San Dang <[email protected]>
Signed-off-by: San Dang <[email protected]>
…into test/v1-hcl-integration-openclaw-nvidia
Restore the existing Qwen/OpenClaw example context limit while preserving the GPU memory budget, assertions and cleanup. Merge v1 to retain its exact rust-cache allow-list pin alongside the GPU Rust installer. Signed-off-by: San Dang <[email protected]>
… fixtures The vLLM integration scenario now compiles the live RTX PRO 6000 document, whose vLLM image is amd64. The fixture engine reported every image as arm64, so the image check refused it and every shard failed. The fixtures module now declares a service image's architecture from its document. Signed-off-by: San Dang <[email protected]>
Address review: replace the separate nemoclaw-hcl-e2e binary with two ignored tests in the integration binary. hcl_live::case applies the case's YAML with the bundled CLI and runs its tofu test file; the verifier calls hcl_live::probe from the same binary for each target, which reuses nemoclaw_e2e::state to find the agent. The verifier lists failing targets, so each scenario asserts in one line. Live / HCL now builds the bundle, test executable, and OpenClaw image once and downloads them in each lane, so the GPU runner compiles nothing. A separate always() step destroys the deployment, so cleanup also runs after a cancelled or timed-out job, and its receipt is uploaded with the reports. Signed-off-by: San Dang <[email protected]>
A test file in hcl/tests or hcl/integration/tests whose hcl/cases/<name>.yaml is missing now fails with the unit tests in Build and test, before a bundle exists, instead of failing every integration shard in Lifecycle. Review on #13849 found such a rename after the base renamed the vLLM case. Signed-off-by: San Dang <[email protected]>
Collaborator
Author
|
@cv Thanks. Status of each finding:
|
Signed-off-by: San Dang <[email protected]> #13723 now runs live scenarios as ignored integration tests and removed nemoclaw-backend from nemoclaw-e2e's dependencies. The integration runner names the providers' diagnostics variable from it, so it is a dev-dependency here. The integration docs name hcl_live::case for the live scenarios.
cv
enabled auto-merge (squash)
October 30, 2026 16:01
Contributor
This was referenced Nov 2, 2026
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.
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]>
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.
Outcome
Stacked on #13723 (
poc/v1-hcl-e2e-openclaw-hosted, merged atade79c6730, which includes #14022 and runs the live scenarios ashcl_live). Merge #13723 first.Integration scenarios run under
tofu testfrom the same scenario documents as #13723's live E2E suites. Each scenario compiles a NemoClaw document with the production SDK and runs the real OpenShell, Fabric, host, vLLM, and Ollama providers against fixtures. The Docker provider is mocked withmock_provider. A scenario needs only YAML and HCL; no Rust changes per scenario.Reason
The live E2E suites check whether agents answer on real infrastructure. These scenarios check, on every PR and without infrastructure or credentials, what the graph and provider handoffs produce:
Design
The runner,
tests/hcl_integration/mod.rs, works as follows:cases/<scenario>.yamlintocases/<scenario>/of a work copy of the integration root, beside the harness.tofu initonce.tofu test -filter=tests/<scenario>.tftest.hcl.Other parts:
tests/hcl_integration/fixtures.rs): the existing OpenShell gRPC and streaming-exec fixture, plus the existing stateful fake engine, now shared throughcrates/test-support/docker_engine.rs. The fake engine adds declared images and containers, and an inference upstream that records requests.fixtureprovider (nemoclaw-fixture-control): one data source,fixture_state. ItsdeclareJSON input configures the fixtures, and itsobservationsJSON output returns what they recorded.fixtures(targeted plan),deploy,verify(a no-op apply with assertions), andteardown(setspermit_destroy). Assertions use real resource and data-source attributes and the recorded facts.modules/observedexposesagentskeyed by sandbox, matching the live verifier's per-target view.Scenarios
docker-openclaw-nvidia(live E2E document)assistantOpenClaw agent on NVIDIA hosted inference: gateway Docker inputs and storage, readiness through the mocked container ID, one registration withenv:NVIDIA_INFERENCE_API_KEY, the sandbox's binding and policy, the agent started with its compiled configuration. Every sandbox the document declares is checked, so the live document can add or remove sandboxesdocker-openclaw-vllm(live E2E document)docker-openclaw-vllm-bearerfile:CONTAINER:/credentials/inference-key)docker-openclaw-ollamadocker-hosted-ollama-two-agentsdocker-vllm-shared-two-agentsopenshift-external-two-providerskubernetes-gateway-driver-mismatchexpect_failures), and nothing reaches OpenShell, Fabric, or the upstreamExternal Kubernetes deployments are not repeated here, because the
kubernetes_agentssystem test already covers them through the SDK.Verification
On darwin_arm64 at
de3eeb5eb1, with a bundle built bycargo ci bundlefrom this checkout (OpenTofu 1.12.9):cargo clippy -p nemoclaw-e2e --all-targets -- -D warningspassed. test(e2e): define verification scenarios in HCL #13723 removednemoclaw-backendfromnemoclaw-e2e's dependencies; the runner now takes it as a dev-dependency.cargo ci --base origin/poc/v1-hcl-e2e-openclaw-hostedpassed every step: 1701 unit tests, includingevery_scenario_test_names_a_case, and 161 lifecycle tests. The fourhcl_integrationshards took 67.7 s together, the slowest 21.1 s.every_scenario_test_names_a_casefailed whencases/docker-openclaw-vllm.yamlorcases/docker-openclaw-nvidia.yamlwas moved away, naming both roots' test files, and passed once each was restored.teardownrun, an expected key read in the unauthenticated vLLM scenario, and the correct driver in the mismatch scenario.8d823cd504passed all 40 checks.CI
The scenarios run once per pull request, in CI / Bundle's
Lifecyclejobs on Linux and macOS, from the bundle and test archive those jobs already use. Each job setsNEMOCLAW_INTEGRATION_EVIDENCE. The runner appends each scenario's result there, and the job summary lists the results. A failed job uploads the directory, with failed scenarios' redacted OpenTofu output and observations, ashcl-integration-evidence-PLATFORM-SHARD-ATTEMPT.The runner deals the scenarios across four tests (
scenarios_in_shard_1toscenarios_in_shard_4), each about 20 s, so each stays within the lifecycle budget of 90 s per test. As one test, the scenarios took 66–88 s on CI runners. The shards share the fixed engine socket, so thehcl-integrationnextest test group runs them one at a time on a runner.Limits
mock_provider { source = ... }) can move the mock into one file once the pin moves.cases/*.yamlchange these scenarios.every_scenario_test_names_a_casefails with the unit tests when a test file inhcl/testsorhcl/integration/testshas no matching case.SHARDSin the runner needs to grow to keep each shard within the 90 s per-test budget.Signed-off-by: San Dang [email protected]