Skip to content

docs: describe the test layers and their budgets - #12997

Merged
cv merged 3 commits into
v1from
docs/testing-layers-guide
Oct 11, 2026
Merged

cv merged 3 commits into
v1from
docs/testing-layers-guide

Conversation

@cv

@cv cv commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

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 (ci: build the live images once per platform and share them #12995, test(sdk): check export and state parsing without OpenTofu #12996, test: move OpenShell backend tests from nemoclaw-e2e to the providers #12998, test: run the Kubernetes live and chart tests from nemoclaw-e2e #12999, test(e2e): observe deployment state through export instead of intent.json #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 (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.

The testing guide listed the step budgets but not the unit, contract,
system, and live layers, and parts of the fixture guide named tests that
no longer exist.

testing.md now describes each layer with its crates and binaries, how to
run it, each budget and per-test limit and where CI enforces it, the
timing reports, and how CI runs each layer. integration-tests.md covers
the contract and system tests; the tests that need a real Docker engine
move to live-tests.md.

Validated with fern check, git diff --check, the nemoclaw-build ci::
tests, and the documented commands against a linux_arm64 bundle.
@cv cv added area: docs Documentation, examples, guides, or docs build v1 NemoClaw v1 branch labels Oct 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Describe what moved on v1: the system layer's nemoclaw-sdk tests are
now only the Helm recovery tests, the OpenShell and Fabric backend tests
run against the fake gateway as provider unit tests, the Kind suite runs
from nemoclaw-e2e, and the live suites load images that one job builds.
Name the bundle in the Kubernetes lifecycle contract tests' ignore
reason.
@cv
cv enabled auto-merge (squash) October 11, 2026 20:05
Describe the live-docker profile's docker-engine test group: the Docker tests run one at a time while the offline runtime rebuild compiles alongside them.
@cv
cv merged commit 9970194 into v1 Oct 11, 2026
@cv
cv deleted the docs/testing-layers-guide branch October 11, 2026 20:45
cv added a commit that referenced this pull request Oct 12, 2026
Part of #12881.

## Failure

#13002 moved the SDK's Helm recovery tests to nemoclaw-e2e, and #12997
merged after it with the earlier layout. On v1:

- `docs/contributing/testing.md`'s layer table and System section say
the `lifecycle` profile selects ignored Helm recovery tests in the
`nemoclaw-sdk` library.
- `docs/contributing/integration-tests.md` says the same and gives
`cargo test -p nemoclaw-sdk --lib -- --ignored helm_recovery`, which no
longer runs any test.

## Decision

- **`testing.md`:**
- The System row and section list `helm_recovery` with the other
`nemoclaw-e2e` modules that the `lifecycle` profile selects.
- The Live section names nemoclaw-e2e's `managed_gateway` test and links
its inputs in `live-tests.md`, which #13002 already updated.
- **`integration-tests.md`:**
  - The system-test introduction no longer names the SDK.
  - The module table gains `helm_recovery`.
- A new "Helm Release Recovery" subsection explains why each test starts
from an imported release. It says the SDK's test-only `test-scenarios`
feature builds that state and that nemoclaw-e2e enables it, so no flag
is needed. It gives the run command.

I checked the rest of both files for other changes from #13002 and found
none. Two facts stay true:

- The `live-docker` profile still selects one `nemoclaw-sdk` test,
`kubernetes_auth::the_issuer_image_serves_both_documents_over_https`.
- Crates still include `crates/test-support` as private modules.

## Validation

Checked against v1 (`3b248a7b76`):

- `.config/nextest.toml`: the `lifecycle` filter selects
`helm_recovery::` and the `live-docker` filter selects
`managed_gateway::` in `nemoclaw-e2e`'s `integration` binary.
- `crates/nemoclaw-e2e/tests/main.rs` declares both modules
`#[cfg(unix)]`.
- `crates/nemoclaw-e2e/Cargo.toml` enables `test-scenarios` on its
`nemoclaw-sdk` dev-dependency.
- The documented command, `NEMOCLAW_TEST_BUNDLE=… cargo test -p
nemoclaw-e2e --test integration -- --ignored helm_recovery::`, ran 5
tests, all passing, on linux_arm64.
- `cargo test -p nemoclaw-e2e --test integration -- --list --ignored
--exact
managed_gateway::managed_gateway_plan_apply_noop_destroy_and_recovery_use_real_opentofu`
lists the test that `live-tests.md` runs.
- `cargo run -p nemoclaw-build -- fern check`: 0 errors.
`nemoclaw-build`'s `docs::` tests pass.
@wscurran wscurran added the chore Build, CI, dependency, or tooling maintenance label 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: docs Documentation, examples, guides, or docs build 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