Documentation Index
Fetch the complete documentation index at: https://bedrockdynamics.studio/docs/llms.txt
Use this file to discover all available pages before exploring further.
Running Tests
Unit Tests
Most crates have unit tests that run without external services:Database Tests
roz-db and roz-server tests require a Postgres instance:
Ignored Tests
Tests marked#[ignore] require external infrastructure — Docker simulation containers, API keys, NATS, or other services that are not available in a standard dev environment.
Run them explicitly:
E2E Tests
End-to-end tests validate the full stack: real LLM calls, real Docker simulation containers, and real sensor data flowing through the system. These require environment variables for API credentials and target URLs.Test Helpers: roz-test
Theroz-test crate provides shared test infrastructure:
nats_container()— spins up a NATS container via testcontainers and returns a guard that cleans it up on dropnats_url()— returns the connection URL for the running NATS container
#[sqlx::test] which handles Postgres lifecycle automatically.
Test Design Rules
Tests must verify production code, not test harness behavior.No Tautological Tests
Separate Logic from IO
Extract pure logic into functions that can be tested without mocking IO. Test the pure functions directly.Test the Right Layer
| Test type | Annotation | What it tests |
|---|---|---|
| Pure logic | #[test] | Data transforms, builders, validation |
| Async logic | #[tokio::test] | Async functions, channels, tasks |
| Database | #[sqlx::test] | Queries, migrations, RLS |
| API | axum::test helpers | HTTP routes, middleware, auth |
| Infrastructure | #[ignore] | NATS, Docker sims, external APIs |
Zero Tech Debt
If you see a problem in a test — or anywhere else — fix it now. Do not log it for later, do not add a TODO comment. Every issue spotted is an issue fixed.What E2E Tests Cover
End-to-end tests exercise the full production path:- Agent reasoning — a real LLM receives a task and generates a plan
- Tool execution — the agent calls MCP tools against a running simulation container
- WASM deployment — the agent writes WAT code, it compiles to WASM, and the controller runs at 100Hz in the sandbox
- Sensor feedback — real sensor data flows from Gazebo through the bridge into the agent’s context
- Safety enforcement — safety limits are verified on actual control commands
#[ignore] and run separately from the fast unit test suite.