Repository navigation
test(e2e): retire the managed_gateway live test - #14178
Merged
Merged
Conversation
Move the three Rust chart-render tests from Live / Kind into an openshell-provider contract module. chart.rs writes the SDK's values to inputs/; hcl/chart/tests hold the expectations, including that the development gateway refuses unauthenticated users and trusts only the deployment's own issuer and audience. Part of #14061.
…eway test Add kind-kubernetes-development: one agent with the default kubernetes runtime and development authentication profiles, applied with an empty PATH, answering before and after a redeploy that reuses the gateway's storage. Rename kind-openshift-agents to kind-openshift-oidc. cargo ci live-kind runs both cases, one nextest command each. Delete kubernetes_live.rs: the new case owns the empty PATH and reinstall checks, and the chart contract owns the development gateway's issuer configuration; the live foreign-token refusal is dropped as OpenShell's behavior. The probe's port-forward helper moves into hcl_live.rs. Part of #14061.
Move its remaining checks to their owners: the docker-dummy HCL E2E scenario redeploys on the gateway's retained storage with a new gateway container, and the openshell-provider gateway contract plans the Docker gateway's storage against an engine fixture that refuses any request but a read. Stopped or removed gateway containers being recreated is Docker's behavior and is dropped. Remove the SDK's now-unused runtime-stage hook and the recovery gateway document live-docker wrote for the test. Part of #14061.
|
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. |
Collaborator
Author
Authoring session — opening
|
Deleting managed_gateway left its #[cfg(unix)] on the next module, so interfaces_live could not import pseudo_terminal on Windows.
8 tasks
The development case's destroy and redeploy took 189.6 s on linux_amd64 and 180.7 s on linux_arm64, and the two cases took 303.6 s together.
…ment # Conflicts: # crates/nemoclaw-e2e/tests/e2e/hcl/kind/main.tf # crates/nemoclaw-e2e/tests/e2e/hcl/kind/model/templates/objects.yaml # docs/contributing/live-tests.md
With #14177's cleanup change merged, the development case took 137.9 s and 136.9 s and the step 243.0 s and 232.6 s, within 180 s and 300 s.
Each chart contract test pulls the pinned chart from ghcr.io; one took 8.1 s on linux_amd64, over openshell-provider::contract's 8 s limit.
4 of 8 tasks
# Conflicts: # internal-docs/contributing/live-tests.md
…ment # Conflicts: # crates/nemoclaw-e2e/tests/e2e/rust/kubernetes_live.rs # internal-docs/contributing/live-tests.md
…teway # Conflicts: # internal-docs/contributing/live-tests.md
## Failure `tests/e2e/rust/interfaces_live.rs` (806 lines, plus `pseudo_terminal.rs`) checked OpenClaw's, Hermes's, and Deep Agents Code's interfaces through a model stand-in in the test process, mixing the successful path with refusal, recovery, and leak checks. #14061 item 1 moves the successful path to HCL E2E with real inference. ## Decision Closes #14061 (parent #13933). Stacked on #14178 (#14176, #14174). Follows the maintainer's item 1 decision. - **New case `docker-openclaw-hermes-interfaces`** in `cargo ci live-docker`, on a stub model (review by @cv): OpenClaw with its Control UI on 18789; Hermes with its API server on 8642 and dashboard on 9119. A new `tests/e2e/hcl/model` module runs the stub with the bundled Docker provider: the pinned `nginx-unprivileged` image on the host network at the case's model port, listing one model, answering every chat completion with one reply (streamed when asked), and refusing any request without the run's key. - **New `tests/e2e/hcl/interface` module and `hcl_live::interface` probe**: per request, read the reported token with `openshell sandbox exec`, forward the port with `openshell forward service`, send one request with the token as a Bearer credential. Reports hold status codes; tokens and bodies stay in the private `work` directory; the module outputs only failing target names. - **Scenario:** apply must report the three interfaces with their ports, sign-in, and token files; the Control UI page loads and its configuration accepts the token; Hermes's API lists models and answers with the stub's reply, which also shows NemoClaw sent the configured key; Hermes's dashboard page loads with its session token; destroy keeps only gateway storage. - **`cargo ci live-docker`:** installs the pinned OpenShell CLI again, binds the case (UID, gateway port and subnet, stub address, OpenClaw and Hermes images, a fresh model key), and runs each HCL case (`docker-dummy`, this one) as its own nextest command. Its wall limit is raised to 480 s until a few runs measure the new total. - **Deleted:** `interfaces_live.rs`, `pseudo_terminal.rs`, `live::interfaces_document` and its test. `tests/e2e/rust/` is now empty. | Rust check | New owner | |---|---| | Apply reports ports, token paths, sign-in | Scenario `apply` assertion | | OpenClaw Control UI loads; configuration accepts the token | `interfaces` run | | Hermes API accepts its token and answers a chat completion | `interfaces` run, with the stub's reply | | Hermes dashboard page loads with its session token | `interfaces` run | | Missing or wrong tokens refused; dashboard killed; tokens kept out of output and state; undeclared interface rejected at plan | #14060 integration items | | Deep Agents Code terminal; Hermes browser chat (pseudo-terminal) | Dropped (maintainer decision) | | Every model request carried the configured key | The stub refuses any request without the run's key | **Fixes for the first Live / HCL run of every migrated case** (run 41804342269 and 41833590603; all other cases passed, including this PR's new one): - `hcl/cli` now reports the CLI's error message. With `--output json`, the CLI writes a failed command's redacted message in its JSON on standard output, so failed applies showed an empty message. - `docker-hermes-v0-parity` (#14082) failed at plan: the current Hermes adapter requires read access to `/opt/nemo-relay/plugins/switchyard`, which the v0 export's explicit filesystem policy predates. The case grants it, and `hosted_parity`'s projection adds it like the v1 images' user and group. - `docker-openclaw-hermes-vllm` (#14090) failed at Hermes's start: Qwen3-4B's 40,960-token window is below the 64,000 tokens Hermes requires, as `docs/inference.md` states. The case is now `docker-openclaw-vllm-shared`, two OpenClaw agents sharing the model; `docker-openclaw-hermes-ollama` keeps Hermes on a managed model. Not done here: `cargo ci live-docker` still builds the Deep Agents Code image, which nothing in that suite uses now; removing it touches the live image publishing lists and is left as a follow-up. Net: +393 / −1,270 across 17 files. ## Validation - Local (macOS): `cargo ci fmt`, `cargo ci test` (1,753 tests), `cargo clippy --all-targets --all-features` for `nemoclaw-e2e` and `nemoclaw-build` pass. - The scenario passes against a fake CLI and probe, and fails naming `api_chat` when the reply is not `FOUR`. - Live: the `docker-openclaw-hermes-interfaces` lane runs on a `run-hcl-e2e/**` push of this branch. Refs #14061
…eway test (#14176) ## Failure The default Kubernetes path, the `kubernetes` runtime with the `development` authentication profile as in `examples/kubernetes/managed-development.yaml`, had no HCL E2E case with agents. Its only live coverage was the Rust gateway test `kubernetes_live::the_gateway_refuses_a_foreign_token_and_reinstalls_on_its_retained_storage`, which deploys no agents and drives the compiled graph directly instead of the CLI. #14061 item 7 moves that coverage to HCL E2E. ## Decision Part of #14061 (parent #13933). Stacked on #14174, which adds the chart contract that now owns the development gateway's issuer configuration. - **New case `kind-kubernetes-development`**: one OpenClaw agent, default `kubernetes` runtime and `development` profile, image from the run's private registry. Runs: `cluster`, `apply` (CLI with an empty `PATH`), `reply`, `destroy` (keeps exactly `openshell_kubernetes_storage.runtime`), `redeploy` (apply again; the storage must not be created again), `reply_after_redeploy`. It skips the unchanged plan, which `kind-openshift-oidc` checks, and the final destroy, because the runner deletes the cluster; both keep the case within the per-test limit. - **Rename** `kind-openshift-agents` → `kind-openshift-oidc` (case, scenario, docs). - `hcl/kind` module: the OpenShift UID-range annotations and the OIDC issuer are released only when the case selects them. - `hcl/cli`: new `empty_path` input runs the CLI with an empty `PATH`. - `live_kind.rs` runs each kind case as its own nextest command, joining the JUnit reports as `live-docker` does. - **Deleted** `tests/e2e/rust/kubernetes_live.rs` (557 lines); the probe's port-forward helper moves into `hcl_live.rs`. | Rust gateway test check | New owner | |---|---| | Gateway installs, authenticates with the development token, destroy keeps storage | `kind-kubernetes-development` | | No Helm program needed (empty `PATH`) | `kind-kubernetes-development` (`empty_path = true`) | | Remove and reinstall keeps the namespace, key, and PVCs | `kind-kubernetes-development` `redeploy`: the retained storage refreshes instead of being created again, and the agent answers | | Gateway trusts only the deployment's own issuer | `hcl/chart/tests/kubernetes.tftest.hcl` (#14174) | | A foreign-signed token is refused | Dropped as OpenShell's enforcement (maintainer decision 7.A) | | Planning creates no namespace; Helm keeps one release | SDK `kubernetes_operations` tests; Helm provider behavior | **Time:** the two cases now run one after the other, so Live / Kind's total is about the sum of both. The OIDC case took about 135 s; the development case is expected near 150 s, close to the current 300 s step limit and 180 s per-test limit (temporarily raised while #14087 is open). This PR's Live / Kind run gives the measured times; if they exceed the limits, the limits need a decision rather than a smaller case. Net: +380 / −662 across 15 files. ## Validation - Local (macOS): `cargo ci fmt`, `cargo ci clippy`, `cargo ci test` (1,758 tests) pass; `live_kind` binding tests cover both case templates. - `tofu validate` of `hcl/kind` passes; with each case, the module selects the OpenShift range and the issuer only for `kind-openshift-oidc`. - Live / Kind on linux_amd64 and linux_arm64 in this PR's CI is the live evidence. Refs #14061
Base automatically changed from
test/14061-kind-development
to
test/14061-chart-contract
November 5, 2026 09:18
…test/14061-managed-gateway # Conflicts: # crates/nemoclaw-e2e/tests/e2e/hcl_live.rs # crates/nemoclaw-e2e/tests/e2e/main.rs # internal-docs/contributing/live-tests.md # internal-docs/contributing/testing.md
Contributor
cv
added a commit
that referenced
this pull request
Nov 18, 2026
…out of state (#14559) The live `docker-openclaw-hermes-interfaces` case now holds a Hermes browser chat turn through the dashboard's `/api/pty` WebSocket, and checks that no interface token reaches the deployment's state or apply's output. ## Problem Part of #14289. The case checked Hermes's browser chat only through a stand-in, a command that opens a pseudo-terminal in the sandbox. Nothing showed that a chat through the reported forward reached the model. live-tests.md also said that refused tokens, a killed dashboard process, and tokens kept out of output and state were integration checks under #14060, but #14178 and #14179 deleted those tests. Still left in #14289: a Hermes terminal UI turn (after #14102), OpenClaw's Control UI chat, and an integration test for a refused mount. ## Change - `hcl_live::interface` takes a prompt. With one, it connects to the path as a WebSocket, with the page's session token and the page's origin. It waits for the screen to draw and settle, types the prompt, then sends Enter on its own, and reads the screen until the expected text appears. This reuses the driver from before #14179. - Hermes refuses a bad session token (4401) or an untrusted host or origin (4403) before it accepts the socket, so the client sees HTTP 403 at the upgrade. The probe reports that status with both causes. It also reports any close code that ends the chat early. - `visible()` shows cursor-forward moves as spaces, because Hermes's terminal UI moves the cursor between words instead of writing spaces. - The `interfaces` run adds a `browser_chat` target. Its prompt carries a new stub marker, `browser`, so the reply `nemoclaw-stub-reply browser notes` shows that this turn's prompt reached the model. The chat also needs the image's `/dev/pts` grant, so the `hermes_pseudo_terminal` command is removed. - After the probe reads a token from a token file, the token must appear in neither the deployment's state directory nor the apply's JSON result. The `interface` module takes that result as `reported`. - live-tests.md describes the chat and the token check, and replaces the stale #14060 sentence with what covers rejected interfaces, refused tokens, and a killed interface process now: the SDK's `fabric_compatibility.rs` and NeMo Fabric's `test_hermes_interfaces.py` at the pinned revision. Hermes and OpenClaw own their token checks. - The `verify-fabric-boundary` skill's Hermes web UI row says that the live case covers one answered turn, so the skill check owns the file effect, the reconnect, and the later phases. ## Beyond CI On linux arm64, `cargo ci live-docker --hcl-cases docker-openclaw-hermes-interfaces` passed. The case took 105.8 s, and the `interfaces` run took 10.2 s. Before the final runs, temporary targets showed that each new assertion fails: - a prompt without the marker; - a missing session token and a foreign origin, both reported as `HTTP 403`; - a token check pointed at text that the apply's output or the state holds. --------- Signed-off-by: Carlos Villela <[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.
Failure
tests/e2e/rust/managed_gateway.rsdrove the SDK'stest-scenariosruntime-stage hook against real Docker. Its successful path is covered by every Docker HCL E2E case; #14061 item 2 moves its remaining checks to their owners and deletes it.Decision
Part of #14061 (parent #13933). Now targets
v1: #14174 and #14176 have merged, and #14179 (the agent interfaces on a stub model incargo ci live-docker, plus the fixes for the two failing Hermes Live / HCL cases) was squash-merged into this branch, so this PR also carries its changes; see #14179 for that part's description and evidence.managed_gatewaycheckopenshell-providercontracthcl/gateway: now also plansopenshell_gateway_storagefor Docker; the engine fixture asserts every request is a readnemoclaw-providerplanning_tests.rs(subnet) and the gateway prerequisite check (port in use)plan --destroypreview; export refused after destroyexport_observationsand the Docker HCL E2E destroy runsdocker-dummy(cargo ci live-docker):redeploymust not createopenshell_gateway_storage.runtimeagain and must createdocker_container.managed_gateway_runtime; the agent replies again; a final destroy keeps only the storageThe redeploy went to the
docker-dummyE2E case instead of an HCL integration scenario, as the maintainer approved for the Kubernetes redeploy in #14176: it is a successful operator flow, it needs the real retained volume, and it adds about 10-15 s tolive-docker.Also removed: the SDK's now-unused
scenario_runtime_stagehook (thehelm_recoveryintegration tests still use the othertest-scenarioshooks), and thelive-recoverygateway document and state directorycargo ci live-dockerwrote for the deleted test.Net: +104 / −391 across 12 files.
Validation
cargo ci fmt,cargo ci test(1,758 tests),cargo ci lifecyclepass;cargo clippywithtest-scenariospasses.gateway_settings_plan_without_contacting_a_hostpasses with the new storage resource; the fixture answers absent volumes, helpers, and networks and panics on any write.docker-dummyscenario.Refs #14061