Control plane
The repository pins Rust 1.99.0 in rust-toolchain.toml. rustup selects it automatically from this checkout. scripts/check-local.sh runs formatting, Clippy, Rust tests, protocol replay, and the CPU engine tests.
The Rust control plane provides process health, worker readiness, status, and graceful shutdown. It can start a Strata engine worker and marks readiness only after the engine emits READY <max-context>. It also exposes POST /v1/responses for request validation. This route returns 503 while the worker is unavailable and 501 while the native inference adapter is absent; it never fabricates a model response. Worker restart is not yet implemented.
Run locally with cargo run --manifest-path control-plane/Cargo.toml. It binds to 127.0.0.1:8081 by default; set STRATA_BIND to another socket address if needed. Check /health, /ready, and /status.
Set STRATA_CONFIG to a JSON file using config.example.json as a template. The file supports bind and an engine object with executable, args, and startup_timeout_s (1–3600 seconds, default 600). STRATA_BIND, STRATA_ENGINE_EXE, STRATA_ENGINE_ARGS_JSON, and STRATA_STARTUP_TIMEOUT_S override their file counterparts. The control plane supplies --serve itself.
Without an engine configuration, /ready returns HTTP 503 and /status reports unconfigured. A configured worker reports starting, then ready with max_context, or failed if startup, the readiness handshake, or the process fails. During shutdown it reports stopping and sends QUIT to the engine. Startup has a timeout; the control plane never advertises readiness before the engine handshake.
Run the local contract checks with cargo test --manifest-path control-plane/Cargo.toml --locked. The tests use a small fake engine process and need no GPU or model. The Responses trace builder checks ordered SSE events, terminal completion, unchanged tool arguments, and JSON Schema output validation. The synthetic replay can be run as JSON or SSE:
cargo run --manifest-path control-plane/Cargo.toml --locked --bin replay-responses -- benchmarks/fixtures/responses/structured-tool.json
cargo run --manifest-path control-plane/Cargo.toml --locked --bin replay-responses -- --sse benchmarks/fixtures/responses/structured-tool.json
See API contract for the supported subset and remaining integration work.