ci(hermes): qualify Mac arm64 and export tested cloud runner

Build both native targets on standard cloud runners. Keep fixtures credential-free, validate host and binary architecture, and publish exact source, runtime, tool and binary provenance for acceptance without local Rust builds.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-08 12:28:13 -05:00
1 parent 1b31d77c17
commit 40f6ddac33
4 files changed
+121 -15

No files matched your search

+67 -10
View File
@@ -26,8 +26,20 @@ concurrency:
jobs:
native_transport:
name: Hermes native fixture (Linux amd64, no credentials)
runs-on: ubuntu-22.04
name: Hermes native fixture (${{ matrix.name }}, no credentials)
strategy:
fail-fast: false
matrix:
include:
- name: Linux amd64
runner: ubuntu-22.04
platform: linux
architecture: x64
- name: Mac arm64
runner: macos-15
platform: darwin
architecture: arm64
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
steps:
- name: Checkout source
@@ -51,9 +63,15 @@ jobs:
version: 9.15.4
- name: Qualify the job's provider Node interpreter
env:
EXPECTED_PLATFORM: ${{ matrix.platform }}
EXPECTED_ARCHITECTURE: ${{ matrix.architecture }}
run: |
node <<'NODE'
const fs = require('node:fs');
if (process.platform !== process.env.EXPECTED_PLATFORM || process.arch !== process.env.EXPECTED_ARCHITECTURE) {
throw new Error('execution host does not match the qualified platform');
}
const mode = fs.statSync(process.execPath).mode & 0o777;
fs.chmodSync(process.execPath, mode & ~0o022);
if ((fs.statSync(process.execPath).mode & 0o022) !== 0) {
@@ -78,6 +96,8 @@ jobs:
save-if: false
- name: Build verified runner and provider entrypoints
env:
CARGO_BUILD_JOBS: "2"
run: |
set -euo pipefail
pnpm --filter @paperclipai/paperclip-runner build:typescript
@@ -86,9 +106,20 @@ jobs:
- name: Provision the pinned Python closure without credentials
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y --no-install-recommends python3-venv bubblewrap
bash tests/runner-e2e/provision-hermes-linux.sh
if [ "$(uname -s)" = Linux ]; then
sudo apt-get update
sudo apt-get install -y --no-install-recommends python3-venv bubblewrap
bash tests/runner-e2e/provision-hermes-linux.sh
else
test "$(uname -s)" = Darwin
test "$(uname -m)" = arm64
hermes_build_root="$(mktemp -d "$RUNNER_TEMP/hermes-build.XXXXXX")"
trap 'rm -rf "$hermes_build_root"' EXIT
python3 -m venv "$hermes_build_root"
"$hermes_build_root/bin/pip" install --disable-pip-version-check --no-input uv==0.12.17
PATH="$hermes_build_root/bin:$PATH" node packages/paperclip-runner/scripts/provision-hermes.mjs \
"$GITHUB_WORKSPACE/packages/paperclip-runner/provider-assets/hermes/darwin-arm64"
fi
- name: Run native fixtures against a deterministic loopback model
id: fixtures
@@ -97,8 +128,10 @@ jobs:
set -euo pipefail
mkdir -m 700 "$RUNNER_TEMP/hermes-fixture-home"
# No paid environment, secrets, or credentials reach either fixture.
# The execution host must pass the real bubblewrap namespace probe.
# The host must pass its real bubblewrap or sandbox-exec probe.
env -i PATH="$PATH" HOME="$RUNNER_TEMP/hermes-fixture-home" \
TMPDIR="$RUNNER_TEMP" \
PAPERCLIP_RUNNER_BINARY="$PWD/dist/bin/paperclip-runnerd" \
PAPERCLIP_HERMES_QUALIFY=1 \
node --test --test-concurrency=1 scripts/qualify-hermes-runtime.test.mjs \
scripts/qualify-hermes-runnerd.test.mjs \
@@ -108,6 +141,7 @@ jobs:
if: always()
env:
HERMES_FIXTURE_OUTCOME: ${{ steps.fixtures.outcome }}
HERMES_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
set -euo pipefail
mkdir -p "$RUNNER_TEMP/hermes-native-evidence"
@@ -121,27 +155,50 @@ jobs:
import { join } from 'node:path';
const root = 'packages/paperclip-runner';
const version = JSON.parse(await readFile(join(root, 'src/providers/hermes/version.json'), 'utf8'));
const manifest = JSON.parse(await readFile(join(root, 'provider-assets/hermes/linux-x64/manifest.json'), 'utf8').catch(() => 'null'));
const platform = `${process.platform}-${process.arch}`;
const manifest = JSON.parse(await readFile(join(root, 'provider-assets/hermes', platform, 'manifest.json'), 'utf8').catch(() => 'null'));
const binaryPath = join(root, 'dist/bin/paperclip-runnerd');
const binary = await readFile(binaryPath).catch(() => null);
const binarySha256 = binary ? createHash('sha256').update(binary).digest('hex') : null;
if (binary) {
const { runnerBinaryTarget } = await import('./packages/paperclip-runner/dist/live/runner-binary.js');
if (runnerBinaryTarget(binary) !== platform) throw new Error('tested daemon target does not match the native job');
}
const evidence = {
qualification: 'native transport fixture only; no paid model, browser or Daytona proof',
prHeadSha: process.env.HERMES_PR_HEAD_SHA,
sourceSha: execFileSync('git', ['rev-parse', 'HEAD'], { encoding: 'utf8' }).trim(),
platform: `${process.platform}-${process.arch}`, node: process.version,
sourceTreeSha: execFileSync('git', ['rev-parse', 'HEAD^{tree}'], { encoding: 'utf8' }).trim(),
platform, node: process.version,
rust: execFileSync('rustc', ['--version'], { encoding: 'utf8' }).trim(),
cargo: execFileSync('cargo', ['--version'], { encoding: 'utf8' }).trim(),
runnerCargoLockSha256: createHash('sha256').update(await readFile(join(root, 'runner/Cargo.lock'))).digest('hex'),
fixtureOutcome: process.env.HERMES_FIXTURE_OUTCOME,
binarySha256, binaryBytes: binary?.byteLength ?? null,
kernel: execFileSync('uname', ['-r'], { encoding: 'utf8' }).trim(),
osRelease: await readFile('/etc/os-release', 'utf8'),
osRelease: process.platform === 'darwin'
? execFileSync('sw_vers', [], { encoding: 'utf8' }).trim()
: await readFile('/etc/os-release', 'utf8'),
runtime: version,
python: manifest
? execFileSync(join(root, 'provider-assets/hermes', platform, 'python/bin/python3.12'), ['-I', '-B', '--version'], { encoding: 'utf8' }).trim()
: null,
closureSha256: manifest ? createHash('sha256').update(JSON.stringify(manifest.entries)).digest('hex') : null,
files: manifest?.entries?.length ?? null,
model: 'deterministic loopback fixture', credentials: 'none',
};
await writeFile(join(process.env.RUNNER_TEMP, 'hermes-native-evidence/provenance.json'), JSON.stringify(evidence, null, 2) + '\n');
if (binary) {
await writeFile(join(process.env.RUNNER_TEMP, 'hermes-native-evidence/SHA256SUMS'), `${binarySha256} paperclip-runnerd\n`);
execFileSync('tar', ['-czf', join(process.env.RUNNER_TEMP, 'hermes-native-evidence/paperclip-runnerd.tar.gz'), '-C', join(root, 'dist/bin'), 'paperclip-runnerd']);
}
NODE
- name: Upload fixture evidence
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: hermes-native-linux-amd64-${{ github.run_id }}-${{ github.run_attempt }}
name: hermes-native-${{ matrix.platform }}-${{ matrix.architecture }}-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/hermes-native-evidence/
if-no-files-found: warn
retention-days: 14
@@ -1134,3 +1134,20 @@ roots; separate verified runtime admission still checks their manifests and
bytes before credentials. A 43-test source/workflow selection passes, including
tracked asset edits, staged/deleted files, root symlinks, neighboring unmanaged
assets, and archive placement. These are fixture checks, not paid workflow proof.
### 2026-10-08 Mac cloud qualification
The native transport workflow now includes standard GitHub-hosted Mac arm64 and
Linux amd64 jobs. Each job checks its platform, builds and stages the release
daemon in the cloud, provisions the reviewed Python closure, and runs the same
credential-free production transport fixtures against the exact staged binary.
Evidence records the PR head, actual checkout and source tree, runtime closure,
OS, Node version, fixture outcome, and tested binary checksum. The downloadable
binary archive preserves executable permissions. Fixture logs and failed-job
provenance remain available; an uploaded binary alone is not a qualification pass.
No local Docker or Rust compilation is needed. A passing cloud Mac fixture is a
prerequisite for current-source local browser qualification, not a substitute
for the live provider, published installation, or actual Daytona release gates.
Local workflow lint and all 44 focused source/security tests pass. Cloud execution
of the new Mac job remains required; this configuration is not a passing result.
+9 -5
View File
@@ -204,8 +204,12 @@ native control, attachment, persistence, remote restoration and permission mode
must pass its release criterion with inspectable live evidence before promotion.
The implementation record is included in that qualification PR.
The `Hermes Native Transport` PR workflow runs the same native fixtures on Linux
amd64 with a stripped provider environment and deterministic loopback endpoints.
Its CI artifacts include exact source/runtime provenance and fixture logs. This
is credential-free transport and host-sandbox evidence; it does not replace
paid-provider, browser, subscription or Daytona qualification.
The `Hermes Native Transport` PR workflow builds and runs the same native fixtures
on GitHub-hosted Linux amd64 and Mac arm64, with a stripped provider environment
and deterministic loopback endpoints. Its CI artifacts include source checkout
and tree identity, runtime closure, tool versions, fixture logs, and a checksum
for the exact staged daemon used by the fixtures. A binary archive preserves
executable permissions for subsequent acceptance work without local Rust builds.
Check the recorded job and fixture outcome before using an artifact; failed jobs
also retain evidence. This is credential-free transport and host-sandbox evidence;
it does not replace paid-provider, browser, subscription or Daytona qualification.
@@ -56,6 +56,34 @@ describe("public repository paid workflow security", () => {
expect(upload).toContain("hermes-native-evidence/");
expect(upload).not.toMatch(/hermes-fixture-home|provider-assets|runtimeDirectory/);
});
it("qualifies both native targets in cloud and binds the exported binary to the tested artifact", async () => {
const workflow = await readFile(path.join(repositoryRoot, ".github/workflows/runner-hermes-native.yml"), "utf8");
const targets = workflow.slice(workflow.indexOf(" strategy:"), workflow.indexOf(" timeout-minutes:"));
expect(targets).toContain("fail-fast: false");
expect(targets.match(/- name:/gu)).toHaveLength(2);
expect(targets).toMatch(/name: Linux amd64\s+runner: ubuntu-22\.04\s+platform: linux\s+architecture: x64/u);
expect(targets).toMatch(/name: Mac arm64\s+runner: macos-15\s+platform: darwin\s+architecture: arm64/u);
expect(targets).toContain("runs-on: ${{ matrix.runner }}");
expect(workflow).toContain("process.platform !== process.env.EXPECTED_PLATFORM || process.arch !== process.env.EXPECTED_ARCHITECTURE");
const provision = workflow.slice(workflow.indexOf(" - name: Provision the pinned Python closure"), workflow.indexOf(" - name: Run native fixtures"));
expect(provision).toContain('test "$(uname -s)" = Darwin');
expect(provision).toContain('test "$(uname -m)" = arm64');
expect(provision).toContain("uv==0.12.17");
expect(provision).toContain("provider-assets/hermes/darwin-arm64");
const fixtures = workflow.slice(workflow.indexOf(" - name: Run native fixtures"), workflow.indexOf(" - name: Record source"));
expect(fixtures).toContain('PAPERCLIP_RUNNER_BINARY="$PWD/dist/bin/paperclip-runnerd"');
expect(fixtures).toContain('TMPDIR="$RUNNER_TEMP"');
const evidence = workflow.slice(workflow.indexOf(" - name: Record source"));
expect(evidence).toContain("prHeadSha: process.env.HERMES_PR_HEAD_SHA");
expect(evidence).toContain("['rev-parse', 'HEAD^{tree}']");
expect(evidence).toContain("const binaryPath = join(root, 'dist/bin/paperclip-runnerd')");
expect(evidence).toContain("createHash('sha256').update(binary).digest('hex')");
expect(evidence).toContain("runnerBinaryTarget(binary) !== platform");
expect(evidence).toContain("binarySha256, binaryBytes: binary?.byteLength ?? null");
expect(evidence).toContain("paperclip-runnerd.tar.gz");
expect(evidence).toContain("SHA256SUMS");
expect(evidence).toContain("hermes-native-${{ matrix.platform }}-${{ matrix.architecture }}");
});
it("provisions selected Hermes assets before credentials and uses the same selection for image identity and packs", async () => {
const workflow = await readFile(path.join(repositoryRoot, ".github/workflows/runner-full-stack-e2e.yml"), "utf8");
const catalog = workflow.slice(workflow.indexOf(" catalog:"), workflow.indexOf(" daytona_image:"));