Skip to content
Development documentation: these guides follow main and may describe changes not yet in a published release.

Set up source development

Contributor guide · Testing

Clone the repository and install mise, Git, and Docker with Compose v2. The pinned Go toolchain and dead-code tool are declared in mise.toml (GitHub).

Terminal window
mise install
mise run check

The normal gate formats nothing automatically: it checks formatting, static analysis, dead code, race-enabled unit tests, Compose rendering, and documentation links. Use mise run format to apply Go formatting when needed. Compose rendering uses fixture values and does not require deployment secrets or start containers.

Terminal window
mise run pi-image
mise run image

For the SDK-enabled orchestrator, build on Linux/amd64:

Terminal window
docker build --file Dockerfile.microsandbox --target runtime --tag omnigrex/orchestrator-microsandbox:dev .

The native image packages pinned runtime/firmware/SDK dependencies and the source-pinned guest agent. The ordinary Dockerfile builds the static Docker backend. Selecting Microsandbox in a binary without SDK support fails explicitly. See backend constraints.

The orchestrator installs bash, ca-certificates, curl, git, jq, gcc, musl-dev, openssh-client-default, and ripgrep with apk add --no-cache and normal signature verification. Each build records its actual installed closure, including base and transitive packages, as sorted apk info -v output at /usr/share/omnigrex/apk-packages.txt. Inspect the inventory bound to an exact image digest without relying on mutable tags.

Terminal window
docker run --rm --entrypoint /bin/cat IMAGE@sha256:DIGEST /usr/share/omnigrex/apk-packages.txt

Verify a built orchestrator image against required tools, compiler and header function, Git HTTPS support, CA certificates, non-root execution, and inventory agreement.

Terminal window
sh scripts/check-orchestrator-image.sh omnigrex/orchestrator:dev-amd64
sh scripts/check-orchestrator-image.sh omnigrex/orchestrator:dev-arm64

Refresh installed OS packages intentionally so the package-installation layer is genuinely uncached on each checked architecture.

Terminal window
docker buildx build --no-cache-filter runtime --platform linux/amd64 --load --tag omnigrex/orchestrator:dev-amd64 .
docker buildx build --no-cache-filter runtime --platform linux/arm64 --load --tag omnigrex/orchestrator:dev-arm64 .

Docker build-layer caching and APK --no-cache are distinct mechanisms. The former controls whether Docker reuses the installation layer, while the latter controls only whether APK keeps a local package cache inside that layer. Retain released images for recovery because rebuilding a source commit is not a substitute for preserving its qualified image. See orchestrator package decision (GitHub).

The root compose.yaml (GitHub) and .env.example (GitHub) describe the Docker development stack. It source-builds the orchestrator and uses an exact registry-pinned Pi image. Complete the authoritative App, secret, ingress, and repository setup procedures first.

Copy .env.example to a private .env, configure required values, and set a real OMNIGREX_PI_IMAGE digest with matching OMNIGREX_PI_PLATFORM. The ordinary stack uses the selected production bundle and currently requires linux/amd64, even on Apple Silicon. Provision its exact image before startup; a locally built ARM64 image cannot bypass fresh production admission. For native ARM64 development, use the explicit source-built candidate/protocol qualification paths, not this full-stack procedure. Retained ARM64 Participants keep their original contracts independently of the production selection.

From the checkout, select only the root development Compose file, keeping any explicit overrides in the same selection:

Terminal window
export COMPOSE_FILE=compose.yaml
docker compose up --build --wait
docker compose exec orchestrator /usr/local/bin/omnigrex doctor --repository OWNER/REPOSITORY

Do not reuse a downloaded no-clone bundle’s Compose selection by accident. Default named resources are fixed; parallel setups need complete storage/network/namespace overrides as described in installation. Require all-pass preflight and real webhook verification before a test Work Item.

Agents working on this repository need its system tools and Docker-backed tests inside the execution environment. Use the Omnigrex development image with Microsandbox rather than expecting the Docker backend to supply a host daemon. The agent environment has a private guest daemon and no host Docker socket.

Next: Choose tests.