The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(ci): stage modules under trusted temp root
Steven Enamakel81e217fd1243
diff --git a/.github/workflows/ci-full.yml b/.github/workflows/ci-full.ymlindex 09ec720207..079d82917a 100644--- a/.github/workflows/ci-full.yml+++ b/.github/workflows/ci-full.yml@@ -131,7 +131,7 @@ jobs:run: |# Keep fixtures in a trusted tree and resolve their verified releases# from the same registry the product uses.- module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"+ module_root="/tmp/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"bash scripts/ci/self-hosted/install-test-modules.sh \"$module_root" "$module_root/modules.env"cat "$module_root/modules.env" >> "$GITHUB_ENV"@@ -307,7 +307,7 @@ jobs:run: |# Keep fixtures in a trusted tree and resolve their verified releases# from the same registry the product uses.- module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"+ module_root="/tmp/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"bash scripts/ci/self-hosted/install-test-modules.sh \"$module_root" "$module_root/modules.env"cat "$module_root/modules.env" >> "$GITHUB_ENV"diff --git a/.github/workflows/e2e-playwright.yml b/.github/workflows/e2e-playwright.ymlindex d6db083267..6eed54fd58 100644--- a/.github/workflows/e2e-playwright.yml+++ b/.github/workflows/e2e-playwright.yml@@ -67,7 +67,7 @@ jobs:run: |# Keep fixtures in a trusted tree and resolve their verified releases# from the same registry the product uses.- module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"+ module_root="/tmp/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"bash scripts/ci/self-hosted/install-test-modules.sh \"$module_root" "$module_root/modules.env"cat "$module_root/modules.env" >> "$GITHUB_ENV"diff --git a/.github/workflows/e2e-reusable.yml b/.github/workflows/e2e-reusable.ymlindex 5ec9d52d23..0336f7dc9d 100644--- a/.github/workflows/e2e-reusable.yml+++ b/.github/workflows/e2e-reusable.yml@@ -352,7 +352,7 @@ jobs:run: |# Stage all native capabilities under a trusted tree, including# release manifests for confidential wallet and channel calls.- module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"+ module_root="/tmp/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"bash scripts/ci/self-hosted/install-test-modules.sh \"$module_root" "$module_root/modules.env"cat "$module_root/modules.env" >> "$GITHUB_ENV"@@ -448,7 +448,7 @@ jobs:run: |# Keep fixtures in a trusted tree and resolve their verified releases# from the same registry the product uses.- module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"+ module_root="/tmp/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"bash scripts/ci/self-hosted/install-test-modules.sh \"$module_root" "$module_root/modules.env"cat "$module_root/modules.env" >> "$GITHUB_ENV"diff --git a/.github/workflows/test-reusable.yml b/.github/workflows/test-reusable.ymlindex b3a325824b..f9d9cb094b 100644--- a/.github/workflows/test-reusable.yml+++ b/.github/workflows/test-reusable.yml@@ -174,7 +174,7 @@ jobs:- name: Install checksum-pinned native test modulesrun: |# Module-loaded unit regressions execute in isolated test processes.- module_root="/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"+ module_root="/tmp/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"bash scripts/ci/self-hosted/install-test-modules.sh \"$module_root" "$module_root/modules.env"cat "$module_root/modules.env" >> "$GITHUB_ENV"diff --git a/scripts/__tests__/test-module-installation.test.mjs b/scripts/__tests__/test-module-installation.test.mjsindex 4f09c9c401..860fb91eac 100644--- a/scripts/__tests__/test-module-installation.test.mjs+++ b/scripts/__tests__/test-module-installation.test.mjs@@ -42,6 +42,26 @@ const rustE2eRunner = fileURLToPath(new URL("../test-rust-e2e.sh", import.meta.url),);+test("Linux container workflows stage TinyBus fixtures below sticky /tmp", () => {+ for (const workflow of [+ "../../.github/workflows/test-reusable.yml",+ "../../.github/workflows/ci-full.yml",+ "../../.github/workflows/e2e-reusable.yml",+ "../../.github/workflows/e2e-playwright.yml",+ ]) {+ const source = readFileSync(new URL(workflow, import.meta.url), "utf8");+ assert.match(source, /\/tmp\/openhuman-test-modules/, workflow);+ assert.doesNotMatch(source, /\/opt\/openhuman-test-modules/, workflow);+ }++ const lanes = readFileSync(+ new URL("../ci/self-hosted/lanes-plan.mjs", import.meta.url),+ "utf8",+ );+ assert.match(lanes, /\/tmp\/openhuman-test-modules/);+ assert.doesNotMatch(lanes, /\/opt\/openhuman-test-modules/);+});+test("locally built native Rust test modules come from build.mjs, not ad hoc cargo builds", () => {const source = readFileSync(localRustRunner, "utf8");assert.match(source, /modules\/stage-local-modules\.sh/);@@ -64,17 +84,36 @@ test("local MCP registry E2E tests load the pinned TinyMCP module", () => {test("linked TinyDocs E2E enables its required local feature", () => {const localSource = readFileSync(localRustRunner, "utf8");- const localBranch = localSource.indexOf('if [ "$target" = "tinydocs_linked_e2e" ]');- assert.ok(localBranch >= 0, "the Rust gate gives linked TinyDocs an explicit branch");+ const localBranch = localSource.indexOf(+ 'if [ "$target" = "tinydocs_linked_e2e" ]',+ );+ assert.ok(+ localBranch >= 0,+ "the Rust gate gives linked TinyDocs an explicit branch",+ );const localEnd = localSource.indexOf("\n elif ", localBranch);- assert.ok(localEnd > localBranch, "the linked target branch has a bounded body");- assert.match(localSource.slice(localBranch, localEnd), /--features linked-modules/);+ assert.ok(+ localEnd > localBranch,+ "the linked target branch has a bounded body",+ );+ assert.match(+ localSource.slice(localBranch, localEnd),+ /--features linked-modules/,+ );const e2eSource = readFileSync(rustE2eRunner, "utf8");- const e2eBranch = e2eSource.indexOf('if [ "$suite" = "tinydocs_linked_e2e" ]');- assert.ok(e2eBranch >= 0, "the Rust E2E runner gives linked TinyDocs an explicit branch");+ const e2eBranch = e2eSource.indexOf(+ 'if [ "$suite" = "tinydocs_linked_e2e" ]',+ );+ assert.ok(+ e2eBranch >= 0,+ "the Rust E2E runner gives linked TinyDocs an explicit branch",+ );const e2eEnd = e2eSource.indexOf("\n fi\n", e2eBranch);- assert.ok(e2eEnd > e2eBranch, "the E2E linked target branch has a bounded body");+ assert.ok(+ e2eEnd > e2eBranch,+ "the E2E linked target branch has a bounded body",+ );assert.match(e2eSource.slice(e2eBranch, e2eEnd),/--features "\$PRODUCT_FEATURES,linked-modules"/,@@ -105,9 +144,15 @@ test("multi-server MCP tests run serially through the module-backed host", () =>const fullSuiteStart = source.indexOf('elif [ "$target" = "mcp_registry_multi_server" ]',);- assert.ok(fullSuiteStart >= 0, "full Rust gate gives the suite an isolated process");+ assert.ok(+ fullSuiteStart >= 0,+ "full Rust gate gives the suite an isolated process",+ );const fullSuiteEnd = source.indexOf("\n else\n", fullSuiteStart);- assert.ok(fullSuiteEnd > fullSuiteStart, "full-suite branch has a bounded body");+ assert.ok(+ fullSuiteEnd > fullSuiteStart,+ "full-suite branch has a bounded body",+ );assert.match(source.slice(fullSuiteStart, fullSuiteEnd),/--test-threads=1/,@@ -122,7 +167,10 @@ test("multi-server MCP tests run serially through the module-backed host", () =>const directStart = source.indexOf('elif [ "$#" -ge 2 ] && [ "$1" = "--test" ] && [ "$2" = "mcp_registry_multi_server" ]',);- assert.ok(directStart >= 0, "the focused runner gives the suite the same isolation");+ assert.ok(+ directStart >= 0,+ "the focused runner gives the suite the same isolation",+ );const directEnd = source.indexOf("\nelse\n", directStart);assert.ok(directEnd > directStart, "focused branch has a bounded body");assert.match(@@ -367,7 +415,7 @@ for (const runner of ["test-rust-with-mock.sh", "test-rust-e2e.sh"]) {"unset OPENHUMAN_MODULE_PATH",setup,'connectors_module_path="/connectors:${OPENHUMAN_MODULE_PATH:-}"',- 'hosts_dir=/hosts',+ "hosts_dir=/hosts",cargoStub,invocation,].join("\n"),@@ -416,7 +464,10 @@ test("the CI installer builds nothing: every module, tinyconnectors included, is"ubuntu-22.04-x86_64",);const connectors = assets.find((asset) => asset.id === "tinyconnectors");- assert.ok(connectors, "the installer resolves tinyconnectors from the registry");+ assert.ok(+ connectors,+ "the installer resolves tinyconnectors from the registry",+ );assert.match(connectors.sha256, /^[a-f0-9]{64}$/);assert.match(connectors.url, /\/releases\/download\/v\d+\.\d+\.\d+\//);});diff --git a/scripts/ci/self-hosted/lanes-plan.mjs b/scripts/ci/self-hosted/lanes-plan.mjsindex 8d9d4b5e98..b7df6f2f42 100644--- a/scripts/ci/self-hosted/lanes-plan.mjs+++ b/scripts/ci/self-hosted/lanes-plan.mjs@@ -160,7 +160,7 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {};const modulesDir = ex63? `${scratch}/test-modules`- : "/opt/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}";+ : "/tmp/openhuman-test-modules/${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}";const modulesEnvFile = "ci-out/test-modules.env";const withModules = (cmd) =>`set -a && . ${modulesEnvFile} && set +a && ${cmd}`;