Skip to content

test: make the bundle the only test input and split out the fixture provider - #12971

Merged
cv merged 3 commits into
v1from
test/bundle-driven-harness
Oct 10, 2026
Merged

cv merged 3 commits into
v1from
test/bundle-driven-harness

Conversation

@cv

@cv cv commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

Refs #12878 (the two parts still open).

Failure

  • Tests that run OpenTofu took up to three inputs: NEMOCLAW_TEST_TOFU and NEMOCLAW_TEST_PROVIDER for the contract tests and two nemoclaw-e2e tests, and NEMOCLAW_TEST_BUNDLE for the rest. The bundle already ships pinned OpenTofu and all three providers. The contract tests also found the openshell and fabric providers beside NEMOCLAW_TEST_PROVIDER, so cargo ci archive had to pack target/debug providers for the lifecycle workers.
  • After test: share fixture binaries and finish the nemoclaw contract tests #12967, nemoclaw-test-fixtures depended on nemoclaw-sdk and tf-provider for the fixture provider. Building the openshell or fabric provider tests therefore also compiled the SDK and its Kubernetes, Fabric, and YAML dependencies.

Decision

  • NEMOCLAW_TEST_BUNDLE is now the only input. nemoclaw_test_fixtures::Bundle finds the bundle's libexec/tofu and each providers/registry.opentofu.org/nvidia/NAME/VERSION/PLATFORM provider. TofuWorkspace::new(&bundle, nemoclaw) takes openshell and fabric from the bundle.
  • Each provider's contract tests still test the provider built from the checkout, with no separate input. package_executable! reads nextest's NEXTEST_BIN_EXE_<name>, which also works after archive extraction, and falls back to Cargo's CARGO_BIN_EXE_<name> under cargo test. Any other provider those tests need comes from the bundle. The two nemoclaw-e2e tests (sandbox_readiness, managed) run the bundle's nemoclaw provider.
  • cargo ci lifecycle sets only NEMOCLAW_TEST_BUNDLE. lifecycle-inputs.tar keeps only the fake ssh relay, which the Windows lifecycle step puts on PATH. Nextest already archives each selected package's executables. ssh_relay() no longer looks beside the providers.
  • The fixture provider moves to a new nemoclaw-fixture-provider crate. An ignored test that the lifecycle profile selects makes nextest archive it, as ssh_relay does for the relay.
  • Updated docs/contributing/integration-tests.md and testing.md.

Build cost of cargo build --locked -p openshell-provider --tests from a clean target directory, measured sequentially on the same aarch64 host while other jobs ran (load 2–15):

Crates compiled Wall time
origin/v1 (b42d188) 374 67 s
This branch 324 47 s

The 50 crates no longer compiled include nemoclaw-sdk, nemoclaw-fabric, nemo-fabric-core, kube, k8s-openapi, jiff, toml, pest, and serde-saphyr. Wall time is noisy on a shared host; the crate count is deterministic.

Validation

  • ci_lifecycle: lifecycle_partition_reaches_nextest_without_changing_the_selected_suite now requires that only an absolute NEMOCLAW_TEST_BUNDLE reaches nextest, and the archive test requires that no provider is packed. I watched both fail before the change; all 7 tests pass now.
  • New bundle unit tests in nemoclaw-test-fixtures pass.
  • I built a fresh linux_arm64 bundle, unset NEMOCLAW_TEST_TOFU and NEMOCLAW_TEST_PROVIDER, and set only NEMOCLAW_TEST_BUNDLE. Under nextest with --run-ignored all, these pass:
    • openshell-provider and fabric-provider contract (50 tests)
    • nemoclaw-provider contract (27 tests)
    • nemoclaw-e2e sandbox_readiness::
    • the new nemoclaw-fixture-provider archive test
    • nemoclaw-test-fixtures
  • Archive handoff: cargo nextest archive with binary_id(=openshell-provider::contract) included terraform-provider-openshell. With target/debug/terraform-provider-openshell moved away, the archived capabilities:: tests passed from --extract-to, so they used the extracted provider.
  • cargo test -p openshell-provider --test contract capabilities:: -- --ignored passes through the CARGO_BIN_EXE fallback. Without the variable, tests fail with NEMOCLAW_TEST_BUNDLE names a bundle; build one with cargo ci bundle.
  • cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings are clean on Linux. I did not run Windows or macOS locally; CI covers them.

cv added 2 commits October 10, 2026 13:36
…rovider

Tests that run OpenTofu now read only NEMOCLAW_TEST_BUNDLE: pinned
OpenTofu and the providers come from the bundle, and each provider's
contract tests run the provider Cargo builds with them. cargo ci and the
lifecycle archive stop passing NEMOCLAW_TEST_TOFU and
NEMOCLAW_TEST_PROVIDER and packing target/debug providers.

The fixture provider moves to nemoclaw-fixture-provider, so the openshell
and fabric provider tests no longer compile nemoclaw-sdk.

Refs #12878
@cv cv added area: e2e End-to-end tests, nightly failures, or validation infrastructure v1 NemoClaw v1 branch labels Oct 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 29e4506 into v1 Oct 10, 2026
@cv
cv deleted the test/bundle-driven-harness branch October 10, 2026 21:13
cv added a commit that referenced this pull request Oct 11, 2026
## Failure

`v1` doesn't compile since #12972. Its new
`nemoclaw-provider/tests/contract/kubernetes_lifecycle.rs` calls
`TofuWorkspace::new(tofu, provider)`, with OpenTofu and the provider
read from `NEMOCLAW_TEST_TOFU` and `NEMOCLAW_TEST_PROVIDER`. #12971
merged first and changed that function to `TofuWorkspace::new(&Bundle,
nemoclaw)`. Since #12971, `cargo ci lifecycle` also no longer sets
either variable. Each PR passed CI against a `v1` without the other.

Every PR's CI now fails at `Lint Rust`:

```
error[E0308]: mismatched types
   --> crates/nemoclaw-provider/tests/contract/kubernetes_lifecycle.rs:111:44
    |
111 |         let workspace = TofuWorkspace::new(tofu, provider);
    |                                            ^^^^ expected `&Bundle`, found `PathBuf`
```

## Decision

Build the workspace with `crate::workspace()`, as the crate's other
contract tests do since #12971: OpenTofu and the `openshell` and
`fabric` providers from `NEMOCLAW_TEST_BUNDLE`, and the `nemoclaw`
provider built from the checkout. That drops the two environment
variables and the now-unused `PathBuf` import.

## Validation

- `cargo clippy -p nemoclaw-provider --tests -- -D warnings` is clean.
- `cargo ci` passed: 1,331 workspace tests and 131 lifecycle tests. Both
of the file's tests ran from the bundle and passed:
-
`kubernetes_resources_apply_observe_the_release_and_tear_down_keeping_storage`
-
`kubernetes_resources_refuse_replaced_or_missing_objects_without_recreating_them`
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions chore Build, CI, dependency, or tooling maintenance 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: ci CI workflows, checks, release automation, or GitHub Actions area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants