Repository navigation
test(e2e): observe deployment state through export instead of intent.json - #13000
Merged
Merged
Conversation
…json Seven assertions decoded the SDK's private intent.json; model_live also recompiled the SDK's targets from it to read the compiled service spec. Export refuses unfinished and destroyed deployments, so the tests now ask it; model_live reads the applied spec from OpenTofu state.
The inference service is no longer a nemoclaw resource, so the state lookup would not find it; model_live needs a live model run to rewrite.
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 was referenced Oct 11, 2026
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
Seven nemoclaw-e2e assertions decoded the SDK's private
intent.jsonto read itspending,succeeded,runtimePending,destroyed, anddocumentfields.docs/state.mdcalls these files implementation details, so an SDK change to the record breaks system tests that do not test the record.Decision
Deployment::exportandnemoclaw exportrefuse a deployment whose apply is unfinished or which was destroyed, before they observe anything. The tests ask export instead of reading the file. Where a later public assertion in the same test already shows the outcome, the decode is removed.pendingis true after a lost create replydeployment::interrupted_create_preserves_pending_targets_allows_unrelated_intent_and_recoversapply is unfinished; the test's next apply with changed configuration is still refused withunfinished creation requires its original resource configurationpendingis true andsucceededfalse after a readiness failuredeployment::readiness_and_observation_failures_retain_bindings_and_recover_without_recreationapply is unfinishedpendingis false andsucceededtrue after recoveryapplyreturnsOk;state::tests::recovery_checkpoints_survive_reload_and_reapply(unit) checks the record's transitionsdocumentdeployment::destroy_does_not_require_the_inference_credential_or_rewrite_its_referencecannot export a destroyed deployment, so the record survives destroy;state::tests::recovery_checkpoints_survive_reload_and_reapplychecks that the document persists through destroysucceededis true after a healthy applydeployment::apply_health_failure_retains_resources_and_unchanged_apply_checks_againapplyreturnsOkwithallows_apply_completion()health, as the test already assertspendingis false andsucceededfalse while health is readdeployment::successful_apply_checkpoints_mutations_before_reading_healthsucceeded:state::tests::recovery_checkpoints_survive_reload_and_reapply(settled mutations do not imply healthy completion)destroyedis true after a partial destroyremote_service::partial_runtime_destroy_retains_storage_without_creating_networkandpartial_ollama_destroy_retains_storage_without_creating_networknemoclaw exportrefuses:cannot export a destroyed deploymentruntimePendingis true after a startup failureremote_service::remote_ollama_recovers_reapplies_and_stops_on_observation_failure_keeping_dataandmanaged_bearer_credentials_survive_recovery_reapply_and_replacement_outside_statenemoclaw exportrefuses:apply is unfinished; the test's runtime-state and recovery assertions are unchangedTests that compare
intent.jsonbytes before and after an operation still do; they check that a file is unchanged without decoding it.Not changed:
model_livedecodesintent.jsonand recompiles the SDK's internalinference_servicetarget to read itsspec. That target is no longer an OpenTofu resource, so the test needs a rewrite that a live model run must validate.Validation
On linux_arm64, against a bundle built from v1:
deploymenttests,partial_runtime_destroy_retains_storage_without_creating_network, andremote_ollama_recovers_reapplies_and_stops_on_observation_failure_keeping_data. I did not runpartial_ollama_destroy_retains_storage_without_creating_networkormanaged_bearer_credentials_survive_recovery_reapply_and_replacement_outside_statelocally; they share the changed helpers, and the lifecycle step runs them.crates/nemoclaw-sdk/src/deployment/mod.rs,successful_apply_checkpoints_mutations_before_reading_healthfails withConflict("cannot export while apply is unfinished; ..."); restoring the checkpoint passes it.cargo fmt --all --checkandcargo clippy -p nemoclaw-e2e --all-targets -- -D warnings: clean.