The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
test(cli): keep three fixtures working on the new Linux CI runner
tonyaead854aa952
diff --git a/cli/src/harnessd/master.spec.ts b/cli/src/harnessd/master.spec.tsindex d68ae3497..d04172375 100644--- a/cli/src/harnessd/master.spec.ts+++ b/cli/src/harnessd/master.spec.ts@@ -1,5 +1,5 @@import { EventEmitter } from 'node:events'-import { closeSync, existsSync, linkSync, mkdirSync, mkdtempSync, openSync, readdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs'+import { chmodSync, closeSync, copyFileSync, existsSync, linkSync, mkdirSync, mkdtempSync, openSync, readdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs'import { tmpdir } from 'node:os'import { join } from 'node:path'import { spawn, type ChildProcess } from 'node:child_process'@@ -16,6 +16,16 @@ import {import { HARNESSD_PROTOCOL, LEAN_CORE_SCRIPT_ENV } from './protocol.js'import { DEFAULT_SUPERVISOR_OPTIONS, type ResumeState } from './supervisor.js'+/** This test's Node at [path]: a hard link of the running one, or a copy where the temp folder is on+ * another filesystem than the Node install (EXDEV: the Linux CI runner's toolcache, 2026-10-22). */+function placeNode(path: string) {+ try { linkSync(process.execPath, path) } catch (error) {+ if ((error as NodeJS.ErrnoException).code !== 'EXDEV') throw error+ copyFileSync(process.execPath, path)+ chmodSync(path, 0o755)+ }+}+describe('supervisorOptions', () => {it('reads valid overrides and keeps the defaults for anything unset or invalid', () => {expect(supervisorOptions({})).toEqual(DEFAULT_SUPERVISOR_OPTIONS)@@ -312,7 +322,7 @@ describe('runMaster', { timeout: 60_000 }, () => {const bin = join(runtime, 'node-v1', 'bin')mkdirSync(bin, { recursive: true })const node = join(bin, 'node')- linkSync(process.execPath, node)+ placeNode(node)const ran = join(dir, 'ran')const core = join(dir, 'core.cjs')writeFileSync(core, `diff --git a/cli/src/harnessd/processName.spec.ts b/cli/src/harnessd/processName.spec.tsindex 5e6ed37aa..7d4dbf463 100644--- a/cli/src/harnessd/processName.spec.ts+++ b/cli/src/harnessd/processName.spec.ts@@ -1,9 +1,19 @@-import { linkSync, mkdirSync, mkdtempSync, rmSync, statSync, symlinkSync } from 'node:fs'+import { chmodSync, copyFileSync, linkSync, mkdirSync, mkdtempSync, rmSync, statSync, symlinkSync } from 'node:fs'import { tmpdir } from 'node:os'import { join } from 'node:path'import { afterEach, describe, expect, it, vi } from 'vitest'import { baseNode, namedNode, nodeFs, resetNamedNodeReports, type NamedNodeFs } from './processName.js'+/** This test's Node at [path]: a hard link of the running one, or a copy where the temp folder is on+ * another filesystem than the Node install (EXDEV: the Linux CI runner's toolcache, 2026-10-22). */+function placeNode(path: string) {+ try { linkSync(process.execPath, path) } catch (error) {+ if ((error as NodeJS.ErrnoException).code !== 'EXDEV') throw error+ copyFileSync(process.execPath, path)+ chmodSync(path, 0o755)+ }+}+const runtime = '/home/u/.harness/runtime'const node = `${runtime}/node-v22/bin/node`const libexec = `${runtime}/node-v22/libexec/harnessd`@@ -105,10 +115,10 @@ describe('namedNode', () => {const bin = join(dir, 'node-v1', 'bin')mkdirSync(bin, { recursive: true })const fakeNode = join(bin, 'node')- linkSync(process.execPath, fakeNode)+ placeNode(fakeNode)const link = namedNode(fakeNode, 'harnessd-search', dir)expect(link).toBe(join(dir, 'node-v1', 'libexec', 'harnessd', 'harnessd-search'))- expect(statSync(link).ino).toBe(statSync(process.execPath).ino)+ expect(statSync(link).ino).toBe(statSync(fakeNode).ino)expect(namedNode(fakeNode, 'harnessd-search', dir, { fs: nodeFs })).toBe(link)expect(baseNode(link)).toBe(fakeNode)} finally { rmSync(dir, { recursive: true, force: true }) }diff --git a/cli/src/lib/tmuxPaneInfo.spec.ts b/cli/src/lib/tmuxPaneInfo.spec.tsindex 9f4fe6433..5c27ce6ba 100644--- a/cli/src/lib/tmuxPaneInfo.spec.ts+++ b/cli/src/lib/tmuxPaneInfo.spec.ts@@ -19,10 +19,16 @@ describe.skipIf(!hasTmux)('tmuxPaneInfo', () => {const tmux = (...args: string[]) => execFileSync('tmux', ['-S', socket, ...args], { env }).toString().trim()let pane = ''- beforeAll(() => {+ beforeAll(async () => {// A command whose name is certain (on macOS `sh` is bash).tmux('-f', '/dev/null', 'new-session', '-d', '-s', 'info', '-c', dir, 'sleep 600')pane = tmux('display-message', '-p', '-t', 'info', '#{pane_id}')+ // The pane's process is tmux's own fork until it execs `sleep`: on the Linux CI runner+ // (2026-10-22) the read below came first and named `tmux`. Wait for the exec, briefly.+ const deadline = Date.now() + 5_000+ while (tmux('display-message', '-p', '-t', pane, '#{pane_current_command}') !== 'sleep' && Date.now() < deadline) {+ await new Promise(resolve => setTimeout(resolve, 20))+ }})afterAll(() => {