Repository navigation
test(e2e): define verification scenarios in HCL - #13723
Conversation
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. |
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]>
## 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]>
Authoring session — openingThis report covers the available authoring session through the cutoff below, including the current scenario refactor and earlier work in the same session. Raw records and private diagnostics are not published.
|
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]>
|
The live E2E design is right: deploy once, verify inference through HCL, and run destroy even after failed verification. To make this the V1 reference test, please amend this PR to exercise one prioritized hardware/model/harness combination on whichever target hardware we acquire first: DGX Spark, DGX Station, or RTX Spark/N1X under WSL2. Please include the exact commit, inference outcome, and cleanup evidence from that lane. The existing hosted and RTX PRO 6000 runs are useful POC evidence, but they do not cover a prioritized hardware row. Please also keep the live outcomes purposeful. The hosted scenario currently invokes both Model-file caching is tracked separately in #13994. It should be incorporated when ready, but need not block the reference E2E. |
|
Validated the single-target simplification on The cloud deployment and HCL scenario now contain one
Each artifact contains one target, healthy gateway/sandbox/identity/policy observations, successful invocation, nonempty response text, and successful destroy. Only declared gateway storage was retained in cloud; declared gateway and model-cache storage were retained in vLLM. No credentials, requests, state, or raw diagnostics were published.
Times exclude queue and agent diagnosis. Cache state was not qualified; no uncached timing claim is made. Code CI passed. One macOS timing-report job stopped before checkout because the runner could not load the pinned checkout action manifest. Both macOS lifecycle partitions had passed. Its one targeted retry and dependent gates passed; no live inference was retried. CI run This PR establishes the common harness and these POC lanes. Priority hardware qualification follows under #13937 and its capacity tasks. Model-file caching remains a separate follow-up under #13994. |
Signed-off-by: San Dang <[email protected]> #13723 now keeps one live target per inference lane, so the shared docker-openclaw-nvidia document declares only the assistant sandbox. The hosted scenario now checks every sandbox the document declares, through the fixtures module's sandbox list and the observed agents, and names only the assistant's resources.
Apply already checks gateway, sandbox, agent, and vLLM readiness through provider data sources, so the probe now reads the sandbox and agent bindings from deployment state and only invokes the agent. Each HCL target names the reply text with a JSON pointer instead of a compiled response contract, so a new harness needs only HCL. Plan, apply, and verification share one 45-minute bound instead of 600 s per step, so a cold model start can use the time the other steps leave; destroy keeps its own bound. The verifier uses only OpenTofu's built-in resource, so the bundle-provider override and the vLLM component are removed, as are the unused DGX Spark case and the duplicate run.json. Signed-off-by: San Dang <[email protected]>
cv
left a comment
There was a problem hiding this comment.
Deploying once and destroying after any failure works, and the live runs show it. Most of the code and CI time go to the plumbing around that flow. Findings, most important first:
-
The vLLM case name differs from its test, which breaks #13849.
hcl-e2e.ymlmapscase: docker-openclaw-vllmtodeployment: docker-openclaw-vllm-rtx-pro-6000. #13849 readscases/<test name>.yaml, so everyhcl_integrationshard fails withcases/docker-openclaw-vllm.yaml is missing. #14022 renames the case and removes thedeploymentkey; the hardware profile is already in the YAML. With one name per case,runcould take--case NAMEin place of--deploymentand--filter. The description's GPU-lane path also needs updating. -
Builds take most of the CI time. Preparation took 16m52s of the cloud lane's 17m25s and 10m50s of the GPU lane's 15m23s. The GPU runner also installs Rust and compiles, and
save-cache: "false"means every run starts with a cold cache. On #13849, the same concern led to removing a workflow that rebuilt the bundle. Build the bundle, wrapper, and images once on a hosted runner, then download them in each lane, asLive / Brevand.github/actions/live-suitedo. -
The runner could follow #13849's shape. #13849 runs its scenarios as ignored tests in the
integrationbinary, usingBundle::from_envand a smalltofu()helper under nextest timeouts. Here, a separate clap binary addsprocess.rs(process groups, environment scrubbing), signal handling, and its own deadlines. Keep calling the bundled CLI: #13849 lists plan, apply, and destroy as outside its coverage, so this lane is their only end-to-end test. As an ignored integration test, most of the rest goes away. Add a workflow step withif: always()that runsnemoclaw destroy: when a job is cancelled or reachestimeout-minutes, the runner kills the process within seconds, before an in-process destroy with a 10-minute deadline can finish. -
Smaller items:
probe.rsreimplementsnemoclaw_e2e::state::{sandbox_binding, runtime_id}; reuse them, adding versions that returnResultif needed.- The evidence
jqfilter selectshealth, which the probe no longer writes. - If
verifier/main.tfoutput the names of failing targets, each test's assertion would be one line instead of a copied expression.
-
The live evidence predates the head. The cited runs are on
6665718;6a00abbthen changedprobe.rs,wrapper.rs, and the verifier. Rerun both lanes on the final head.
## Failure #13849 reads `hcl/cases/<test name>.yaml` for each integration scenario. #13723's `6a00abb` renamed the vLLM case to `docker-openclaw-vllm-rtx-pro-6000.yaml`, and `hcl-e2e.yml` maps `case: docker-openclaw-vllm` to it through a separate `deployment` key. Every `hcl_integration` shard in #13849 panics with `cases/docker-openclaw-vllm.yaml is missing` ([Lifecycle job](https://github.com/NVIDIA/NemoClaw/actions/runs/41047776248/job/124041954278)). ## Decision Name each case after its test file. This renames the YAML to `docker-openclaw-vllm.yaml` without changing its content, removes the workflow's `deployment` matrix key and `DEPLOYMENT` variable, and reads `cases/$CASE.yaml`. The RTX PRO 6000 profile and `amd64` architecture stay in the YAML. This targets #13723's branch, `poc/v1-hcl-e2e-openclaw-hosted`. After merge, #13723's description should name `hcl/cases/docker-openclaw-vllm.yaml` for the GPU lane. ## Validation On linux_arm64, with a bundle built by `cargo ci bundle` from #13849's head `46522fab0d`, running `cargo test --locked -p nemoclaw-e2e --test integration hcl_integration:: -- --ignored --test-threads=1`: - Before this change, all four shards failed with `cases/docker-openclaw-vllm.yaml is missing`. - With this commit applied, 7 of 8 scenarios passed. `docker-openclaw-vllm` failed `Image compatibility check failed` on `data.host_image.runtime_image_present_inference_service_inference_qwen`: #13849's fixture engine reports every image as `arm64`, while `6a00abb` set the case to `architecture: amd64`. That fix belongs in #13849. - No reference to the old file name, `matrix.deployment`, or `DEPLOYMENT` remains, and the workflow parses as YAML. `actionlint` was not available locally. - Not run: the live lanes. Their test filters and the hosted lane's case path are unchanged. Signed-off-by: Carlos Villela <[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]>
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 Thanks.
|
…ures (#13849) ## Outcome Stacked on #13723 (`poc/v1-hcl-e2e-openclaw-hosted`, merged at `ade79c6730`, which includes #14022 and runs the live scenarios as `hcl_live`). Merge #13723 first. Integration scenarios run under `tofu test` from 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 with `mock_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: - the SDK's Docker inputs; - gateway storage and readiness; - inference registrations and credentials; - sandbox bindings and policy; - the Fabric configuration each agent starts with; - retention during teardown. ## Design ``` crates/nemoclaw-e2e/hcl/ cases/<scenario>.yaml # shared scenario catalog (live E2E and integration) main.tf, tests/, verifier/ # live E2E root (#13723), unchanged integration/ # integration root main.tf harness/main.tf # copied beside each compiled scenario: fixture setup + observations modules/fixtures, modules/observed tests/<scenario>.tftest.hcl # same <scenario> name as cases/ ``` The runner, `tests/hcl_integration/mod.rs`, works as follows: 1. Start the fixtures once, on one fixed engine socket. 2. Compile each `cases/<scenario>.yaml` into `cases/<scenario>/` of a work copy of the integration root, beside the harness. 3. Run `tofu init` once. 4. For each scenario, reset the fixtures and run `tofu test -filter=tests/<scenario>.tftest.hcl`. 5. Check what OpenTofu's cleanup left: only storage NemoClaw retains, no gateway objects or Fabric runtimes, no deleted storage, no unknown engine request, and no leaked fixture credential. 6. On failure, keep redacted evidence. Other parts: - **Fixtures** (`tests/hcl_integration/fixtures.rs`): the existing OpenShell gRPC and streaming-exec fixture, plus the existing stateful fake engine, now shared through `crates/test-support/docker_engine.rs`. The fake engine adds declared images and containers, and an inference upstream that records requests. - **`fixture` provider** (`nemoclaw-fixture-control`): one data source, `fixture_state`. Its `declare` JSON input configures the fixtures, and its `observations` JSON output returns what they recorded. - **Test file shape:** `fixtures` (targeted plan), `deploy`, `verify` (a no-op apply with assertions), and `teardown` (sets `permit_destroy`). Assertions use real resource and data-source attributes and the recorded facts. `modules/observed` exposes `agents` keyed by sandbox, matching the live verifier's per-target view. ## Scenarios | Scenario | Checks | |---|---| | `docker-openclaw-nvidia` (live E2E document) | The `assistant` OpenClaw agent on NVIDIA hosted inference: gateway Docker inputs and storage, readiness through the mocked container ID, one registration with `env: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 sandboxes | | `docker-openclaw-vllm` (live E2E document) | Unauthenticated amd64 vLLM (RTX PRO 6000 profile) with an isolated sandbox: data volume only, no credential storage, no key read, registration without credential, agent model and address. The fake engine reports each service image's declared architecture | | `docker-openclaw-vllm-bearer` | vLLM with bearer authentication: credential storage created on the engine and mounted, key read, registration holding the generated key (`file:CONTAINER:/credentials/inference-key`) | | `docker-openclaw-ollama` | Managed Ollama: Docker inputs from the runtime launch, runtime image on the engine, readiness from the status file, registration and policy at the service address | | `docker-hosted-ollama-two-agents` | OpenClaw on hosted inference and Hermes on Ollama: separate registrations, each sandbox bound to and reaching only its own provider | | `docker-vllm-shared-two-agents` | One authenticated vLLM shared by OpenClaw and Hermes: one registration per harness holding the generated key, isolated bindings | | `openshift-external-two-providers` | OpenShift with Anthropic Messages and NVIDIA providers: each registration's API, base URL, and credential; multi-route OpenClaw; single-route Hermes | | `kubernetes-gateway-driver-mismatch` | Gateway reports Docker for a Kubernetes document: the workspace precondition rejects the plan (`expect_failures`), and nothing reaches OpenShell, Fabric, or the upstream | External Kubernetes deployments are not repeated here, because the `kubernetes_agents` system test already covers them through the SDK. ## Verification On darwin_arm64 at `de3eeb5eb1`, with a bundle built by `cargo ci bundle` from this checkout (OpenTofu 1.12.9): - `cargo clippy -p nemoclaw-e2e --all-targets -- -D warnings` passed. #13723 removed `nemoclaw-backend` from `nemoclaw-e2e`'s dependencies; the runner now takes it as a dev-dependency. - `cargo ci --base origin/poc/v1-hcl-e2e-openclaw-hosted` passed every step: 1701 unit tests, including `every_scenario_test_names_a_case`, and 161 lifecycle tests. The four `hcl_integration` shards took 67.7 s together, the slowest 21.1 s. - `every_scenario_test_names_a_case` failed when `cases/docker-openclaw-vllm.yaml` or `cases/docker-openclaw-nvidia.yaml` was moved away, naming both roots' test files, and passed once each was restored. - Earlier negative checks (reverted) each failed only their own scenario: a wrong credential source, a removed `teardown` run, an expected key read in the unauthenticated vLLM scenario, and the correct driver in the mismatch scenario. - GitHub CI on `8d823cd504` passed all 40 checks. ## CI The scenarios run once per pull request, in CI / Bundle's `Lifecycle` jobs on Linux and macOS, from the bundle and test archive those jobs already use. Each job sets `NEMOCLAW_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, as `hcl-integration-evidence-PLATFORM-SHARD-ATTEMPT`. The runner deals the scenarios across four tests (`scenarios_in_shard_1` to `scenarios_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 the `hcl-integration` nextest test group runs them one at a time on a runner. ## Limits - **Not run:** agents are not invoked and no inference is performed; the live E2E suites cover that. The vLLM and Ollama runtimes are declared containers and files, not running services. - **Not covered:** - the SDK's plan, apply, export, and destroy flow, and interrupted-operation recovery; - managed Kubernetes with Helm; - gateway TLS and bearer credentials, which the runner drops for the plaintext fixture gateway. - **Hard-coded names:** Docker test files name the generated Docker alias, which follows from the fixed engine socket, and the container resources the IDs are pinned on. Mocked images all report one ID. OpenTofu 1.14's shared mock files (`mock_provider { source = ... }`) can move the mock into one file once the pin moves. - **Shared documents:** live E2E edits to `cases/*.yaml` change these scenarios. `every_scenario_test_names_a_case` fails with the unit tests when a test file in `hcl/tests` or `hcl/integration/tests` has no matching case. - **Runtime budget:** four shard tests share the scenarios, about 20 s each on CI. With much larger scenario counts, `SHARDS` in the runner needs to grow to keep each shard within the 90 s per-test budget. --- Signed-off-by: San Dang <[email protected]> --------- Signed-off-by: San Dang <[email protected]> Signed-off-by: Carlos Villela <[email protected]> Co-authored-by: Carlos Villela <[email protected]> Co-authored-by: Rebecca Sliter <[email protected]> Co-authored-by: Rebecca Sliter <[email protected]>
…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.
## 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.
Failure
NemoClaw needs one E2E flow that takes deployment YAML and verification scenarios from disk. Copied suite wiring and compiled scenario selection make each new case harder to add.
Decision
Case YAML → bundled
nemoclaw apply→tofu teston the case's HCL file → per-target probe → one HCL outcome assertion →nemoclaw destroyin analways()workflow step.hcl/cases/<case>.yamlwithhcl/tests/<case>.tftest.hcl. HCL selects targets, requests, and the JSON pointer to each harness's reply text. A new case for an existing harness needs YAML and HCL only.hcl_live::caseis an ignored test in theintegrationbinary. It applies the case with the bundled CLI, then runstofu getandtofu testwith the bundle's pinned OpenTofu 1.12.9.local-execrunshcl_live::probefrom the same binary once per target. The probe reusesnemoclaw_e2e::stateto find the agent's binding and runtime, callsAgentBridge::invoke_agent, and records only the outcome: the expected and observed agent and runtime, whether the run succeeded, and whether the reply text is non-empty. Apply already checked gateway, sandbox, and agent readiness, so the probe does not repeat those checks.length(output.failed) == 0.Live / HCLbuilds the bundle, test executable, and OpenClaw image once onubuntu-22.04and downloads them in each lane, asLive / Brevdoes. The GPU lane compiles nothing; it builds only its vLLM image. CI pins the case YAML to the loaded images and gives each run a fresh deployment UID.if: always()step runsnemoclaw destroy, so cleanup also runs after a cancelled or timed-out job. Its receipt is uploaded with the probe reports. Requests, replies, state, and credentials stay on the runner. Only the hosted lane receives the inference credential.docker-openclaw-nvidiaubuntu-24.04nvidia/nemotron-3.5-super-vl-120b-a12bdocker-openclaw-vllmlinux-amd64-gpu-rtxpro6000-latest-1maxTokens: 16384To run a case on a prepared Linux Docker host, pin the case YAML's images as the workflow does, then:
Priority DGX Spark, DGX Station, and N1X/WSL2 qualification follows under #13937. Model-file caching follows under #13994. Neither is claimed here. Runner provisioning remains outside this PR.
Validation
ade79c6730fcd86bc617de95d31dc820d2dca353. Each lane's artifact holds oneassistantreport with the expected agent and runtime, a succeeded run, and non-empty reply text, plus adestroyedreceipt. The cloud lane retained declared gateway storage; the vLLM lane retained declared gateway and model-cache storage.hcl-deps-v1cache that only av1run saves. Cloud lane 1m29s. GPU lane 11m13s, down from 15m23s: 2m26s download, 4m16s image load and vLLM build, 4m13s apply and verify.failed: assistant.cargo cipassed locally on macOS ARM64: fmt, clippy, build, test (including the workflow rules), schema, bundle, and lifecycle. PR checks passed.Signed-off-by: San Dang [email protected]