Repository navigation
test: move OpenShell backend tests from nemoclaw-e2e to the providers - #12998
Merged
Merged
Conversation
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.
Contributor
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.
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.
Part of #12881.
Failure
crates/nemoclaw-e2e/tests/openshell.rsheld 12 tests that call the OpenShell backend directly against the fake gateway, without OpenTofu. They checkopenshell-providerandfabric-providerrules, but lived in the system layer and built their rows with the SDK'scompile::targets, so an SDK refactor could break them.Decision
openshell-providerunit tests insrc/fake_gateway_tests.rs.fabric_provider::AgentBridgeorAgentConfigurationBackend, whichfabric-providerimplements on the OpenShell client, so they move tofabric-providerunit tests insrc/fake_gateway_tests.rs.nemoclaw_test_fixtures::openshell::contract_rowsreads one fixture and converts each resource's attributes to the backend row OpenTofu sends, usingnemoclaw_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-fixturesgains a dependency onnemoclaw-openshell;fabric-providergainsopenshell-coreandtonicas dev-dependencies.No assertion is removed. Inputs changed where a test edited an SDK document:
sandbox_teardown_requires_owned_identity_but_not_its_previous_configurationlocalfixtureowning_api_reconciles_lost_create_reply_and_checks_conditional_updateshermes-authfixture, whose registration already names a credential, instead oflocal.yamledited to add onesandbox_launch_policy_and_provider_identity_survive_read_failureslocalsandbox_exec_uses_the_bound_workspace_and_rejects_substituted_identitylocalsandbox_exec_deadline_bounds_a_stream_that_never_finisheslocalincomplete_desired_ownership_is_rejected_before_any_createfailed_readback_retains_each_created_identity_until_explicit_recoverylocalexplicit_policy_reaches_the_gateway_and_detects_driftexplicit-policy; the expected policy comes fromnemoclaw_openshell::runtime::RuntimeBindinginstead of the SDK's re-exportnative_provider_union_is_attached_and_attachment_drift_is_rejectedmultiple-providers, whose first sandbox attaches two providers, instead offabric-openclaw.yamledited to add onepublic_configuration_refresh_verifies_runtime_intent_without_mutationfabric-openclawsandbox and a handwrittenagent_configurationrow, instead of the SDK's compiled rowterminal_startup_reports_phase_and_exit_without_echoing_backend_textfabric-openclawrejected_configuration_stops_startup_without_exec_and_preserves_bindingslocalValidation
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 --checkandcargo clippy --workspace --all-targets -- -D warnings: clean.teststep, which ran them before from thenemoclaw-e2eintegration binary.