The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
fix(ci): upload the original runtime archive in place (#3252)
kekxy059e9afec5a3
diff --git a/.github/workflows/build-runtime.yml b/.github/workflows/build-runtime.ymlindex c1c3244c5..f7f353172 100644--- a/.github/workflows/build-runtime.yml+++ b/.github/workflows/build-runtime.yml@@ -106,15 +106,18 @@ jobs:bash scripts/build/package-runtime.sh "$BOXLITE_CI_TARGET"command -v sccache &>/dev/null && sccache --show-stats || true- - name: Stage archive for runtime upload+ - name: Verify runtime archive for uploadenv:TARGET: ${{ matrix.target }}run: |set -euo pipefail- archives=(boxlite-runtime-v*-"$TARGET".tar.gz)- [[ ${#archives[@]} == 1 ]]- mkdir runtime-upload- ln "${archives[0]}" runtime-upload/+ shopt -s nullglob+ archives=(boxlite-runtime-v*.tar.gz)+ if [[ ${#archives[@]} != 1 || "${archives[0]}" != *-"$TARGET".tar.gz ||+ ! -f "${archives[0]}" || ! -r "${archives[0]}" || -L "${archives[0]}" ]]; then+ echo "::error::Expected one readable runtime archive for $TARGET"+ exit 1+ fi- name: Upload runtime artifactuses: actions/upload-artifact@v4@@ -122,7 +125,7 @@ jobs:overwrite: trueif-no-files-found: errorname: runtime-${{ matrix.target }}- path: runtime-upload/+ path: boxlite-runtime-v*.tar.gzretention-days: 7- name: Package CLI binarydiff --git a/apps/infra/docs/release.md b/apps/infra/docs/release.mdindex 3de772b46..c52dde167 100644--- a/apps/infra/docs/release.md+++ b/apps/infra/docs/release.md@@ -46,6 +46,8 @@ A new failure artifact needs its own approval. Standalone E2E runs keep their noEach 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.diff --git a/apps/infra/scripts/release-cache-units.test.mjs b/apps/infra/scripts/release-cache-units.test.mjsindex 8b7ef7385..c895c2b3d 100644--- a/apps/infra/scripts/release-cache-units.test.mjs+++ b/apps/infra/scripts/release-cache-units.test.mjs@@ -1,7 +1,7 @@// SPDX-License-Identifier: AGPL-3.0-only// Copyright (c) 2026 BoxLite AIimport assert from 'node:assert/strict'-import { globSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs'+import { chownSync, globSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, statSync, writeFileSync } from 'node:fs'import { spawnSync } from 'node:child_process'import { data, Evaluator, Lexer, Parser } from '@actions/expressions'import { createRequire } from 'node:module'@@ -113,7 +113,6 @@ test('platform artifact uploads select the literal archive with its required oriconst target = 'linux.[ab]+_x64'const cases = [['c', 'Upload artifact', 'boxlite-c-v1.2.3-' + target + '.tar.gz', true],- ['runtime', 'Upload runtime artifact', 'boxlite-runtime-v1.2.3-' + target + '.tar.gz', false],['runtime', 'Upload CLI artifact', 'boxlite-cli-v1.2.3-' + target + '.tar.gz', true],['node', 'Upload artifacts', 'sdks/node/artifacts-' + target + '.tar', false],]@@ -155,3 +154,32 @@ test('platform artifact uploads select the literal archive with its required ori})}})++test('runtime uploads the single readable archive directly from its build location', t => {+ const dir = mkdtempSync(join(tmpdir(), 'runtime-upload-'))+ t.after(() => rmSync(dir, { recursive: true, force: true }))+ const steps = load(readFileSync(new URL('.github/workflows/build-runtime.yml', root))).jobs.build.steps+ const index = steps.findIndex(step => step.name === 'Upload runtime artifact')+ const upload = steps[index].with+ const target = 'linux.[ab]+_arm64'+ const archive = 'boxlite-runtime-v0.16.1-' + target + '.tar.gz'+ // manylinux creates the archive as root. The host runner owns the workspace.+ const runner = process.platform === 'linux' && process.getuid() === 0 ? { uid: 65534, gid: 65534 } : {}+ if (runner.uid !== undefined) chownSync(dir, runner.uid, runner.gid)+ writeFileSync(join(dir, archive), 'runtime', { mode: 0o644 })+ writeFileSync(join(dir, 'producer.json'), '{}')+ const verify = () => spawnSync('bash', ['-e', '-c', steps[index - 1].run], {+ cwd: dir, env: { ...process.env, TARGET: target }, ...runner, encoding: 'utf8',+ })+ const result = verify()+ assert.equal(result.status, 0, result.stderr)+ assert.deepEqual(globSync(upload.path, { cwd: dir }), [archive])+ assert.deepEqual(readdirSync(dir).sort(), [archive, 'producer.json'], 'upload must use the original file')+ const other = 'boxlite-runtime-v0.16.1-linux.a+_arm64.tar.gz'+ writeFileSync(join(dir, other), 'other')+ assert.notEqual(verify().status, 0, 'ambiguous upload')+ rmSync(join(dir, archive))+ assert.notEqual(verify().status, 0, 'wrong target')+ rmSync(join(dir, other))+ assert.notEqual(verify().status, 0, 'missing archive')+})