Skip to content

test(e2e): migrate the kind OpenShift agents happy path to HCL E2E - #14097

Merged
cv merged 8 commits into
v1from
test/14061-kind-e2e
Nov 3, 2026
Merged

cv merged 8 commits into
v1from
test/14061-kind-e2e

Conversation

@sandl99

@sandl99 sandl99 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Failure

Part of #14061. Stacked on #14082.

The Kubernetes happy path, agents answering on a managed gateway in kind, lived in the Rust test kubernetes_live::on_openshift_three_agents_keep_separate_identities_run_as_the_namespace_uid_and_answer_after_each_reapply. Its sequence and assertions were Rust, and it also carried checks that don't need a real cluster: identities and state across the unchanged apply and the export's apply.

Decision

Add the kind-openshift-agents HCL E2E case to cargo ci live-kind, with the four runs the other cases use:

  1. cluster: the new tests/e2e/hcl/kind module releases a local chart through the bundled Helm provider. It creates the deployment's namespace with OpenShift's UID-range annotations, as OpenShift prepares a project, and the stub model the Rust flow used (the pinned development-issuer image serving one streamed reply) in its own namespace. tofu test uninstalls the release after the scenario, which deletes both namespaces.
  2. apply through the bundled CLI.
  3. reply: each of the three agents answers from its recorded runtime with the stub's reply.
  4. unchanged_plan, then destroy, which must retain only openshell_kubernetes_storage.runtime.

Supporting changes:

  • hcl_live::case runs tofu init with the bundle's providers instead of tofu get, so a case's own modules can use bundled providers such as Helm.
  • hcl_live::probe reaches a managed Kubernetes gateway through the port-forward that kubernetes_live::requests::gateway already opens, with the kubeconfig and context the case names.
  • cargo ci live-kind binds the case template to its cluster context, a fresh UID, gateway port, and namespace, and the agent image, and passes the kubeconfig as TF_VAR_kubeconfig. The live-kind profile selects hcl_live::case.

Deleted: the Rust three-agents test and deploy_and_export, which only it used. The registry test keeps the shared flow.

Removed check Owner
Each agent answers from its first runtime with the stub's reply This case
Unchanged apply and the export's apply keep each agent's identities and the deployment state; export reproduces the document #14060 (follow-up item)
Gateway and agent pods run as the namespace's first UID Not kept. Kind does not enforce OpenShift's constraints, and OpenShell applies the range from the annotation; the gateway test still checks gateway pods with NEMOCLAW_TEST_KUBE_RUNTIME=openshift on a real OpenShift cluster.

Net: +541/−172 across 13 files.

Validation

  • cargo ci fmt, cargo ci clippy, and cargo ci test (1,747 tests, including the new binding test) passed on darwin_arm64.
  • The scenario's apply, reply, plan, and destroy runs pass against a fake CLI and probe with the pinned OpenTofu 1.12.9. The kind module initializes from the bundle's Helm provider and renders its namespace, image, and stub stream; I could not release it without a cluster.
  • Live / Kind on this PR ran the case on real kind clusters at 80b89ab and passed on both architectures: hcl_live::case took 132.7 s on linux_amd64 and 138.1 s on linux_arm64, within the 150 s per-test budget. The whole suite took 223.8 s and 244.2 s against its 270 s budget; before this change, linux_amd64 runs took 254 s and the three-agents Rust test exceeded 150 s.

Each live scenario now runs as an HCL E2E case: tofu test applies the
case through the bundled CLI, checks a real reply from the recorded
runtime, a plan without changes, and destroy with only persistent
storage retained. Live / HCL gains the two hosted parity cases, Brev runs
the OpenClaw parity case, and cargo ci live-docker runs the dummy case.

Delete the Rust lifecycles they replace: brev.rs and its test target,
fabric_live.rs, model_live.rs, dummy_agent.rs, and hosted_parity's live
module. Their failure, recovery, drift, and export checks belong to the
HCL integration and contract migrations (#14060, #14059).

Refs #14061
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.
The e2e binary now separates the HCL E2E scenarios in tests/e2e/hcl from
the Rust live tests not yet migrated to them, which move to tests/e2e/rust
with their fixtures and helpers. Module names stay the same, so test names
and profile filters do not change. Brev runs the e2e executable.

Refs #14061
#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.
Resolve the squashed #14088 against this branch's earlier merge of its unsquashed branch: keep this branch's tests/e2e/hcl and tests/e2e/rust layout and take v1's other changes, including #14064 and #14080.
Add the kind-openshift-agents case, which cargo ci live-kind binds to its
cluster and runs through hcl_live::case: three agents with the OpenShift
profile apply through the bundled CLI, each answers from its recorded
runtime with the stub model's reply, a plan reports no changes, and
destroy keeps only the gateway's storage.

A tests/e2e/hcl/kind module releases the case's fixtures with the bundled
Helm provider before apply: the deployment's namespace with OpenShift's
UID-range annotations and the stub model in its own namespace. tofu test
uninstalls the release afterward. hcl_live::case now initializes the HCL
root with the bundle's providers, and the probe reaches a managed
Kubernetes gateway through the same port-forward the Kind tests use.

Delete the Rust three-agents test and the flow wrapper only it used.

Refs #14061
@sandl99

sandl99 commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded Pi 1.2.0 (TUI) Session metadata and installed release; cutoff before publication
Skills recorded nemoclaw-contributor-implement-issue (complete read); nemoclaw-contributor-create-pr (complete read) Tool reads in the session record to cutoff
Instruction files partial AGENTS.md on main (injected); AGENTS.md on v1 (complete read); PULL_REQUEST_TEMPLATE.md (complete read); SESSION_REPORT_TEMPLATE.md (complete read) WRITING.md and E2E authoring guidance were read only in part
Tool calls partial typescript: 425 Wrapper calls to cutoff, including 17 failed results; nested shell and git calls inside the wrapper are not counted
Session window recorded 2026-11-02T05:51Z to 2026-11-02T17:25Z; to publication First event to cutoff, including idle time
Compactions recorded 0 Complete record to cutoff; it has context elisions but no compaction
Models recorded claude-opus-5-5 Model change event; no later change
Reasoning levels recorded medium; high Thinking-level changes, in order

@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure area: integrations Third-party service integration behavior area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance integration: openclaw OpenClaw integration behavior platform: k8s Affects Kubernetes deployments labels Nov 2, 2026
Base automatically changed from test/14061-hcl-live-migration to v1 November 3, 2026 02:49
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cv
cv merged commit f1e436c into v1 Nov 3, 2026
54 checks passed
@cv
cv deleted the test/14061-kind-e2e branch November 3, 2026 03:32
@wscurran wscurran added area: docs Documentation, examples, guides, or docs build v1 NemoClaw v1 branch labels Nov 3, 2026
sandl99 added a commit that referenced this pull request Nov 3, 2026
Delete the kept-state section of interfaces_live and the proxy image change in docker_provider_proxy, which docker-hermes-kept-state and docker-ollama-proxy now own, and the second proxy image that only the image change used. The OpenShift identity check left with #14097.

Signed-off-by: San Dang <[email protected]>
sandl99 pushed a commit that referenced this pull request Nov 3, 2026
…14126)

## Failure

Live / Kind on `linux_amd64` fails its 150 s per-test limit. Since
#14097 moved the three-agent OpenShift test to the
`kind-openshift-agents` HCL case, `hcl_live::case` took 130.1–143.3 s on
`linux_amd64` in four runs, then 163.3 s and 155.6 s on #14124. In both
#14124 attempts the other Kubernetes tests, which #14124 doesn't touch,
were 10–15% slower too, so the runners vary more than the limit allows.
#14087 is finding where that time goes.

## Decision

Raise the Live / Kind per-test limit from 150 s to 180 s, with the
`live-kind` profile's slow-timeout to match, and its wall limit from 270
s to 300 s. This is temporary: the comment in
`.config/test-budgets.yaml` records the numbers and says to return to
150 s and 270 s when #14087 is resolved. Part of #14087; it doesn't
close it.

## Validation

- `cargo test -p nemoclaw-build` passed, including the check that the
profile's slow-timeout matches the budget.
- `cargo ci` passed: format, clippy, build, tests, schema, bundle, and
lifecycle (100 tests).
- Deferred to CI: Live / Kind on both platforms, which this changes only
the limits of.

Signed-off-by: Carlos Villela <[email protected]>
cv pushed a commit that referenced this pull request Nov 3, 2026
)

## Failure

#14061 keeps only successful paths that need real dependencies in the
live suites. Its [follow-up list on
#14060](#14060 (comment))
names checks that need only fixtures. Three of them fit `tofu test`: an
unchanged apply keeping the OpenShift agents' identities, a Hermes
sandbox replacement keeping its `/sandbox/artifacts` volume, and an
Ollama proxy replacement keeping its credentials.

Part of #14060.

## Decision

| Check | Scenario | Source in the live suites |
|---|---|---|
| An unchanged apply keeps every sandbox, registration, and agent start
on an OpenShift gateway | New `unchanged` run in
`openshift-external-two-providers` | `kubernetes_live.rs`, three
OpenShift agents. The export half stays with the Rust export test. |
| A replaced Hermes sandbox mounts the same `/sandbox/artifacts` volume,
and the agent starts again with kept state under the same name | New
`docker-hermes-kept-state` | `interfaces_live.rs`. Whether Hermes finds
its session there needs real Hermes. |
| Replacing the Ollama proxy container keeps its key volume, the
registration that reads the key, and the agent's sandbox | New
`docker-ollama-proxy` | `docker_provider_proxy.rs`. The rewritten-key
refusal is a provider error and belongs in `rust/`. |

Runner and fixture changes:

- `tofu_test/mod.rs` compiles with the `ollama_proxy` generation.
- `Fixtures::redirect` points an Ollama proxy's existing daemon at the
upstream fixture. The upstream lists declared Ollama models at
`/api/tags`, with name and digest.
- `modules/fixtures` declares the proxy's models, and its container
under the proxy's name, with the key in its `/data` volume.

Both new scenarios use a managed Docker gateway, so they run on Unix and
Windows skips them.

Removed from the live suites:

- `interfaces_live.rs`: the kept-state section (volume on
`/sandbox/artifacts`, a session created and found again after
replacement) and its `Volume` helper. That apply reports the kept token
path stays with the SDK's `interface_access` tests; that real Hermes
finds its session is no longer tested live.
- `docker_provider_proxy.rs`: the proxy image change. The rest of the
test stays until the failed-start and rewritten-key checks move to
`rust/`.
- `nemoclaw-build`: the second proxy image (`proxy-b`) and
`NEMOCLAW_TEST_OLLAMA_PROXY_REPLACEMENT_IMAGE`, which only the image
change used, with their CI tests and `live-tests.md`.
- The OpenShift three-agent test was already deleted by #14097.

## Validation

- `cargo ci` on darwin_arm64 at `1149b17629`: all steps passed,
including lifecycle with 100 tests.
- After the deletions at `fbc916feb5`: clippy for `nemoclaw-e2e` and
`nemoclaw-build`, and the `live_` tests of `nemoclaw-build` (30 tests).
The two Linux-only live files were linted on macOS with their platform
gate removed locally. Live / Docker runs them in CI.
- The 16 HCL integration scenarios pass in 4 shards.
- Deliberate, reverted regressions:
- Mounting the Hermes volume at another path fails
`docker-hermes-kept-state` on the mount assertion.
- Replacing the proxy's registration with its container fails
`docker-ollama-proxy` at the replacement. The gateway refuses to delete
a registration attached to a sandbox, so this case fails on that error,
not on an assertion.

---------

Signed-off-by: San Dang <[email protected]>
cv pushed a commit that referenced this pull request Nov 3, 2026
…nario cannot cover (#14119)

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

## Failure

Part of #14061. Follow-up to #14097, which added the
`kind-openshift-agents` HCL E2E scenario but removed only the Rust
three-agents test: it added 541 lines and deleted 172. The Rust gateway
test still repeated the scenario's successful path, and the docker and
kind case bindings repeated each other.

## Decision

Reduce the Rust gateway test to the checks the scenario cannot make,
rather than delete it: removing it entirely would leave two checks
without an owner.

| Gateway test check | Owner after this PR |
|---|---|
| Install, unchanged plan, destroy that keeps storage, authenticated
access with the development token | `kind-openshift-agents` too; the
Rust test keeps these steps as setup for the checks below |
| The development gateway refuses a token signed by another key | Rust
gateway test, kept. NemoClaw configures the gateway's authentication;
the OIDC test only checks the OIDC profile. |
| Removing and reinstalling the gateway keeps the namespace, encryption
key, and PVCs with their UIDs | Rust gateway test, kept. Fixtures cannot
show a real volume reattaching. |
| No Helm executable is needed | Rust gateway test, kept: OpenTofu runs
with an empty `PATH`. The CLI passes the caller's `PATH`, and CI runners
have Helm. |
| On a real OpenShift cluster, pods admitted under `restricted-v2` with
the namespace's first UID and group
(`NEMOCLAW_TEST_KUBE_RUNTIME=openshift`) | **Removed.** This branch only
ran by hand and never in CI; a real OpenShift case is on #14061's
follow-up checklist. |
| Switching retained volumes to `Delete` before deleting the namespace,
for clusters with `Retain` | Removed. kind uses `Delete`; the docs point
manual runs on other clusters to Remove Retained Resources. |

Also:

- Rename the test to
`the_gateway_refuses_a_foreign_token_and_reinstalls_on_its_retained_storage`
and document why it remains.
- Cut `kind-openshift-agents` from three agents to two; separate
identities across agents are an integration item for #14060.
- Replace `live_docker.rs`'s line-based binding and `live_kind.rs`'s
binding with one helper, `nemoclaw_build::ci::live::bind_case`.
- Drop `NEMOCLAW_TEST_KUBE_RUNTIME`, which only the OpenShift branch
read.

Net: +108/−370 across 10 files; the gateway test shrinks by 193 lines.

## Validation

- `cargo ci fmt`, `cargo ci clippy`, and `cargo ci test` (1,748 tests,
including both binding tests) passed on darwin_arm64.
- `Live / Kind` in this PR's CI runs the reduced gateway test, the
two-agent scenario, and the OIDC, registry, and chart tests.
cv added a commit that referenced this pull request Nov 3, 2026
## Failure

The three-agent OpenShift Live / Kind test runs near its time limit on
`linux_amd64` (#14087), and CI shows no breakdown of where it spends
that time: nextest shows nothing of a passing test, and the JUnit report
keeps no passing output. #14099 added a per-phase table to the Rust
flow, but #14097 moved that test to the `kind-openshift-agents` HCL E2E
case, which `hcl_live::case` runs through `tofu test`, and removed the
flow #14099 instrumented.

## Decision

Part of #14087; it doesn't make the test faster. This supersedes #14099,
which no longer applies after #14097, and keeps its design: a table of
names and seconds only, on stderr and appended to `GITHUB_STEP_SUMMARY`
in one write so concurrent tests don't interleave. The idea and the
reporting design are #14099's; Krish Sapru is a co-author.

After `tofu test` ends, pass or fail, `hcl_live::case` prints each run
block's seconds, the cleanup in which `tofu test` destroys the runs'
state, and the total. It covers every live HCL case, since they all run
through `hcl_live::case`: `kind-openshift-agents` in Live / Kind,
`docker-dummy` in Live / Docker, and the Live / HCL and Live / Brev
cases (Brev has no job summary there, so only stderr).

The times come from OpenTofu's debug log, not `tofu test -json`. With
the pinned OpenTofu 1.12.9, the JSON view reports a file's runs only
after the whole file ends, all with one timestamp; I checked this with a
two-run test whose runs sleep 2 s and 3 s, which both reported at the
same instant 5 s in. The `TestFileRunner: starting validate for
FILE/RUN` lines that `TF_LOG_CORE=debug` writes mark each run's start; a
run lasts until the next run or the cleanup starts. `info` level has no
such lines.

That log can hold provider configuration and plan values, so:

- the test creates it empty and owner-only (`0600`, which OpenTofu keeps
when it appends) in the run's private `work` directory, replacing any
log a killed run left;
- only the start lines' timestamps and run names are read; the log is
never printed;
- it is deleted as soon as `tofu test` exits, by a drop guard that also
runs when the test panics; only a process killed outright, such as by
nextest's timeout, leaves it, inside the run directory that `cargo ci
live-kind` and `live-docker` delete with their temporary inputs;
- no CI upload includes it: Live / Docker and Live / Kind upload only
their JUnit XML, Live / HCL uploads `hcl/reports/*.json`, and Live /
Brev `brev-evidence/*.json`.

Only the test's own `tofu` gets `TF_LOG_CORE` and `TF_LOG_PATH`; the CLI
it starts inherits them, but the SDK drops every `TF_` variable from the
OpenTofu it runs. The test's steps, assertions, and time limits don't
change.

## Validation

- The new unit tests (`hcl_live::run_durations_*`, `timing_tables_*`,
and `the_core_log_is_owner_only_and_removed_once_read_or_dropped`)
failed against stubs, then passed.
- `cargo ci` (bundle and lifecycle selected) passed before and after the
commit; I ran it as `cargo run --locked --quiet --target-dir
target/ci-runner -p nemoclaw-build --no-default-features -- ci`, because
the `cargo ci` alias fails here with Cargo 1.99.1 (`unexpected argument
'--locked'`).
- `cargo ci live-kind` passed twice on `linux_arm64`; its cluster was
deleted. The second run, with `GITHUB_STEP_SUMMARY` set to a local file,
appended this table, next to `cargo ci`'s own summary, which gives
`hcl_live::case` 97.1 s:

  #### Runs of the kind-openshift-agents case: 97.0 s

  | Run | Time |
  |---|---|
  | cluster | 6.5 s |
  | apply | 32.6 s |
  | reply | 3.4 s |
  | unchanged_plan | 3.2 s |
  | destroy | 38.9 s |
  | (cleanup) | 12.3 s |

  No `tofu-test.log` remained on the host afterward.
- `cargo run --locked -p nemoclaw-build -- fern check` passed, with Node
25.9.0 rather than the pinned 24.22.1.
- Deferred to CI: `cargo ci live-docker` (the `docker-dummy` case) and
the `linux_amd64` Live / Kind run, which is the measurement #14087
needs. Live / HCL and Live / Brev run only when dispatched and are not
run here.

---------

Signed-off-by: Carlos Villela <[email protected]>
Co-authored-by: Krish Sapru <[email protected]>
Co-authored-by: San Dang <[email protected]>
cv pushed a commit that referenced this pull request Nov 3, 2026
… HCL case (#14125)

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

## Failure

Part of #14061. Stacked on #14119.

Two Kind happy paths were still Rust live tests:
`kubernetes_live::registry` (an agent image pulled from a private
registry with the cluster's pull Secret) and `kubernetes_live::oidc` (a
managed gateway that accepts an existing OIDC issuer's tokens). Both
used the shared Rust Kind deploy flow (`deploy_image_and_export`), its
stub model and request helpers, and `registry_fixture.rs`. That code and
the SDK's separate issuer image test (`live-docker`) had no other
callers.

## Decision

Fold both paths into the existing `kind-openshift-agents` case instead
of adding a second Kind case. A second case would not fit the 270 s
`live-kind` budget: `tofu test` runs files one after another, and the
case already takes about 135 s.

**OIDC.** The case switches from the `development` profile to the `oidc`
profile. The reduced Rust gateway test from #14119 still covers the
development profile, including the foreign-token refusal.

- The issuer is the SDK's own development issuer (`issuer::objects`, the
pinned issuer image) in its own namespace, standing in for an identity
provider. Its NetworkPolicy is left out because it admits only a gateway
in the issuer's namespace.
- `cargo ci` builds without the SDK, and the bundle has no TLS provider.
OpenTofu also cannot sign a token. So a small probe, `hcl_live::issuer`,
creates the issuer's key material, its objects, and one token for the
case's audience (the deployment UID). The `kind` module runs it in `run
"cluster"` and releases the objects through its chart, with the issuer
CA in the deployment's namespace.
- The token is written only to
`work/credentials/NEMOCLAW_TEST_OIDC_TOKEN` (mode 0600). The `cli` and
`verifier` modules export each file in that directory as the variable it
names. The token never becomes an OpenTofu value, output, report, or log
line. It is valid for one hour.

**Registry.** `cargo ci live-kind` starts a pinned `registry:3` that
requires a login on the kind network. It pushes the agent image there
with `ctr` and uploads a new index digest, so the node must fetch the
index from the registry. The node's CRI host configuration for that
registry allows HTTP pulls and holds no credentials. The case names the
image by its registry reference and sets `imagePullSecrets:
[agent-registry]`. The `kind` chart creates that Secret from
`TF_VAR_pull_credentials` in the pre-created namespace, as an operator
would. The registry is removed afterward, unless
`NEMOCLAW_KEEP_KIND_CLUSTER` keeps the cluster.

The case's assertions are unchanged: apply succeeds, each agent answers
from its recorded runtime with the stub's reply, a plan has no changes,
and destroy keeps only `openshell_kubernetes_storage.runtime`. With the
`oidc` profile and the private image, apply and the replies also show
that the gateway accepts the issuer's token and that the pods pulled
their image with the Secret.

**Deleted.** `kubernetes_registry.rs`, `kubernetes_oidc.rs`,
`registry_fixture.rs`, `kubernetes_requests.rs` (`gateway`, which
`hcl_live::probe` uses, moves into `kubernetes_live.rs`),
`deploy_image_and_export` and its document, identity, `Sandbox`-object,
and diagnostics helpers, `state::agent_sandbox_id`, the SDK issuer image
test, its `live-docker` selector, and the `live-kind` registry override.

### Removed checks and their owners

| Removed check | Owner |
|---|---|
| A private agent image pulled with the cluster's pull Secret; the agent
answers | This case |
| The gateway accepts an existing issuer's token; the agent answers |
This case (apply, and the probe through the gateway) |
| Destroy keeps the gateway's storage | This case (`retained`); UID
survival stays in the Rust gateway test |
| The `oidc` profile runs no development issuer | Contract:
`kubernetes_managed_compile::an_existing_oidc_issuer_replaces_the_development_issuer`,
`kubernetes_operations::an_oidc_profile_writes_no_issuer_and_identifies_authentication_by_its_namespace`
|
| OpenTofu state holds no registry credentials | Contract: the schema
accepts only Secret names
(`config_kubernetes::image_pull_references_accept_only_unique_kubernetes_secret_names`,
which also rejects a password field), and compile references them by
name |
| Destroy keeps the operator's namespace (UID, labels) and pull Secret |
Contract:
`kubernetes_operations::an_operators_namespace_and_pull_secret_survive_apply_and_destroy`
|
| The issuer image serves both documents over HTTPS | This case: the
gateway fetches discovery and JWKS from the image, run from
`issuer::objects` |
| Unchanged apply and the export's apply keep identities and state;
export reproduces the document, including image and Secret references;
each sandbox has its own ID with its agent bound to it | #14060
(existing Kubernetes item) |
| A token read from `token.env` is not kept in connection state |
Contract:
`kubernetes_connect::an_oidc_connection_passes_the_variable_tokenenv_names`
|
| Registry rejects a wrong password | Dropped: it tests `registry:3`.
The anonymous 401 stays as the setup's readiness check |
| Failure diagnostics (pod states, events, Fabric messages) and their
unit test | Dropped: test-helper output, not a check |

**Needs a maintainer decision.** These checks have no other owner, and
this PR deletes them. Before approving, please accept or reject each
proposal; I will restore any check you want kept:

| Check | Proposal |
|---|---|
| A token for another audience is refused; the refused plan leaves the
state directory byte-identical and echoes no token | Drop from E2E:
audience validation is OpenShell's, and the authored table reaching the
chart is covered by
`kubernetes_managed_compile::authored_tables_reach_the_chart_gateway_config`.
Add "a plan refused by gateway authentication leaves state unchanged and
echoes no token" to #14060. Alternative: keep one narrow Rust security
check. |
| No regular file in the whole state directory holds a token; a renewed
token plans with no changes and exports the document | #14060 (fixture
gateway, `oidc` document, two tokens, then search the state directory) |
| Destroy removes every `Sandbox` object within 60 s | Drop: OpenShell
deletes the objects; the case's destroy covers NemoClaw's part |
| The issuer image returns 404 for other paths and stays within its
memory limit for 10 s | Drop: the case runs `issuer::objects` for the
whole scenario |

Net (Rust / HCL / chart and case YAML / docs / CI config): −1,959 / +86
/ +46 / −18 / −11 lines; 542 added and 2,398 deleted. Of the Rust added,
269 lines are the registry setup and its unit test in
`run_ci/kind_registry.rs`, moved from the deleted test fixture.

## Validation

- `cargo ci fmt`, `cargo ci clippy`, and `cargo ci test` (1,745 tests)
passed on darwin_arm64. The new tests are
`kind_registry::tests::each_run_pushes_a_new_index_without_changing_image_contents`
and the binding test against the real case template, which now checks
the issuer URL, the audience, and the registry reference.
- `tofu fmt -check -recursive` passed in `tests/e2e/hcl` with the
bundled OpenTofu 1.12.9.
- The `kind` module initialized against the bundle's provider mirror.
`tofu console` evaluated its registry, pull Secret, issuer, audience,
and model locals for a bound case, with `TF_VAR_pull_credentials` parsed
from the environment.
- Ran `hcl_live::issuer` from the built e2e binary. It wrote the six
issuer objects and a 0600 token whose `iss` and `aud` match the case.
The chart rendered offline with the bundled Helm provider's
`helm_template`: pull Secret and CA ConfigMap in the deployment
namespace, and issuer objects without the NetworkPolicy in the issuer
namespace.
- After the first Live / Kind run failed, I ran the case's `cluster` run
block locally under `tofu test` with the Helm provider mocked and the
real `hcl_live::issuer` binary. It passed and wrote the issuer objects
and the token to `work/credentials`.
- `Live / Kind` at 0d4ad2b failed on both architectures before any
deployment. The registry started and the image push succeeded. The other
four tests passed. `tofu test` rejected `var.pull_credentials`: a test
file's `var` read from `TF_VAR_*` is the raw string. 578f92b lets the
`kind` module read `TF_VAR_pull_credentials` itself, as it reads the
context.
- `Live / Kind` at 578f92b passed on both architectures.
`hcl_live::case` ran the whole scenario: apply with the private image
and the OIDC token, both agents' replies, an unchanged plan, and
destroy.

| Platform | `hcl_live::case` | nextest suite | `cargo ci live-kind`
step |
  |---|---|---|---|
  | linux_amd64 | 110.2 s | 110.2 s | 249 s |
  | linux_arm64 | 109.9 s | 109.9 s | 199 s |

The limits are 150 s per test and 270 s for the suite. The case took 133
s and 138 s with three agents in #14097. The suite now ends with the
case, so it is about 140 s under its budget. I left
`.config/test-budgets.yaml` unchanged, because one run is not enough to
lower it.
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions area: docs Documentation, examples, guides, or docs build area: e2e End-to-end tests, nightly failures, or validation infrastructure area: integrations Third-party service integration behavior area: security Security controls, permissions, secrets, or hardening chore Build, CI, dependency, or tooling maintenance integration: openclaw OpenClaw integration behavior platform: k8s Affects Kubernetes deployments v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants