<!--
SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->

# Testing and Documentation

This page describes the validation and documentation checks expected for repository
changes.

## Testing Rule

Run tests for every language affected by your change. If you touch the core runtime, the expectation is broader because the bindings sit on top of the same behavior.

Run the affected targets directly:

```bash
just test-rust

# Run Rust tests with code coverage reporting, requires installing cargo-llvm-cov with `cargo install cargo-llvm-cov`
just ci=true test-rust

just test-python
just test-go
just test-node
just test-openclaw
just test-wasm
```

Use the matching build recipes when you need explicit build-only passes:

```bash
just build-rust
just build-python
just build-go
just build-node
just build-wasm
```

## Common Commands

These commands cover the most common language-specific validation loops.

### Rust

Run the Rust validation loop when a change touches the core runtime or
Rust-facing API surface.

```bash
cargo test --workspace
```

### Python

Run the Python validation loop when a change touches the wrapper package, tests,
or docs tooling.

```bash
uv sync
uv run pytest
```

### Node.js

Run the Node.js validation loop when a change touches the NAPI binding or
JavaScript package surface. Run the OpenClaw target when Node changes can affect
the OpenClaw plugin or when touching `integrations/openclaw`.

```bash
npm install --ignore-scripts
npm test --workspace=nemo-flow-node
just test-openclaw
```

## Documentation Checklist

If your change affects public behavior, bindings, examples, or workspace structure, update the corresponding docs in the same branch.

Before opening a PR, confirm:

1. `README.md` still matches the repo structure
2. Relevant reference docs are updated for public API changes.
3. Relevant package or crate READMEs are updated when needed.
4. Examples and snippets stay aligned with supported bindings.
5. Docs build cleanly.

## Docs Verification

Use these commands to build and check the documentation site after docs changes.

```bash
just docs
just docs-linkcheck
```

## Licensing and Headers

All source files must include SPDX headers and remain under Apache 2.0 expectations. Reviewers check this during normal review even when hooks do not enforce it automatically.
