Skip to content

test(e2e): plan every remaining NemoClaw type from authored HCL - #12868

Merged
cv merged 2 commits into
v1from
test/opentofu-type-coverage
Oct 9, 2026
Merged

cv merged 2 commits into
v1from
test/opentofu-type-coverage

Conversation

@cv

@cv cv commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Part of #12782.

Failure

#12782 is done only when every type is exercised by an authored configuration through pinned OpenTofu. Four nemoclaw types had no such configuration:

  • nemoclaw_kubernetes_auth
  • nemoclaw_kubernetes_gateway
  • nemoclaw_ollama_external_model
  • nemoclaw_runtime_image

kubernetes_hcl, added in #12855, was also missing from the lifecycle profile, so CI never ran it.

Decision

  • Kubernetes: kubernetes_hcl plans storage, authentication and the gateway together without a cluster. The authentication and gateway resources take the storage's generated owner, as the provider guide requires. An invalid namespace is rejected at the attribute on every resource. In that check each resource names its own owner, because OpenTofu skips resources whose dependencies fail validation.
  • External Ollama model: service_storage applies proxy storage with generated identity and an external model that shares it, against Docker and Ollama fixtures. Changing the upstream digest then stops planning and names services.local.upstream.
  • Runtime image: runtime_image reads an image's labels through a read-only Docker fixture and reports available. An image without a required label fails the check.
  • CI: kubernetes_hcl and runtime_image join the lifecycle profile.

fabric_sandbox_readiness stays with the remaining #12788 work, which changes its inputs.

Validation

The lifecycle profile ran these three groups locally through pinned OpenTofu: 7 tests, all passing. Clippy at -D warnings and fmt are clean. This PR adds tests only; production code is unchanged.

#12782 requires each type to be exercised through pinned OpenTofu by an
authored configuration. The Kubernetes authentication and gateway
resources, the external Ollama model, and the runtime image check had
none, and kubernetes_hcl was missing from the lifecycle profile, so CI
never ran it.
@cv cv added area: architecture Architecture, design debt, major refactors, or maintainability v1 NemoClaw v1 branch labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

The fixture's Docker engine listens on a Unix socket, which the Windows
clippy step cannot build.
@cv
cv merged commit 561e630 into v1 Oct 9, 2026
14 checks passed
@cv
cv deleted the test/opentofu-type-coverage branch October 9, 2026 06:07
cv added a commit that referenced this pull request Oct 10, 2026
…ontract tests (#12939)

Part of #12879 and #12876.

## Failure

The `nemoclaw` provider's OpenTofu tests sat in `nemoclaw-e2e` beside
the system scenarios, and the lifecycle profile selected them by name
pattern. Nothing checked that every type had one, and #12868 added
several by hand.

## Decision

- **Contract binary:** `nemoclaw-provider` gets a `contract` test
binary, like the `openshell` and `fabric` ones. `service_storage`,
`kubernetes_hcl`, `runtime_image`, `vllm_runtime`, `gateway_readiness`,
and `discovery` move into it unchanged.
- **Coverage test:** `every_type_has_a_contract_test` lists each
resource and data source the provider serves, and fails for any type
without a contract test.
- **Exceptions list:** `ELSEWHERE` records the types still tested only
elsewhere, each with its reason. The test also fails when one of them
gains a contract test.

| Type | Tested in | Why not in the contract binary yet |
|---|---|---|
| `managed_gateway` | `nemoclaw-e2e` `provider_protocol` | Needs that
crate's fixture provider (#12878) |
| `service_capacity`, `service_readiness` | `nemoclaw-e2e` | Needs that
crate's SSH fixture (#12878) |
| `gateway_storage` | `nemoclaw-e2e` `managed` and the live Docker
gateway test | Needs Docker |
| `inference_capabilities` | `nemoclaw-e2e` `inference_discovery` | Read
only through SDK deployments |

- **Lifecycle profile:** it now selects all three providers' contract
binaries. It lists only the system modules that remain in
`nemoclaw-e2e`.
- **Docs:** `docs/contributing/integration-tests.md` describes the
binary and the exceptions.

## Still to do for #12879

- **Kubernetes:** `kubernetes_hcl` checks the Kubernetes resources only
through `plan`. Testing apply and refresh needs a fake Kubernetes API.
- **Exceptions:** the five types above need contract tests. Three of
them depend on fixture binaries that would first move into a shared
crate (#12878).

## Validation

- **Local run:** through the lifecycle profile, the contract binary (16
tests) and the three tests left in `nemoclaw-e2e` pass in 13 s. The
coverage test failed at first for two reasons. The runtime data sources
are named indirectly in `vllm_runtime`, so the test now also matches
type names. The rest are the types listed in `ELSEWHERE`.
- **Checks:** workspace clippy at `-D warnings` and fmt are clean.
@wscurran wscurran added area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance platform: k8s Affects Kubernetes deployments labels Oct 28, 2026
@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: architecture Architecture, design debt, major refactors, or maintainability area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance platform: k8s Affects Kubernetes deployments v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants