🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
fix(ci): the test ratchet no longer runs files vitest cannot run (71 plugin kit tests and node:test files)
ruv668ee8d1e9bb
diff --git a/scripts/__tests__/ci-test-ratchet.test.mjs b/scripts/__tests__/ci-test-ratchet.test.mjsindex 3c9211f9f1..37deda986e 100644--- a/scripts/__tests__/ci-test-ratchet.test.mjs+++ b/scripts/__tests__/ci-test-ratchet.test.mjs@@ -1,5 +1,8 @@import { describe, expect, it } from 'vitest';-import { evaluateTestReport, formatUnexpectedFailures } from '../ci-test-ratchet.mjs';+import { mkdtempSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join } from 'node:path';+import { evaluateTestReport, formatUnexpectedFailures, readExcludes } from '../ci-test-ratchet.mjs';const root = '/repo';@@ -92,3 +95,37 @@ describe('unexpected-failure output (#3208)', () => {.toEqual([' + a.test.ts', ' ✗ bare title']);});});++describe('files vitest does not run (scripts/ci-test-excluded.txt)', () => {+ const make = (lines, files) => {+ const dir = mkdtempSync(join(tmpdir(), 'ratchet-'));+ for (const file of files) {+ mkdirSync(join(dir, file, '..'), { recursive: true });+ writeFileSync(join(dir, file), '');+ }+ writeFileSync(join(dir, 'excluded.txt'), lines.join('\n'));+ return dir;+ };++ it('reads entries and skips comments and blank lines', () => {+ const dir = make(['# why', '', 'a/one.test.ts', ' b/two.test.mjs '], ['a/one.test.ts', 'b/two.test.mjs']);++ expect(readExcludes(join(dir, 'excluded.txt'), dir)).toEqual(['a/one.test.ts', 'b/two.test.mjs']);+ });++ it('throws when a listed file no longer exists, so the list cannot go stale', () => {+ const dir = make(['a/gone.test.ts'], []);++ expect(() => readExcludes(join(dir, 'excluded.txt'), dir)).toThrow(/do not exist: a\/gone\.test\.ts/);+ });++ it('the committed list is current and names no baseline file', () => {+ const root = join(import.meta.dirname, '..', '..');+ const excluded = readExcludes(join(root, 'scripts/ci-test-excluded.txt'), root);++ const baseline = new Set(readFileSync(join(root, 'scripts/ci-test-baseline.txt'), 'utf8').split(/\r?\n/).filter((line) => line && !line.startsWith('#')));++ expect(excluded.length).toBeGreaterThan(0);+ expect(excluded.filter((file) => baseline.has(file))).toEqual([]);+ });+});diff --git a/scripts/ci-test-excluded.txt b/scripts/ci-test-excluded.txtnew file mode 100644index 0000000000..a9c0ce7d79--- /dev/null+++ b/scripts/ci-test-excluded.txt@@ -0,0 +1,78 @@+# Test files the root vitest run (scripts/ci-test-ratchet.mjs) does not run, because vitest cannot run them. They are NOT failures hidden+# from the baseline: each has its own runner, and that runner is a CI gate.+# - plugins/*/tests/*.test.ts import `claude-code/testing`, which only exists inside Claude Code: `claude plugin test <dir>` runs them+# (every plugin's scripts/smoke.sh, and .github/workflows/all-plugins-smoke.yml).+# - the .mjs files use node:test: `node --test` runs them (all-plugins-smoke.yml and the plugin smokes).+# A listed file that no longer exists fails the ratchet, so this list cannot go stale silently. Never add a file here to make a real+# regression green: a file that vitest CAN run belongs in scripts/ci-test-baseline.txt (and that file may only shrink).+plugins/ruflo-adr/tests/mod.test.ts+plugins/ruflo-agentdb/tests/fold.test.ts+plugins/ruflo-agentdb/tests/guard-scan.test.ts+plugins/ruflo-agentdb/tests/import.test.ts+plugins/ruflo-agentdb/tests/register.test.ts+plugins/ruflo-agentdb/tests/screen.test.ts+plugins/ruflo-agentdb/tests/textsof.test.ts+plugins/ruflo-agent/tests/mod.test.ts+plugins/ruflo-agntcy/tests/mod.test.ts+plugins/ruflo-aidefence/tests/mod.test.ts+plugins/ruflo-ai-team/tests/mod.test.ts+plugins/ruflo-arena/tests/mod.test.ts+plugins/ruflo-autopilot/tests/mod.test.ts+plugins/ruflo-bbs-federation/tests/register.test.ts+plugins/ruflo-browser/tests/register.test.ts+plugins/ruflo-business-pods/tests/register.test.ts+plugins/ruflo-chatgpt-federation/tests/register.test.ts+plugins/ruflo-daa/tests/mod.test.ts+plugins/ruflo-ddd/tests/mod.test.ts+plugins/ruflo-deepseek-harness/tests/mod.test.ts+plugins/ruflo-docs/tests/mod.test.ts+plugins/ruflo-federation/tests/mod.test.ts+plugins/ruflo-goals/tests/register.test.ts+plugins/ruflo-graph-intelligence/hooks/tests/register.test.ts+plugins/ruflo-intelligence/tests/register.test.ts+plugins/ruflo-iot-cognitum/tests/register.test.ts+plugins/ruflo-jujutsu/tests/register.test.ts+plugins/ruflo-jujutsu/tests/textsof.test.ts+plugins/ruflo-knowledge-graph/tests/register.test.ts+plugins/ruflo-knowledge-graph/tests/textsof.test.ts+plugins/ruflo-loop-workers/tests/register.test.ts+plugins/ruflo-loop-workers/tests/textsof.test.ts+plugins/ruflo-market-data/tests/register.test.ts+plugins/ruflo-market-data/tests/textsof.test.ts+plugins/ruflo-metaharness/tests/register.test.ts+plugins/ruflo-metaharness/tests/textsof.test.ts+plugins/ruflo-migrations/tests/migrations-mod.test.ts+plugins/ruflo-mods/tests/agents.test.ts+plugins/ruflo-mods/tests/compact.test.ts+plugins/ruflo-mods/tests/delivery.test.ts+plugins/ruflo-mods/tests/describe.test.ts+plugins/ruflo-mods/tests/probe.test.ts+plugins/ruflo-mods/tests/ranked-context.test.ts+plugins/ruflo-mods/tests/rollup.test.ts+plugins/ruflo-music/tests/music-mod.test.ts+plugins/ruflo-neural-trader/tests/trader-mod.test.ts+plugins/ruflo-observability/tests/observe-mod.test.ts+plugins/ruflo-plugin-creator/templates/mod/tests/status.test.ts+plugins/ruflo-plugin-creator/tests/creator.test.ts+plugins/ruflo-rag-memory/tests/rag.test.ts+plugins/ruflo-rag-memory/tests/textsof.test.ts+plugins/ruflo-ruvector/tests/ruvector.test.ts+plugins/ruflo-ruvector/tests/textsof.test.ts+plugins/ruflo-ruvllm/tests/ruvllm.test.ts+plugins/ruflo-ruvllm/tests/textsof.test.ts+plugins/ruflo-rvf/tests/rvf.test.ts+plugins/ruflo-rvf/tests/textsof.test.ts+plugins/ruflo-security-audit/tests/mod.test.ts+plugins/ruflo-security-audit/tests/textsof.test.ts+plugins/ruflo-sparc/tests/mod.test.ts+plugins/ruflo-sparc/tests/textsof.test.ts+plugins/ruflo-testgen/tests/mod.test.ts+plugins/ruflo-workflows/tests/mod.test.ts+plugins/ruflo-workflows/tests/textsof.test.ts+plugins/ruflo-x-gateway/tests/mod.test.ts+plugins/ruflo-x-gateway/tests/textsof.test.ts+scripts/check-adr-links.test.mjs+scripts/__tests__/guard-label.test.mjs+scripts/__tests__/mod-capability-matrix.test.mjs+tests/check-guard-tool-names.test.mjs+tests/check-status-forwarding.test.mjsdiff --git a/scripts/ci-test-ratchet.mjs b/scripts/ci-test-ratchet.mjsindex 806239e6fe..b45b182234 100644--- a/scripts/ci-test-ratchet.mjs+++ b/scripts/ci-test-ratchet.mjs@@ -12,6 +12,18 @@ function normalizeTestPath(name, repoRoot) {return normalized.split(sep).join('/').replace(/^\.\//, '');}+/**+ * The files vitest is told to skip (scripts/ci-test-excluded.txt): tests with their own runner. Throws when an entry no longer exists, so a+ * stale list fails the ratchet instead of quietly skipping nothing.+ */+export function readExcludes(path, repoRoot = REPO_ROOT) {+ if (!existsSync(path)) throw new Error(`excluded-tests list is missing: ${path}`);+ const entries = readFileSync(path, 'utf8').split(/\r?\n/).map((line) => line.trim()).filter((line) => line && !line.startsWith('#'));+ const stale = entries.filter((entry) => !existsSync(resolve(repoRoot, entry)));+ if (stale.length > 0) throw new Error(`excluded-tests list names files that do not exist: ${stale.join(', ')}`);+ return entries;+}+export function evaluateTestReport(report, baselineEntries, repoRoot = REPO_ROOT) {if (!report || !Array.isArray(report.testResults)) {return { ok: false, error: 'Vitest JSON report is missing testResults[]' };@@ -103,6 +115,13 @@ function main() {const vitestBin = resolve(REPO_ROOT, 'node_modules/vitest/vitest.mjs');if (args.run) {+ let excluded;+ try {+ excluded = readExcludes(resolve(REPO_ROOT, 'scripts/ci-test-excluded.txt'));+ } catch (error) {+ console.error(`CI test ratchet: ${error.message}`);+ process.exit(1);+ }mkdirSync(dirname(reportPath), { recursive: true });// A killed runner must not accidentally reuse a prior green-enough report.rmSync(reportPath, { force: true });@@ -115,6 +134,7 @@ function main() {// ADR-447 needs the CLI workspace compiler/source aliases. The// mod-guidance workflow requires this suite with that configuration.'--exclude=v3/@claude-flow/cli/__tests__/mods/mods-guidance-e2e.test.ts',+ ...excluded.map((file) => `--exclude=${file}`),'--reporter=json',`--outputFile=${reportPath}`,], {