Repository navigation
test(e2e): report one failed agent among three and correct the lifecycle test guides - #13483
Merged
Merged
Conversation
…cle test guides ## Failure #12734 asks for system tests of multi-agent deployments and how their failures are reported, and for the scenarios to be recorded before live work starts. Two gaps stood in the way. **One agent failing among several was untested.** The fake OpenShell gateway applied its start fault (`configuration_error`) to every sandbox and recorded exec calls without their target sandbox. No test could reject one agent's start while another's succeeded in the same apply, or check which sandboxes received a `start` or `stop`. **The lifecycle filter and the test guides had drifted from the code**: - `.config/nextest.toml` still selected `sandbox_readiness::` and `inference_discovery::`, whose files #13379 and #13291 deleted. - `testing.md` listed those modules but not `travel_example` and `travel_team_example`. It named `nemoclaw-runtime` as a live-docker package after #13457 removed its test, said the live suites build OpenClaw on AMD64 (Deep Agents since #13369), said live-kind runs one test at a time, and showed contract-binary budgets that `.config/test-budgets.yaml` no longer has. - `live-tests.md` described `an_agent_sandbox_starts_and_destroy_keeps_storage`, which #13414 replaced with `kubernetes_live::oidc`, a test no contributing guide described. It also implied that only `NEMOCLAW_KEEP_KIND_CLUSTER=1` keeps the cluster. - `integration-tests.md` listed four openshell-provider modules under nemoclaw-provider (moved by #13187), `runtime_image` (renamed `host_image` by #13223), and the Fabric types `fabric_agent` and `fabric_harnesses` as if they were modules. It kept the `inference_discovery` system module and the Helm recovery tests that #13373 removed: `receipt`, `release_record`, and the second-destroy test. It also presented `fabric_bridge`, which is not ignored, as a lifecycle test. - `live_kind.rs` said the cluster is kept only after a failed run; it is kept on either outcome. ## Decision No production code changes. ### One failed agent among three - **Fixture** (`nemoclaw-test-fixtures/src/openshell.rs`): `State` gains two fields. Both start empty, so existing tests see unchanged behavior. - `configuration_error_for` is a start rejection keyed by sandbox name. The `fabric-agent-ctl` `start` arm checks it before `configuration_error`. - `exec_sandboxes` holds each exec call's target sandbox, parallel to `exec_calls`, at both places exec calls are recorded. - **Test**: `multi_agent::one_failed_agent_is_reported_alone_and_its_retry_replaces_only_it` applies three OpenClaw sandboxes cloned from `examples/fabric-openclaw.yaml`: assistant, researcher and reviewer. It then narrows the researcher's and reviewer's tools, which replaces both sandboxes, and Fabric rejects only the reviewer's start. On that update, the test checks: - The bundled CLI's `apply -o json` exits 1 and names only `sandbox/reviewer`. - The CLI's output leaves out Fabric's message, and `diagnostics/fabric-reviewer.json` keeps it. - The researcher's replacement finishes, and its new agent runs. - The assistant keeps its sandbox id and configuration. It is not stopped and gets no `start` or `stop`. After the fault clears, the test checks the retry: - The plan replaces only the reviewer's sandbox and creates its agent. - After the apply, the CLI export equals the document and a reapply changes nothing. - The CLI destroy empties the gateway. - **Why an update**: the failure is injected on an update so that the assistant's agent is already running. The test can then check that a sibling's failure neither stops, restarts nor replaces it. - **Retry plan**: it holds two changes, not three. The failed apply already updated `terraform_data.agent_reviewer` and recorded no `fabric_agent.reviewer`. - In `deployment.rs`, `Lifecycle` and the helpers the new module uses become `pub(crate)`, like `registry_fixture`'s shared items. The module is registered in `tests/main.rs` and the `lifecycle` profile. The test passed on its first run against a bundle whose production code matches `origin/v1`, so it adds coverage and found no defect. ### Lifecycle filter and test guides - Remove the two inert filter terms and correct each statement against the code. - The OpenShift-profile and registry tests still run the deploy, export, and destroy flow that the removed agent test described, through `deploy_image_and_export`. `live-tests.md` now attributes that flow to them and adds a separate paragraph on the OIDC test: the stand-in issuer in `nc-issuer-*`, the token supplied through `tokenEnv`, refusal of a token for another audience without echoing it, export, and retained storage. - `testing.md` and `integration-tests.md` list and describe `multi_agent`. - Omissions that are not errors, such as contract modules no guide lists, are left for a later change. Editing `.config/nextest.toml` selects the live-docker and live-kind suites in this PR's CI through `.config/determinator-live.toml`. ## Validation All checks ran on linux_arm64. - `cargo ci --full` passed: tools, fmt, clippy, build, test (1600 passed), schema, bundle, and lifecycle (151 passed, 98.8 s wall with 8 workers; `multi_agent` 12.9 s), within budget. - Before adding `multi_agent`, `cargo nextest list --profile lifecycle --run-ignored only` listed the same 150 tests with `origin/v1`'s `nextest.toml` and with the corrected one. Replacing `helm_recovery` with an unmatched term in a scratch copy of the config dropped 9 tests, so the comparison detects a lost term. - `cargo nextest list --profile live-kind --run-ignored only` lists 4 `kubernetes_live` and 3 `kubernetes_chart` tests, as the corrected guides say. - `NEMOCLAW_TEST_BUNDLE=$PWD/dist/linux_arm64 cargo test -p nemoclaw-e2e --test integration -- --ignored multi_agent::` passed in 4 of 4 runs. - Each of these temporary mutations made `multi_agent` fail. All were reverted. - The global fault in place of the reviewer's: the output named `sandbox/researcher`, so the test depends on the per-sandbox fault. - The researcher left unchanged. - A rejected start that stops every running agent. - A fault without Fabric's message. - A retry that also changes the assistant. - An export compared with the old document. - With `NEXTEST_TEST_THREADS=4`, lifecycle partitions 1/2 and 2/2 passed in 133.9 s and 107.1 s wall against 300 s; `multi_agent` took 18.3 s against the 90 s per-test limit. These are local times and do not predict CI runner times directly. - `cargo run -p nemoclaw-build -- docs --check` and `git diff --check` pass. Deferred to CI: - `cargo run -p nemoclaw-build -- fern check` stops at `npm ci` because Node.js is not installed on this host. Its Rust docs and schema checks pass. - The live-docker and live-kind suites, which need Docker. - Darwin and Windows lifecycle times. They are reported there but not enforced, and the new test adds about 15 s per platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
v1 documentation preview: https://nvidia-preview-nemoclaw-v1-pr-13483.docs.buildwithfern.com/nemoclaw |
v1 now builds the Pi agent image on every platform (#13569 and the Bake image changes), so this branch's correction to "Pi on ARM64 or Deep Agents on AMD64" is stale: - docs/contributing/live-tests.md conflicted on that sentence; keep v1's "The runner builds Pi". - docs/contributing/testing.md merged cleanly but kept this branch's "Pi on ARM64, Deep Agents on AMD64" for the live-docker step; it now says "the Pi agent image", matching live_images::agent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gaveezy
added a commit
that referenced
this pull request
Oct 22, 2026
#13483 merged into v1 as a squash (5b1b48a), so this branch and v1 held the same changes in different commits, and the merge conflicted in crates/nemoclaw-e2e/tests/multi_agent.rs and docs/contributing/integration-tests.md. The squash matches #13483's final head (98b2a8d) in every file it touched, so each conflicted file was merged three ways with that head as the base: this branch's own change on one side and v1's later changes on the other. The result differs from v1 by exactly this pull request's own commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gaveezy
added a commit
that referenced
this pull request
Oct 22, 2026
#13483 merged into v1 as a squash (5b1b48a), so this branch and v1 held the same changes in different commits, and the merge conflicted in .config/nextest.toml, crates/nemoclaw-e2e/tests/deployment.rs, docs/contributing/integration-tests.md and docs/contributing/testing.md. The squash matches #13483's final head (98b2a8d) in every file it touched, so each conflicted file was merged three ways with that head as the base: this branch's own change on one side and v1's later changes on the other. The result differs from v1 by exactly this pull request's own commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gaveezy
added a commit
that referenced
this pull request
Oct 22, 2026
docs/contributing/live-tests.md conflicted with #13483 (5b1b48a) in two places: - The shared Kind flow: #13483 corrected the old one-agent description; this branch replaces it with the three-agent flow, its request rounds and the stub. Keep this branch's text. - The end of the Kubernetes section: #13483 added the OIDC test's paragraph, and this branch rewords the "request no inference" sentence for the stub. Keep both: the OIDC paragraph, then this branch's sentence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6 tasks
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.
Failure
#12734 asks for system tests of multi-agent deployments and how their failures are reported, and for the scenarios to be recorded before live work starts. Two gaps stood in the way.
One agent failing among several was untested. The fake OpenShell gateway applied its start fault (
configuration_error) to every sandbox and recorded exec calls without their target sandbox. No test could reject one agent's start while another's succeeded in the same apply, or check which sandboxes received astartorstop.The lifecycle filter and the test guides had drifted from the code:
.config/nextest.tomlstill selectedsandbox_readiness::andinference_discovery::, whose files feat: run agents through Fabric's fabric-agent-ctl #13379 and refactor: stop checking external inference servers from the control host #13291 deleted.testing.mdlisted those modules but nottravel_exampleandtravel_team_example. It namednemoclaw-runtimeas a live-docker package after feat(runtime): let Ollama download and store its own models #13457 removed its test, said the live suites build OpenClaw on AMD64 (Deep Agents since feat(fabric): upgrade to Fabric v0.5.0 without patching it #13369), said live-kind runs one test at a time, and showed contract-binary budgets that.config/test-budgets.yamlno longer has.live-tests.mddescribedan_agent_sandbox_starts_and_destroy_keeps_storage, which feat(kubernetes): authenticate a managed gateway through an existing OIDC issuer #13414 replaced withkubernetes_live::oidc, a test no contributing guide described. It also implied that onlyNEMOCLAW_KEEP_KIND_CLUSTER=1keeps the cluster.integration-tests.mdlisted four openshell-provider modules under nemoclaw-provider (moved by refactor(openshell-provider): serve the gateway installation types #13187),runtime_image(renamedhost_imageby feat(host-provider): check images with data.host_image and drop the runtime-spec label #13223), and the Fabric typesfabric_agentandfabric_harnessesas if they were modules. It kept theinference_discoverysystem module and the Helm recovery tests that perf(tests): consolidate lifecycle coverage at faster integration boundaries #13373 removed:receipt,release_record, and the second-destroy test. It also presentedfabric_bridge, which is not ignored, as a lifecycle test.live_kind.rssaid the cluster is kept only after a failed run; it is kept on either outcome.Decision
No production code changes.
One failed agent among three
Fixture (
nemoclaw-test-fixtures/src/openshell.rs):Stategains two fields. Both start empty, so existing tests see unchanged behavior.configuration_error_foris a start rejection keyed by sandbox name. Thefabric-agent-ctlstartarm checks it beforeconfiguration_error.exec_sandboxesholds each exec call's target sandbox, parallel toexec_calls, at both places exec calls are recorded.Test:
multi_agent::one_failed_agent_is_reported_alone_and_its_retry_replaces_only_itapplies three OpenClaw sandboxes cloned fromexamples/fabric-openclaw.yaml: assistant, researcher and reviewer. It then narrows the researcher's and reviewer's tools, which replaces both sandboxes, and Fabric rejects only the reviewer's start. On that update, the test checks:apply -o jsonexits 1 and names onlysandbox/reviewer.diagnostics/fabric-reviewer.jsonkeeps it.startorstop.After the fault clears, the test checks the retry:
Why an update: the failure is injected on an update so that the assistant's agent is already running. The test can then check that a sibling's failure neither stops, restarts nor replaces it.
Retry plan: it holds two changes, not three. The failed apply already updated
terraform_data.agent_reviewerand recorded nofabric_agent.reviewer.In
deployment.rs,Lifecycleand the helpers the new module uses becomepub(crate), likeregistry_fixture's shared items. The module is registered intests/main.rsand thelifecycleprofile.The test passed on its first run against a bundle whose production code matches
origin/v1, so it adds coverage and found no defect.Lifecycle filter and test guides
deploy_image_and_export.live-tests.mdnow attributes that flow to them and adds a separate paragraph on the OIDC test: the stand-in issuer innc-issuer-*, the token supplied throughtokenEnv, refusal of a token for another audience without echoing it, export, and retained storage.testing.mdandintegration-tests.mdlist and describemulti_agent.Editing
.config/nextest.tomlselects the live-docker and live-kind suites in this PR's CI through.config/determinator-live.toml.Validation
All checks ran on linux_arm64.
cargo ci --fullpassed: tools, fmt, clippy, build, test (1600 passed), schema, bundle, and lifecycle (151 passed, 98.8 s wall with 8 workers;multi_agent12.9 s), within budget.multi_agent,cargo nextest list --profile lifecycle --run-ignored onlylisted the same 150 tests withorigin/v1'snextest.tomland with the corrected one. Replacinghelm_recoverywith an unmatched term in a scratch copy of the config dropped 9 tests, so the comparison detects a lost term.cargo nextest list --profile live-kind --run-ignored onlylists 4kubernetes_liveand 3kubernetes_charttests, as the corrected guides say.NEMOCLAW_TEST_BUNDLE=$PWD/dist/linux_arm64 cargo test -p nemoclaw-e2e --test integration -- --ignored multi_agent::passed in 4 of 4 runs.multi_agentfail. All were reverted.sandbox/researcher, so the test depends on the per-sandbox fault.NEXTEST_TEST_THREADS=4, lifecycle partitions 1/2 and 2/2 passed in 133.9 s and 107.1 s wall against 300 s;multi_agenttook 18.3 s against the 90 s per-test limit. These are local times and do not predict CI runner times directly.cargo run -p nemoclaw-build -- docs --checkandgit diff --checkpass.live-kindprofile without the kind-only registry test passed:kubernetes_live::the_gateway_installs_authenticates_and_is_removed_keeping_storage,kubernetes_live::on_openshift_the_sandbox_runs_as_the_namespace_uid,kubernetes_live::oidc::a_managed_gateway_accepts_an_existing_issuers_tokens_and_refuses_another_audience, and the threekubernetes_charttests. The agent was the Pi image from v1 CI'slive-images-linux_arm64artifact ford33d50647, imported into k3s by digest. 6 passed in 78 s.Deferred to CI:
cargo run -p nemoclaw-build -- fern checkstops atnpm cibecause Node.js is not installed on this host. Its Rust docs and schema checks pass.kubernetes_live::registry, which need Docker.🤖 Generated with Claude Code