Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

16.1 KB
Raw Blame

TL;DR

Start mbuild-release on main to build a draft release, test its files on dev and publish the verified version.

Release runbook

Merge the version bump and tag its commit on main. The tag must match the stable workspace version in Cargo.toml.

TAG=v0.15.0
gh workflow run mbuild-release.yml --ref main -f tag="$TAG"

The run creates the draft or selects the existing draft for that tag. Configure the package trusted publisher for PyPI and each npm package with mbuild-release.yml as the workflow filename. The prod GitHub Environment needs required reviewers.

What runs

Stage Outputs and checks
Build Runtime and CLI, wheels, npm packages and C SDK archives build in parallel and enter Actions Artifacts. Go tests and the Linux Runner build link the C archives from this run.
Fill the draft Each completed Runtime, wheels, Node, C or Runner component uploads its verified assets to the draft. The complete distribution job checks all asset digests and writes release-candidate.json last.
Prepare dev mbuild publish pushes the declared images to GHCR. The Runner job uploads the original tarball as an OCI layer. Once the GHCR producers and Linux x64 Runtime, C, wheel and Node jobs finish, dev preparation verifies the image and Runner digests, saves the deployment candidate and requests approval. A failed prerequisite stops dev before it acquires the stage lock.
Dev approval and E2E Approve the dev Environment in the run. The cloud suite reads only the Linux x64 CLI, Python wheel, C SDK and two npm tarballs from this run. It records their checksums with the accepted deployment digests.
Publish A passing dev E2E or a recorded waiver opens prod approval immediately. In parallel, publication waits for the complete distribution and Go tests, compares the tested client bytes against the draft and records the accepted candidate. The top-level PyPI and npm jobs publish the accepted packages.
Release and prod When those publishers succeed, the workflow marks the draft public. Rust crates can then publish, and the Go job verifies the public C SDK downloads before tagging the tested commit. Approved prod deployment uses the same GHCR digests and can finish while the release is still a draft.

Releases whose artifact declaration includes secret-server publish its image to GHCR. GCP dev, stage and prod deploy it alongside the API.

The C SDK and Runner workflows each load CI configuration and validate the build commit in one preparation job. A regular release skips the lookup for a previous acceptance receipt. Once its own attachments succeed, npm and PyPI can start. Finalization requires both to succeed.

The Runner package at ghcr.io/boxlite-ai/boxlite/runner must allow anonymous pulls from hosts. First boot and in-place upgrade verify the OCI manifest against the release tag, source commit and archive digest before extracting the binary. Dev and prod receive those pins from the candidate. A version-only manual rollout reads the same pins from the published release-candidate.json.

Review a failed dev E2E

During a full release on main, all three dev test lanes must produce JUnit results. If a test fails, the release webhook sends View failed E2E logs and Review E2E waiver to Release Slack. A deployment failure, missing client, missing report, pytest setup error or cancellation stops the release.

  1. Inspect the failed attempt, then open Review deployments → release-e2e-override in the same run.
  2. To proceed, enter waive <evidence-ID> <reason> in the review comment and approve. Copy the evidence ID from Slack or the run summary, for example waive 809 known failure tracked in #123. Rejecting the request blocks automatic publication and prod.
  3. The workflow records the GitHub reviewer and reason against the tested artifacts, then starts publication and requests the separate prod approval. The prod webhook reports dev E2E failed · waived.

The waiver Environment requires reviewers, allows the main branch only, and has no cloud credentials. The dev deployment lock is free while reviewers decide. To retest, cancel the waiting run and choose Re-run all jobs so the same attempt deploys and tests the candidate.

A new failure artifact needs its own approval. Standalone E2E runs keep their normal failure behavior.

Retries

Re-run all jobs checks the original producer's successful job record for this run, tag and source commit. Each platform restores its files from Actions Cache, verifies the recorded file set and SHA-256 digests, and uploads fresh Actions Artifacts for this attempt. A missing cache, changed file or failed producer rebuilds that platform.

Each successful producer records its release scope, platform, attempt, check ID and digests as JSON. Retry selection matches the unit name case-sensitively and uses the SHA-256 of that record as its cache key. The ARM64 wheel uses the cache unit wheels-linux-arm64-gnu and uploads the Actions Artifact wheels-ubuntu-24.04-arm.

Each Runtime matrix job uploads the original tarball from the build directory after verifying that exactly one Runtime archive exists and matches its platform. The host runner needs only read access to the container-built archive.

The C SDK upload stages the exact archive and its producer.json together. A missing file fails the job before upload, including on a cache hit.

A partial rerun can copy an earlier job’s execution timeline under a new check ID. The planner keeps the original receipt, while a later build or failure supersedes it.

The Runner build also checks the input C library digest. Each GHCR publisher checks the live tag against the cached manifest while holding its publication lock. Before uploading Runner pins, it resolves the tag anonymously, reads the manifest, and downloads and hashes the blob against this run’s archive. Packaging, draft attachment and dev acceptance use the current attempt's uploads even when every platform reused its build.

Re-run a specific build job uses the previous attempt's selection and rebuilds the selected producer. Selecting an individual API image rebuilds and replaces that version's API tag. Starting a new release run or a standalone component publication builds fresh outputs.

For a failed production job, use Re-run failed jobs in the original release run. Before requesting approval and after approval, production checks the saved dev acceptance against the run ID, accepted attempt, candidate artifact ID, manifest digest, tag and source commit. A different candidate needs its own dev E2E.

If finalization loses the GitHub response after publishing, retry the failed job. It verifies the published files and their digests without modifying them.

A same-version Runner rebuild changes the pinned manifest. Hosts record the installed manifest and archive digests and reapply when either changes.

Each Runtime or CLI tarball sidecar and the installer sidecar install.sh.sha256 occupies one entry in the release inventory. During a full release, the attachment job checks all existing selected files before uploading missing files. If a digest conflicts, the job stops before its first upload so the operator can inspect the originating run.

External publishers first look up the exact npm or crate version, PyPI wheel filename, or Go module tag. Only missing items are published. npm publishes missing platform packages before the main package and finishes each upload when npm accepts the tarball. Until npm indexes the matching platform package, a fresh install of the main package can temporarily lack its native binding.

For an existing item the run compares npm tarball SHA-512 integrity, wheel or crate SHA-256, or the Go tag's target commit. An exact match is silent.

A difference adds the item and both digests or commits to the job summary. If a comparison cannot finish, the summary marks the item as skipped and unverified. Both outcomes allow publication of missing items to continue.

A failed existence lookup or an unsuccessful upload still fails its job.

Roll back to a release that predates the manifest

A version-only installation requires a published release-candidate.json. For a historical release missing the file, complete this one-time backfill before selecting the version for installation or rollback.

  1. Resolve the product tag to its original commit and download the original Linux AMD64 Runner tarball and its checksum from that GitHub Release. Verify the exact filename and SHA-256 against the recorded checksum and the GitHub asset digest. Stop if the original bytes or independent evidence cannot be verified.
  2. With approval to update that version, publish those verified bytes as the single application/gzip layer to ghcr.io/boxlite-ai/boxlite/runner. Use the same OCI artifact type and source, revision and version annotations as the Push the exact Runner archive step. Check the manifest and blob by digest with anonymous credentials.
  3. Record the original tag, resolved commit in sha, OCI digest in runner.manifest and archive digest in runner.archive. For an mdeploy-all rollout, also populate images with the original verified manifest digest of each application image. Abort if a digest cannot be tied to the historical release.
  4. Attach the verified metadata as release-candidate.json to that version and check its downloaded SHA-256. Preserve any existing manifest and investigate conflicting bytes. A rollback can then select the version and use the usual downgrade approval.

The host fetches its Runner bytes from GHCR by digest. This backfill records installation pins only.

Component repair can use files already on the Release. Restoring a missing file requires its digest and producer Artifact ID. A later component publication records these for the files it replaces.

Build and publish one component

Run mbuild-release.yml from main and select an existing product Release tag. Each command builds its own files, runs the component checks and publishes within this run. Standalone runs skip cloud deployment, dev E2E, prod approval and draft promotion.

Command Builds and publishes
publish-runtime Runtime, CLI, installer and checksums → GitHub Release. An already public Release also permits crates.io publication.
publish-wheels Platform wheels → GitHub Release and PyPI.
publish-node Platform packages and main npm package → GitHub Release and npm.
publish-c Platform C SDK archives → GitHub Release.
publish-go Builds the C SDK matrix, tests Go, then tags sdks/go/vX.Y.Z only after downloading every versioned C SDK archive anonymously from the public Release and verifying its GitHub asset digest.
publish-runner Builds the Linux x64 C SDK and Runner, pushes the Runner to GHCR and attaches its archive and checksum to GitHub Release.

Single-component publication replaces the selected component's same-name Release attachments, including on a public Release. PyPI skips existing wheel files and npm skips existing package versions.

The reusable Runtime, wheel, Node, C and Go workflows accept spec_platform values linux-x64, except-linux-x64 and all (default). In a full release, both groups run concurrently. Dev needs the Linux x64 clients and GHCR pins. The Runtime installer and the npm distribution wait for both groups. Package publication and the Go module tag wait for all required platform tests.

For example, gh workflow run mbuild-release.yml --ref main -f command=publish-wheels -f tag=v1.2.3 selects fresh wheel publication. Set build-only=true to keep a standalone build in Actions. Use source-ref to build a branch or commit. A complete publish with build-only=true stages the GHCR images and Runner.

A standalone build can restore existing GitHub Actions caches and upload its artifacts. GitHub grants it read-only cache access because its source can be a PR branch even when the dispatch runs on main. A tagged full release can save verified outputs for another attempt of that run.

Component builds can overlap while a full release waits for prod approval. Jobs writing the same Release assets take a per-tag lock. Package publishers take a lock per registry and version. GitHub allows up to 100 pending jobs per group with queue: max.

On a full release retry, a rebuilt macOS wheel changes the distribution manifest. The run verifies all files again. It can reuse successful dev E2E if every tested Linux client hash and every deployment digest still matches the receipt.

Resume from a complete draft

A partial draft contains the components that finished. Sealing and final publication both compare the live managed attachments with the candidate. If a rebuild drops or renames a distribution file, the workflow stops and lists the extra filenames for a maintainer to review and remove before retrying.

Maintainer attachments such as release notes can stay alongside the distribution. When a rebuild changes draft bytes, the workflow removes the old manifest before replacing its first changed attachment.

  1. Stop new publications for the tag. In Actions, cancel every queued or running full release, component publication and repair for that tag, including runs waiting for approval.
  2. Wait until all of those runs show Completed. A cancellation request can leave an attachment upload in progress. The GitHub Release page operates outside the workflow's concurrency group.
  3. Check the draft assets against the complete release-candidate.json and confirm the intended dev acceptance before clicking Publish release. A partial draft can lack the manifest or a component even if other assets are visible.
  4. After publication, use the component repair commands below for missing attachments. A manual production deployment still requires its own approval.

Dispatch mdeploy-all on main with the public tag and stage=prod to deploy its pinned artifacts through prod approval. Check PyPI, npm, crates.io and the Go module separately because publishing through the GitHub UI leaves their status unchanged.

Manually republish a component

On Actions → mbuild-release → Run workflow, select main, enter the public Release tag and leave build-only off. Run one command for each destination.

Command Result
repair-wheels Publish the Release wheels to PyPI.
repair-node Publish the Release's native npm packages, followed by its main npm package.
repair-runtime Restore missing Runtime attachments and publish crates.io packages from the tagged source.
repair-c Restore missing public C SDK archives.
repair-go Skip an existing module tag and report a differing target commit. For a missing tag, verify the public C SDK downloads and recheck the remote product commit immediately before pushing the module tag.

For example, gh workflow run mbuild-release.yml --ref main -f command=repair-node -f tag=v0.16.1 takes the npm packages already present on the Release. A complete set works without a candidate manifest or a dev receipt.

For a missing file, repair reads the producer Artifact ID from the tag's release-candidate.json, verifies the recovered file against its recorded digest and uploads it back to the Release before registry publication. When the manifest or source artifact is unavailable, the job identifies the missing file. Existing Release attachments take precedence over the historical manifest. If an interrupted upload leaves an empty attachment, repair verifies all replacement files, rechecks the empty attachment by ID and then replaces it.

Approvals and notifications

Approve each cloud Environment in the parent run. The dev deployment and E2E share the dev stage concurrency lock. Prod uses the separate prod lock.

Event Slack destination
Release dev deployment, acceptance failure, prod approval and rollout results Release Slack
Standalone dev and stage rollout results Dev Slack
Standalone prod approval and rollout result Release Slack

Deployment results include a button to the originating run. The prod approval message shows whether dev E2E passed or a reviewer waived the failure. For standalone deployments, use the deployment runbook.