Skip to content

test: move OpenShell backend tests from nemoclaw-e2e to the providers - #12998

Merged
cv merged 1 commit into
v1from
test/openshell-backend-unit-tests
Oct 11, 2026
Merged

cv merged 1 commit into
v1from
test/openshell-backend-unit-tests

Conversation

@cv

@cv cv commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Part of #12881.

Failure

crates/nemoclaw-e2e/tests/openshell.rs held 12 tests that call the OpenShell backend directly against the fake gateway, without OpenTofu. They check openshell-provider and fabric-provider rules, but lived in the system layer and built their rows with the SDK's compile::targets, so an SDK refactor could break them.

Decision

  • Nine tests move to openshell-provider unit tests in src/fake_gateway_tests.rs.
  • Three call fabric_provider::AgentBridge or AgentConfigurationBackend, which fabric-provider implements on the OpenShell client, so they move to fabric-provider unit tests in src/fake_gateway_tests.rs.
  • Rows come from the openshell provider's contract fixtures, not the SDK. nemoclaw_test_fixtures::openshell::contract_rows reads one fixture and converts each resource's attributes to the backend row OpenTofu sends, using nemoclaw_openshell::structured_inputs. openshell_contract_fixtures::openshell_contract_fixtures_match_what_the_sdk_compiles (nemoclaw-e2e) still checks that those fixtures are what the SDK compiles, so the SDK-to-provider check stays in the system layer.
  • nemoclaw-test-fixtures gains a dependency on nemoclaw-openshell; fabric-provider gains openshell-core and tonic as dev-dependencies.

No assertion is removed. Inputs changed where a test edited an SDK document:

Test Now in Input
sandbox_teardown_requires_owned_identity_but_not_its_previous_configuration openshell-provider local fixture
owning_api_reconciles_lost_create_reply_and_checks_conditional_updates openshell-provider hermes-auth fixture, whose registration already names a credential, instead of local.yaml edited to add one
sandbox_launch_policy_and_provider_identity_survive_read_failures openshell-provider local
sandbox_exec_uses_the_bound_workspace_and_rejects_substituted_identity openshell-provider local
sandbox_exec_deadline_bounds_a_stream_that_never_finishes openshell-provider local
incomplete_desired_ownership_is_rejected_before_any_create openshell-provider handwritten row, as before
failed_readback_retains_each_created_identity_until_explicit_recovery openshell-provider local
explicit_policy_reaches_the_gateway_and_detects_drift openshell-provider explicit-policy; the expected policy comes from nemoclaw_openshell::runtime::RuntimeBinding instead of the SDK's re-export
native_provider_union_is_attached_and_attachment_drift_is_rejected openshell-provider multiple-providers, whose first sandbox attaches two providers, instead of fabric-openclaw.yaml edited to add one
public_configuration_refresh_verifies_runtime_intent_without_mutation fabric-provider fabric-openclaw sandbox and a handwritten agent_configuration row, instead of the SDK's compiled row
terminal_startup_reports_phase_and_exit_without_echoing_backend_text fabric-provider fabric-openclaw
rejected_configuration_stops_startup_without_exec_and_preserves_bindings fabric-provider local

Validation

On linux_arm64:

  • cargo nextest run -p openshell-provider -p fabric-provider --lib fake_gateway: 12 passed; the slowest took 2.3 s.
  • cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings: clean.
  • The tests stay in the test step, which ran them before from the nemoclaw-e2e integration binary.

The twelve tests in nemoclaw-e2e/tests/openshell.rs drove the OpenShell
backend against the fake gateway with rows the SDK compiled. Nine now run
as openshell-provider unit tests and three, which use the Fabric agent
bridge and configuration backend, as fabric-provider unit tests. Both
start from the openshell provider's contract fixtures, converted to rows
by nemoclaw_test_fixtures::openshell::contract_rows.
@cv cv added area: e2e End-to-end tests, nightly failures, or validation infrastructure area: providers Inference provider integrations and provider behavior v1 NemoClaw v1 branch labels Oct 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 01697a3 into v1 Oct 11, 2026
@cv
cv deleted the test/openshell-backend-unit-tests branch October 11, 2026 19:36
cv added a commit that referenced this pull request Oct 11, 2026
Part of #12876: its last criterion, "the testing guide describes the
layers and budgets".

## Failure

`docs/contributing/testing.md` listed the step budgets but didn't
describe the unit, contract, system, and live layers, or which crates
and binaries belong to each. `docs/contributing/integration-tests.md`
had grown one fixture at a time, and some of its text no longer matched
the code:

- it named tests that no longer exist: `harness_codex`, the OpenClaw
interface lifecycle, and Hermes interface modes;
- it described ten Fabric harness tests, but `fabric_deployment` has two
(OpenClaw and Pi);
- its Docker tests are part of the `live-docker` suite, not the fixture
layers.

## Decision

- `testing.md` now has sections for the layers (what each checks, its
binaries, and what belongs there), how to run each layer with the one
`NEMOCLAW_TEST_BUNDLE` input, budgets and per-test limits (where each is
enforced and how to change one), timing reports, and how CI runs each
layer: jobs, partitions, archives, the Windows relay, and live suites on
pull requests. The dependency, image, schema, CLI, cache, and coverage
sections are unchanged.
- `integration-tests.md` now covers the contract and system layers: the
shared harness, each provider's contract binary by module, and the
system modules, built from the current test names.
- The four sections that need a real Docker engine move to
`live-tests.md` under a new Docker Live Suite section, next to the
Docker gateway tests already there. Their two inbound links are updated.
Other anchors are kept.
- After merging `v1` (#12995, #12996, #12998, #12999, #13000), the guide
describes what moved: the system layer's `nemoclaw-sdk` tests are now
only the Helm recovery tests, the OpenShell and Fabric backends'
fake-gateway tests (formerly `nemoclaw-e2e/tests/openshell.rs`) are
provider unit tests, the Kind suite runs `nemoclaw-e2e`'s
`kubernetes_live` and `kubernetes_chart`, and `Build live images` builds
the live images once and decides whether the live suites run.
- The `kubernetes_lifecycle` contract tests' `#[ignore]` reason named
`NEMOCLAW_TEST_TOFU` and `NEMOCLAW_TEST_PROVIDER`; it now names
`NEMOCLAW_TEST_BUNDLE`, which the tests read.
- Every statement was checked against `run_ci.rs`, `ci/timing.rs`,
`.config/`, the workflows, the `v1` ruleset, and the tests.

### Budget enforcement audit

Every budget in `.config/test-budgets.yaml` is enforced on the Linux
runners. In run
[38136353545](https://github.com/NVIDIA/NemoClaw/actions/runs/38136353545)
(linux_amd64), the `test`, `Lifecycle / 1`, `Live / Docker`, `Live /
Kind`, and `Lifecycle timing` logs each print their budget and "Within
budget." with no "reported only" note. The three binary budgets appear
in the `Lifecycle timing` table.

No budget is recorded but unenforced. These gaps remain:

- When `changes live` skips the live suites on a pull request, their
budgets aren't checked for that PR.
- The `test` wall budget covers the nextest run, not the doctests.
- `.config/test-budgets.yaml` isn't checked in the other direction. A
step key that names no step, or a binary budget whose binary has no
lifecycle tests (renamed, or every partition missing its report), passes
silently. `Lifecycle timing` names a partition with no report but
doesn't fail on it.

## Validation

- `cargo run --locked -p nemoclaw-build -- fern check`: 0 errors. Its
one warning is also on `v1`.
- `git diff --check`
- `cargo test -p nemoclaw-build --test integration ci::`: 15 passed.
- I ran the documented commands against a `linux_arm64` bundle:
- the nextest `lifecycle` command filtered to
`openshell-provider::contract` (44 passed);
  - `nemoclaw-sdk --lib -- --ignored helm_recovery` (5 passed);
  - `nemoclaw-e2e sandbox_readiness::` (1 passed);
  - `nemoclaw-provider --test contract service_readiness::` (2 passed);
  - `lifecycle-timing` on an empty directory.
- After the merge, against a rebuilt `linux_arm64` bundle: the same
commands again, plus `kubernetes_lifecycle::` (2 passed) and the
providers' `fake_gateway_tests` (3 and 9 passed); `cargo fmt --all
--check` and `cargo clippy --workspace --all-targets -- -D warnings`.
- No behavior changes: the only code change is an `#[ignore]` reason
string.
@wscurran wscurran added chore Build, CI, dependency, or tooling maintenance security area: security Security controls, permissions, secrets, or hardening and removed security 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: e2e End-to-end tests, nightly failures, or validation infrastructure area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening 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