Development
Build, test and lint Amaru Light from source, run its credential-free test suites, and follow how CI publishes images and how releases are tagged.
These are the commands and rules for changing Amaru Light's code.
Before you begin
Rust at the release pinned in rust-toolchain.toml, and Podman or Docker for the image checks.
Keep the toolchain on the same release as the Rust stage of the Containerfile.
Check your change
make check # cargo fmt --check, clippy -D warnings, cargo test
make image-check # build the base image and smoke-test it (podman or docker)The crate follows the lint configuration of Wanaku: no
unwrap, expect, panic or unsafe outside tests, and short functions.
Tests
- Unit tests live next to the code, for example
src/lifecycle/tests.rsandsrc/scheduler/tests.rs. tests/amaru_cli.rsruns the command line end to end.- The tests use fake agent and
ghscripts and temporary Git repositories; they need no credentials. cargo test -p amaru-guardruns a stand-in model through ONNX Runtime;cargo test -p amaru-guard -- --ignoreddownloads the real model.
Continuous integration
.github/workflows/ci.yml runs on each pull request, each push to main and each release tag:
format, clippy and test jobs, and an image build smoke-tested on amd64 and arm64. After all
jobs pass, pushes to main and release tags publish the image. The optional repository variables
CONTAINER_REGISTRY (default ghcr.io) and CONTAINER_GROUP change where it goes.
Releases
- Set
versioninCargo.toml, runcargo checksoCargo.lockagrees, and merge. - Push a bare version tag on that commit:
git tag 0.1.0 && git push origin 0.1.0.
CI stops when the tag differs from the version in Cargo.toml.
Based on README.md – Development,
docs/prompt-guard.md and .github/workflows/ci.yml.
Next steps
- Architecture: where each part of the code lives.
- Result file: the contract between daemon and agent.
Contributing
Information for people changing Amaru Light itself, covering the build and test commands, CI and releases, and the architecture of the Rust code.
Architecture
The components of the Amaru Light daemon, including scheduler, ticket sources, forge, agent drivers, workspace, checks, store, web UI and prompt guard.