ci(hermes): provision pinned runtime for selected paid campaigns

Select candidate assets consistently for immutable image identity and remote packs; provision local Linux assets before the protected paid step exposes credentials. Preserve default-branch dispatch and qualification gates.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-08 12:28:11 -05:00
1 parent 4a0b327727
commit 5c2a78fa45
4 files changed
+70 -7

No files matched your search

+7
View File
@@ -1477,6 +1477,13 @@ Hermes uses an existing managed OpenRouter connection through the ordinary
connection fixture. It remains pending qualification; the native transport
fixture does not substitute for these browser and remote workflows.
When a Hermes cell is selected, the trusted workflow provisions its pinned
Python closure on Linux before exposing credentials, and selects the same
candidate assets for the image content identity, Docker build and remote
provider pack. The workflow must be available on the default branch before
dispatching a branch campaign; dispatching from a development branch remains
forbidden. The asset selection leaves Hermes pending qualification.
```sh
pnpm test:e2e:runner -- --list --suite extended-harnesses
pnpm test:e2e:runner -- --id extended-harnesses.runner-acpx-pi.local.hello-complete
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Credential-free setup for an explicitly selected native Hermes campaign.
set -euo pipefail
test "$(uname -s)" = Linux
test "$(uname -m)" = x86_64
repository_root="$(cd "$(dirname "$0")/../.." && pwd)"
hermes_build_root="$(mktemp -d "${RUNNER_TEMP:-${TMPDIR:-/tmp}}/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 "$repository_root/packages/paperclip-runner/scripts/provision-hermes.mjs" \
"$repository_root/packages/paperclip-runner/provider-assets/hermes/linux-x64"
@@ -15,6 +15,29 @@ const everydayOracleImage =
"python@sha256:9d2e5553305c7c7b0097999bb17187c69b921ccd6bc9d40e4bb5ebe652c00285";
describe("public repository paid workflow security", () => {
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:"));
expect(catalog).toContain('if any(.include[]; .profileId == "runner-acpx-hermes") then "hermes" else "" end');
expect(catalog.indexOf("Validate selectors and emit matrix")).toBeLessThan(catalog.indexOf("Compute Daytona image content ID"));
expect(catalog).toContain('"--candidate-providers=$CANDIDATE_PROVIDERS"');
const image = workflow.slice(workflow.indexOf(" daytona_image:"), workflow.indexOf(" build_runner_artifacts:"));
expect(image).toContain('--build-arg "PAPERCLIP_RUNNER_CANDIDATE_PROVIDERS=${CANDIDATE_PROVIDERS}"');
const pack = workflow.slice(workflow.indexOf(" build_remote_provider_pack:"), workflow.indexOf(" test:"));
expect(pack).toContain("needs.catalog.outputs.candidate_providers == 'hermes'");
expect(pack.indexOf("Provision pinned Hermes assets")).toBeLessThan(pack.indexOf("Assemble native remote provider pack"));
expect(pack).toContain('"--candidate-providers=$CANDIDATE_PROVIDERS"');
expect(pack).not.toContain("secrets.");
const paid = workflow.slice(workflow.indexOf(" test:"), workflow.indexOf(" aggregate:"));
expect(paid).toContain("matrix.environmentId == 'local' && matrix.profileId == 'runner-acpx-hermes'");
const setup = paid.indexOf("Provision pinned Hermes before the paid local test");
expect(setup).toBeGreaterThan(0);
expect(setup).toBeLessThan(paid.indexOf("secrets.OPENROUTER_API_KEY"));
expect(paid.slice(setup, paid.indexOf("Install checksum-verified Grok"))).not.toContain("secrets.");
const provision = await readFile(path.join(repositoryRoot, "tests/runner-e2e/provision-hermes-linux.sh"), "utf8");
expect(provision).toContain("uv==0.12.17");
expect(provision).toContain("scripts/provision-hermes.mjs");
});
it("keeps the manual EC2 image build credential-free and pins the authorized target", async () => {
const workflow = await readFile(path.join(repositoryRoot, ".github/workflows/docker-runner-check.yml"), "utf8");
const manual = workflow.slice(workflow.indexOf(" authorize_manual:"));