Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(ci): isolate module cache from runner home

Steven Enamakel2ffb2cce79bb
diff --git a/.github/workflows/test-reusable.yml b/.github/workflows/test-reusable.yml
index 1b37dfad31..abce240dc4 100644
--- a/.github/workflows/test-reusable.yml
+++ b/.github/workflows/test-reusable.yml
@@ -187,10 +187,11 @@ jobs:
set -euo pipefail
# Container HOME may be a runner-owned bind mount with mode 0755.
- # TinyBus correctly refuses user module search paths beneath it, so
- # keep XDG modules in a private, per-job directory instead.
+ # TinyBus refuses module paths beneath it, so point both its search
+ # path and dirs::cache_dir at one private, per-job directory.
export XDG_DATA_HOME="$(mktemp -d /tmp/openhuman-core-xdg.XXXXXX)"
chmod 700 "$XDG_DATA_HOME"
+ export XDG_CACHE_HOME="$XDG_DATA_HOME"
integration_test_targets() {
find tests -maxdepth 1 -type f -name '*.rs' -print |
diff --git a/scripts/__tests__/hosted-json-rpc-enumeration.test.mjs b/scripts/__tests__/hosted-json-rpc-enumeration.test.mjs
index 2d9607c922..28a2d7cdba 100644
--- a/scripts/__tests__/hosted-json-rpc-enumeration.test.mjs
+++ b/scripts/__tests__/hosted-json-rpc-enumeration.test.mjs
@@ -49,6 +49,13 @@ if [[ "$*" == *"--test json_rpc_e2e"* ]]; then
[[ "$*" == *"json_rpc_fixture"* ]] || exit 9
echo EXECUTED-JSON-RPC
fi
+if [[ "$*" == *"test -p openhuman --lib"* ]]; then
+ [[ -n "\${XDG_CACHE_HOME:-}" && "$XDG_CACHE_HOME" == "\${XDG_DATA_HOME:-}" && -d "$XDG_CACHE_HOME" ]] || {
+ echo "core tests need a private XDG cache alongside their private XDG data directory" >&2
+ exit 13
+ }
+ echo PRIVATE-XDG-CACHE
+fi
`,
{ mode: 0o755 },
);
@@ -69,6 +76,7 @@ fi
test("hosted JSON-RPC tests are listed and executed with product features", () => {
const result = runCoreStep("normal");
assert.equal(result.status, 0, result.stdout + result.stderr);
+ assert.match(result.stdout, /PRIVATE-XDG-CACHE/);
assert.match(result.stdout, /EXECUTED-JSON-RPC/);
});