Skip to content

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

chore(ci): remove module-gated test infrastructure

Steven Enamakelea776be5d309
diff --git a/.github/ci-paths-filter.yml b/.github/ci-paths-filter.yml
index e5cfbd2d27..dbcdba2d09 100644
--- a/.github/ci-paths-filter.yml
+++ b/.github/ci-paths-filter.yml
@@ -77,8 +77,6 @@ rust-core:
- 'scripts/ci/check-ignored-tests.mjs'
- 'scripts/ci/ignored-test-baseline.json'
- 'scripts/ci/list-feature-gated-rust-tests.mjs'
- - 'scripts/ci/list-module-gated-tests.mjs'
- - 'scripts/ci/run-module-gated-tests.sh'
- 'Cargo.toml'
- 'crates/openhuman-core/**'
- 'crates/openhuman-embed/**'
@@ -159,8 +157,6 @@ scripts:
# pin its clauses, or the counter's anchoring and its
# cfg_attr guard can be loosened with nothing watching.
- 'scripts/ci/check-ignored-tests.mjs'
- - 'scripts/ci/list-module-gated-tests.mjs'
- - 'scripts/ci/run-module-gated-tests.sh'
# The web E2E build/session contract has script-level regression
# tests; run them when either participant or Vite changes.
- 'app/scripts/e2e-web-build.sh'
diff --git a/scripts/__tests__/module-test-runner.test.mjs b/scripts/__tests__/module-test-runner.test.mjs
deleted file mode 100644
index c66df6ef4a..0000000000
--- a/scripts/__tests__/module-test-runner.test.mjs
+++ /dev/null
@@ -1,94 +0,0 @@
-import assert from "node:assert/strict";
-import { spawnSync } from "node:child_process";
-import fs from "node:fs";
-import os from "node:os";
-import path from "node:path";
-import test from "node:test";
-import { fileURLToPath } from "node:url";
-
-const repoRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "..");
-const runner = path.join(repoRoot, "scripts", "ci", "run-module-gated-tests.sh");
-
-test("runs only the source-marked module tests in isolated processes", () => {
- const root = fs.mkdtempSync(path.join(os.tmpdir(), "openhuman-module-tests-"));
- const bin = path.join(root, "bin");
- const log = path.join(root, "cargo.log");
- fs.mkdirSync(bin);
- fs.writeFileSync(
- path.join(bin, "node"),
- `#!/usr/bin/env bash
-if [[ "$*" == *"--skipped"* ]]; then exit 0; fi
-printf '%s\n' one two
-`,
- { mode: 0o755 },
- );
- fs.writeFileSync(
- path.join(bin, "cargo"),
- `#!/usr/bin/env bash
-printf '%s\n' "$*" >> "${log}"
-if [[ "$*" == *"--list"* ]]; then
- printf '%s\n' 'openhuman::memory::tests::one: test' 'openhuman::memory::tests::one_extra: test' 'openhuman::memory::tests::two: test'
-fi
-`,
- { mode: 0o755 },
- );
-
- const result = spawnSync(runner, { cwd: repoRoot, env: { ...process.env, PATH: `${bin}:${process.env.PATH}` }, encoding: "utf8" });
- const calls = fs.readFileSync(log, "utf8");
- fs.rmSync(root, { recursive: true, force: true });
-
- assert.equal(result.status, 0, `${result.stdout}\n${result.stderr}`);
- assert.match(result.stdout, /scheduled: 2/);
- assert.match(result.stdout, /skipped: 0/);
- assert.match(calls, /--ignored --list/);
- assert.match(calls, /openhuman::memory::tests::one -- --ignored --exact --test-threads=1/);
- assert.doesNotMatch(calls, /openhuman::memory::tests::one_extra -- --ignored/);
- assert.match(calls, /openhuman::memory::tests::two -- --ignored --exact --test-threads=1/);
-});
-
-test("rejects a vacuous ignored-test inventory", () => {
- const root = fs.mkdtempSync(path.join(os.tmpdir(), "openhuman-module-tests-empty-"));
- const bin = path.join(root, "bin");
- fs.mkdirSync(bin);
- fs.writeFileSync(path.join(bin, "node"), "#!/usr/bin/env bash\nexit 0\n", { mode: 0o755 });
- fs.writeFileSync(path.join(bin, "cargo"), "#!/usr/bin/env bash\nexit 0\n", { mode: 0o755 });
-
- const result = spawnSync(runner, { cwd: repoRoot, env: { ...process.env, PATH: `${bin}:${process.env.PATH}` }, encoding: "utf8" });
- fs.rmSync(root, { recursive: true, force: true });
-
- assert.equal(result.status, 1);
- assert.match(result.stderr, /inventory is empty/);
-});
-
-test("module-gated source inventory contains unique sorted names", () => {
- const inventory = spawnSync(
- "node",
- [path.join(repoRoot, "scripts", "ci", "list-module-gated-tests.mjs"), "--json"],
- { cwd: repoRoot, encoding: "utf8" },
- );
-
- assert.equal(inventory.status, 0, inventory.stderr);
- const { run, skipped } = JSON.parse(inventory.stdout);
- assert.deepEqual(run, [...new Set(run)].sort());
- assert.deepEqual(skipped, [...new Set(skipped)].sort());
-});
-
-test("fails when the skipped-test inventory command fails", () => {
- const root = fs.mkdtempSync(path.join(os.tmpdir(), "openhuman-module-tests-skipped-failure-"));
- const bin = path.join(root, "bin");
- fs.mkdirSync(bin);
- fs.writeFileSync(
- path.join(bin, "node"),
- `#!/usr/bin/env bash
-if [[ "$*" == *"--skipped"* ]]; then exit 23; fi
-printf '%s\\n' one
-`,
- { mode: 0o755 },
- );
- fs.writeFileSync(path.join(bin, "cargo"), "#!/usr/bin/env bash\nexit 0\n", { mode: 0o755 });
-
- const result = spawnSync(runner, { cwd: repoRoot, env: { ...process.env, PATH: `${bin}:${process.env.PATH}` }, encoding: "utf8" });
- fs.rmSync(root, { recursive: true, force: true });
-
- assert.equal(result.status, 23, `${result.stdout}\n${result.stderr}`);
-});
diff --git a/scripts/ci/list-module-gated-tests.mjs b/scripts/ci/list-module-gated-tests.mjs
deleted file mode 100755
index ff2b1873a6..0000000000
--- a/scripts/ci/list-module-gated-tests.mjs
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env node
-import fs from "node:fs";
-import path from "node:path";
-
-const root = process.cwd();
-const sourceRoot = path.join(root, "crates", "openhuman-core", "src");
-const run = [];
-const skipped = [];
-
-function visit(dir) {
- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
- const file = path.join(dir, entry.name);
- if (entry.isDirectory()) visit(file);
- else if (entry.name.endsWith(".rs")) scan(file);
- }
-}
-
-function scan(file) {
- const lines = fs.readFileSync(file, "utf8").split("\n");
- let pending = null;
- for (const line of lines) {
- if (line.includes('#[ignore = "needs a built tinymemory module')) pending = "run";
- else if (line.includes('#[ignore = "needs a built tinydocs')) pending = "tinydocs";
-
- const match = line.match(/^\s*(?:async\s+)?fn\s+([A-Za-z0-9_]+)/);
- if (!pending || !match) continue;
- (pending === "run" ? run : skipped).push(match[1]);
- pending = null;
- }
-}
-
-visit(sourceRoot);
-const result = {
- run: [...new Set(run)].sort(),
- skipped: [...new Set(skipped)].sort(),
-};
-
-if (process.argv.includes("--json")) console.log(JSON.stringify(result));
-else if (process.argv.includes("--skipped")) console.log(result.skipped.join("\n"));
-else console.log(result.run.join("\n"));
-
-if (result.run.length === 0) {
- console.error("module-gated test source inventory is empty");
- process.exit(1);
-}
diff --git a/scripts/ci/run-module-gated-tests.sh b/scripts/ci/run-module-gated-tests.sh
deleted file mode 100755
index 067815395b..0000000000
--- a/scripts/ci/run-module-gated-tests.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env bash
-# Run the ignored Rust tests whose source contract requires TinyMemory.
-set -euo pipefail
-
-ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
-cd "$ROOT"
-
-FEATURES="${MODULE_TEST_FEATURES:-modules}"
-LIST_OUTPUT="$(mktemp)"
-trap 'rm -f "$LIST_OUTPUT"' EXIT
-
-TEST_NAMES_OUTPUT="$(node scripts/ci/list-module-gated-tests.mjs)"
-SKIPPED_NAMES_OUTPUT="$(node scripts/ci/list-module-gated-tests.mjs --skipped)" || {
- status=$?
- echo "::error::module-gated skipped-test inventory failed" >&2
- exit "$status"
-}
-TEST_NAMES=()
-SKIPPED_NAMES=()
-if [ -n "$TEST_NAMES_OUTPUT" ]; then mapfile -t TEST_NAMES <<< "$TEST_NAMES_OUTPUT"; fi
-if [ -n "$SKIPPED_NAMES_OUTPUT" ]; then mapfile -t SKIPPED_NAMES <<< "$SKIPPED_NAMES_OUTPUT"; fi
-if [ "${#TEST_NAMES[@]}" -eq 0 ]; then
- echo "::error::module-gated test inventory is empty; refusing a vacuous pass" >&2
- exit 1
-fi
-
-for name in "${SKIPPED_NAMES[@]}"; do
- echo "module-gated Rust test skipped: $name (tinydocs artifact is not staged in this lane)"
-done
-
-bash scripts/ci-cancel-aware.sh cargo test -p openhuman --lib --features "$FEATURES" -- --ignored --list >"$LIST_OUTPUT"
-
-run_count=0
-for name in "${TEST_NAMES[@]}"; do
- matches="$(sed -n 's/: test$//p' "$LIST_OUTPUT" | grep -F "::${name}" | grep -E "::${name}$" || true)"
- match_count="$(printf '%s\n' "$matches" | sed '/^$/d' | wc -l | tr -d ' ')"
- if [ "$match_count" -eq 0 ]; then
- echo "::error::module-gated test '$name' resolved to $match_count tests" >&2
- exit 1
- fi
- while IFS= read -r test_path; do
- [ -n "$test_path" ] || continue
- echo "running module-gated test: $test_path"
- bash scripts/ci-cancel-aware.sh cargo test -p openhuman --lib --features "$FEATURES" "$test_path" -- \
- --ignored --exact --test-threads=1
- run_count=$((run_count + 1))
- done <<< "$matches"
-done
-
-echo "module-gated Rust tests scheduled: $run_count"
-echo "module-gated Rust tests skipped: ${#SKIPPED_NAMES[@]} (tinydocs artifact is not staged in this lane)"