Build and promote the Omnigrex development image
Contributor guide · Repository environments
The image at agent/environments/omnigrex/Dockerfile supports agents developing Omnigrex itself.
It extends Pi with checksum-locked Docker Engine 29.8.1, Compose 5.6.0, Buildx 0.38.0, and Debian Bookworm/amd64 iptables/jq dependency closures.
The golden image already provides GCC and Make.
The derived environment preserves Pi resources, entrypoint, workspace, UID/GID 10001, and its OCI source label.
Prerequisites
Section titled “Prerequisites”Use Microsandbox on Linux/amd64 KVM with hardware-isolation, nested-containers, and tool-installation capabilities.
Use the matching release’s native orchestrator with its patched guest agent; changing only the repository image cannot repair memory-controller delegation in an older orchestrator.
New Participants have a 512-PID aggregate workload ceiling, while retained canonical 128-PID contracts keep their budgets and identities.
Older orchestrators cannot read new 512-PID contracts; preserve compatible recovery orchestrators.
See decisions 0028 (GitHub) and 0029 (GitHub).
Build and exercise locally
Section titled “Build and exercise locally”mise run development-imagemise run test-development-image-cachemise run test-development-image-unitThe build first creates the current checkout’s Linux/amd64 omnigrex/development-golden:dev, so bootstrap/storage paths match even before publication.
Release CI and production-derived image qualification use the exact digest in agent/pi/selected-bundle.json, which can originate from an older source commit.
The local source-built path above is explicitly candidate testing, not production adoption.
Publishing candidates never edits that selection or a repository pin.
The image embeds omnigrex-environment: bootstrap changes require rebuilding and qualifying the agent image, not only restarting or rebuilding the orchestrator.
An already retained Participant continues using its immutable image; it does not acquire new bootstrap behavior through rollout.
For bootstrap fixes, explicitly build and qualify a new Pi candidate through the bundle selection procedure, then select its qualified digest before building the production-derived development image.
The older selected base does not acquire bootstrap changes from the current checkout; ordinary Mise qualification will expose that mismatch rather than bypass it.
For an externally qualified base, build with --platform linux/amd64 --target development --file agent/environments/omnigrex/Dockerfile --build-arg OMNIGREX_GOLDEN_IMAGE=<exact-golden-reference>.
The base must provide supported pi-rpc/v2 storage under /home/omnigrex/.local/share/mise and /home/omnigrex/.local/share/omnigrex-tool-data.
Pre-baseline golden images are unsupported.
Only the development target is published.
Cache/repository qualification targets add disposable fixtures excluded from the production image.
Before publication, the independent CI development-qualification job must pass the module-source check and unit suite with the selected-bundle-derived image’s actual system tools, including jq-based deployment fixtures.
The required check job waits for this qualification, Docker checks, and Microsandbox qualification before publication.
Module source and scratch behavior
Section titled “Module source and scratch behavior”Module archives/metadata live at /opt/omnigrex/go-proxy, outside attached workspace/state/tool data.
The image includes project dependencies and those downloaded while installing Go tools pinned in mise.
Working-revision scripts/development-environment.sh prepends the file proxy only when present, retaining an existing upstream proxy or standard public/direct fallback.
It is idempotent and leaves ordinary machines unchanged when the directory is absent.
Go fills writable Participant module caches on demand, without a bootstrap-copy mechanism.
Keep GOPATH and GOCACHE approved in operator policy and retain .omnigrex/turn-configuration.yaml.
New versions fall back upstream and cache for later Turns; working-revision module files remain authoritative. The offline cache-coverage test qualifies newly built cache-image publication, not whether an existing image may run a later working revision. Adding a dependency does not mandate environment adoption; normal fallback and checksum verification must remain enabled. Checksum verification remains enabled and can require network access for missing records. The image-local source does not persist the Go distribution, startup installation data, compiled artifacts, or modules downloaded in separate Docker builds. See decision 0026 (GitHub).
scripts/go-test.sh selects native guest /var/tmp for Go test/compiler scratch in this image.
Shared tool-data mounts virtualize permission changes and cannot faithfully test restrictive modes, while Runtime Profile /tmp is only 64 MiB.
The override is command-local and preserves persistent caches and parent allocated paths.
Go cleans its private temporary directories, and environment removal discards abnormal leftovers.
This qualifies native scratch, not permission fidelity of retained mounts; see decision 0027 (GitHub).
Qualify an exact published digest
Section titled “Qualify an exact published digest”CI publishes ghcr.io/jozala/omnigrex/development:sha-<commit> and records the exact digest/golden base.
The development-smoke-microsandbox job runs actual checkout and Docker integration checks across two fresh environments sharing Participant caches and Pi Session.
It tests nested Compose networking/volumes/cleanup, concurrent orphan/sentinel containers, historical/current PID persistence, nested background termination, and real Pi diagnostic MCP initialization.
Only a successful job emits the digest-pinned development-environment artifact for repository promotion.
After product release readiness also succeeds, the release-candidate job reuses this artifact in its qualified deployment guidance summary and deployment-guidance-RUN-ATTEMPT Markdown artifact.
The development YAML is specific to the Omnigrex repository and independently adopted, not an automatic update for every managed repository or part of the product release payload.
To repeat qualification on a Linux/amd64 Docker host with KVM:
OMNIGREX_DEVELOPMENT_IMAGE=ghcr.io/jozala/omnigrex/development@sha256:<qualified-digest> \OMNIGREX_MICROSANDBOX_KVM_GID=<host-kvm-group> \mise run test-development-image-microsandboxThe fixture allocates a 4 GiB VM, 40 GiB root disk, and 6 GiB wrapper with fixture-only diagnostic credentials. It does not provide nested KVM; native Microsandbox qualification remains a separate CI-host gate.
Promote to the repository
Section titled “Promote to the repository”Publish and qualify before promoting the artifact to .omnigrex/environment.yaml on the default branch.
The checked-in .omnigrex/environment.yaml.example has no usable digest and is never loaded as configuration.
Ask the operator to provision the exact image, retain readable registry artifacts for flat materialization, and run repository doctor before work.
Later promotions update the digest explicitly; retained Participants keep their original images/caches.
The environment document does not size VM memory or disk: set those deployment limits for the actual build/test workload.
See the delivery plan (GitHub) for recorded implementation evidence.
