mirror of
https://github.com/morluto/rea.git
synced 2026-11-13 18:49:25 -10:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
808acf6dec | ||
|
|
2064e6a66e | ||
|
|
aeb30599af | ||
|
|
db0748389f | ||
|
|
e8c838e8bd | ||
|
|
809f0d69db | ||
|
|
e1d229cd6b | ||
|
|
01fcf8e3d7 | ||
|
|
0a3368a6a9 | ||
|
|
3986bf9f8e |
No files matched your search
@@ -307,7 +307,10 @@ assertion. `vitest.config.ts` applies the deadlines in
|
||||
and 120 seconds for built projects, with hooks sharing their project's
|
||||
deadline. Coverage doubles every deadline, and so does hosted CI, where
|
||||
CPU-bound cases share every core with other workers and their subprocesses.
|
||||
Do not pass a per-test timeout to fit a slow host. Tag a bounded workload that needs longer with
|
||||
Do not pass a per-test timeout to fit a slow host. A child run through a
|
||||
test process registry (`processTest`, `cli.run`, or `createTestProcessRegistry`)
|
||||
gets the running test's remaining deadline less a reporting reserve, so a hung
|
||||
child fails with its captured output. Pass `timeoutMs` only when the child's deadline is itself under test. Tag a bounded workload that needs longer with
|
||||
`{ tags: ["long-running"] }`, or a whole file with
|
||||
`// @module-tag long-running`. Assert elapsed time explicitly when speed is the
|
||||
behavior under test. Derive an explicit deadline only when a test must outlive
|
||||
|
||||
@@ -296,7 +296,6 @@ it(
|
||||
process.execPath,
|
||||
["--import", "tsx", "--input-type=module", "--eval", CATALOG_PROGRAM],
|
||||
{
|
||||
timeoutMs: 50_000,
|
||||
env: {
|
||||
PATH: process.env.PATH,
|
||||
SystemRoot: process.env.SystemRoot,
|
||||
|
||||
@@ -102,7 +102,6 @@ it("repairs equal-launcher Copilot JSONC syntax while strict JSON and standard J
|
||||
process.execPath,
|
||||
["--import", "tsx", entrypoint],
|
||||
{
|
||||
timeoutMs: 20_000,
|
||||
env: {
|
||||
PATH: process.env.PATH,
|
||||
SystemRoot: process.env.SystemRoot,
|
||||
|
||||
@@ -13,29 +13,40 @@ import { prepareProcessScenarioPlan } from "./ProcessScenarioPreparation.js";
|
||||
|
||||
afterEach(() => vi.restoreAllMocks());
|
||||
|
||||
it("rejects observation roots that capture admission rejects", async () => {
|
||||
const root = await createTestTempDirectory("rea-process-plan-");
|
||||
const file = join(root, "selected");
|
||||
await writeFile(file, "not a directory");
|
||||
const scenario = processScenarioSchema.parse({
|
||||
executable: process.execPath,
|
||||
working_directory: root,
|
||||
filesystem_observation_paths: [join(file, "child")],
|
||||
});
|
||||
/**
|
||||
* Windows refuses capture before root admission runs. The cancellation cases
|
||||
* replace admission, so they plan for a platform that reaches it on any host.
|
||||
*/
|
||||
const capturePlatform = "linux";
|
||||
|
||||
const prepared = await prepareProcessScenarioPlan(
|
||||
scenario,
|
||||
{},
|
||||
process.platform,
|
||||
);
|
||||
// A path below a regular file is ENOTDIR on POSIX. Windows reports ENOENT,
|
||||
// which admission accepts as a root the scenario may create.
|
||||
it.skipIf(process.platform === "win32")(
|
||||
"rejects observation roots that capture admission rejects",
|
||||
async () => {
|
||||
const root = await createTestTempDirectory("rea-process-plan-");
|
||||
const file = join(root, "selected");
|
||||
await writeFile(file, "not a directory");
|
||||
const scenario = processScenarioSchema.parse({
|
||||
executable: process.execPath,
|
||||
working_directory: root,
|
||||
filesystem_observation_paths: [join(file, "child")],
|
||||
});
|
||||
|
||||
expect(prepared.ok).toBe(false);
|
||||
if (prepared.ok) return;
|
||||
expect(prepared.error).toMatchObject({
|
||||
_tag: "ProcessCaptureError",
|
||||
userMessage: "filesystem observation admission failed",
|
||||
});
|
||||
});
|
||||
const prepared = await prepareProcessScenarioPlan(
|
||||
scenario,
|
||||
{},
|
||||
process.platform,
|
||||
);
|
||||
|
||||
expect(prepared.ok).toBe(false);
|
||||
if (prepared.ok) return;
|
||||
expect(prepared.error).toMatchObject({
|
||||
_tag: "ProcessCaptureError",
|
||||
userMessage: "filesystem observation admission failed",
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
it("reports cancellation normalized inside admission as planning cancellation", async () => {
|
||||
const scenario = processScenarioSchema.parse({
|
||||
@@ -59,7 +70,7 @@ it("reports cancellation normalized inside admission as planning cancellation",
|
||||
const prepared = await prepareProcessScenarioPlan(
|
||||
scenario,
|
||||
{},
|
||||
process.platform,
|
||||
capturePlatform,
|
||||
controller.signal,
|
||||
);
|
||||
|
||||
@@ -100,7 +111,7 @@ it("reports cancellation after the last awaited admission step", async () => {
|
||||
const planning = prepareProcessScenarioPlan(
|
||||
scenario,
|
||||
{},
|
||||
process.platform,
|
||||
capturePlatform,
|
||||
controller.signal,
|
||||
);
|
||||
|
||||
|
||||
@@ -44,7 +44,12 @@ it("returns the original validated metadata snapshot with its actual descriptor"
|
||||
});
|
||||
return handle;
|
||||
});
|
||||
const descriptor = await openRegularFile(path, { symlinks: "reject" });
|
||||
// The test just wrote this file. Settling its fresh Windows ChangeTime would
|
||||
// replace the first observation, so admit it as written on every host.
|
||||
const descriptor = await openRegularFile(path, {
|
||||
symlinks: "reject",
|
||||
changeTime: "as-written",
|
||||
});
|
||||
try {
|
||||
expect(descriptor.handle).toBe(opened);
|
||||
expect(descriptor.initial).toBe(validated);
|
||||
|
||||
@@ -21,19 +21,15 @@ it("retains escape-heavy strings within a heap near their decoded size", async (
|
||||
if (!Array.isArray(parsed) || parsed.length !== 463 || parsed.some((value) => value !== body)) process.exit(3);
|
||||
`;
|
||||
|
||||
const child = await processes.run(
|
||||
process.execPath,
|
||||
[
|
||||
"--max-old-space-size=48",
|
||||
"--max-semi-space-size=8",
|
||||
"--import",
|
||||
"tsx",
|
||||
"--input-type=module",
|
||||
"--eval",
|
||||
program,
|
||||
],
|
||||
{ timeoutMs: 30_000 },
|
||||
);
|
||||
const child = await processes.run(process.execPath, [
|
||||
"--max-old-space-size=48",
|
||||
"--max-semi-space-size=8",
|
||||
"--import",
|
||||
"tsx",
|
||||
"--input-type=module",
|
||||
"--eval",
|
||||
program,
|
||||
]);
|
||||
|
||||
expect(child.exitCode, child.stderr).toBe(0);
|
||||
});
|
||||
@@ -19,7 +19,10 @@ import {
|
||||
ghidraDolSectionFile,
|
||||
} from "./GhidraDolProfile.js";
|
||||
import { GhidraProvider } from "./GhidraProvider.js";
|
||||
import { ghidraProfileInstallationHost as host } from "./GhidraInstallation.fixture.js";
|
||||
import {
|
||||
ghidraProfileInstallationHost as host,
|
||||
simulatedInstallDirectory,
|
||||
} from "./GhidraInstallation.fixture.js";
|
||||
|
||||
// Abbreviated from Ghidra 12.1.4 ppc.ldefs and x86.ldefs: the stock PowerPC
|
||||
// default, the optional Broadway variant, and one little-endian language to refuse.
|
||||
@@ -47,7 +50,7 @@ const configFor = (environment: NodeJS.ProcessEnv) => {
|
||||
};
|
||||
|
||||
const installedConfig = async (environment: NodeJS.ProcessEnv) => {
|
||||
const installDir = await createTestTempDirectory("rea-ghidra-dol-");
|
||||
const installDir = await simulatedInstallDirectory("rea-ghidra-dol-");
|
||||
const languages = join(
|
||||
installDir,
|
||||
"Ghidra/Processors/PowerPC/data/languages",
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
import { mkdir, mkdtemp, realpath } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join, parse, relative } from "node:path";
|
||||
import { onTestFinished } from "vitest";
|
||||
import { normalizeTestTemporaryPrefix } from "../../scripts/lib/test-temporary-ownership.mjs";
|
||||
import { removeTestWorkspace } from "../../tests/support/workspace/workspaceFixture.js";
|
||||
import { ok as javaProbeOk, err } from "../domain/result.js";
|
||||
import type {
|
||||
GhidraJavaObservation,
|
||||
@@ -23,6 +29,44 @@ export const ghidraProfileInstallationHost: GhidraInstallationHost = {
|
||||
}),
|
||||
};
|
||||
|
||||
/**
|
||||
* A temporary installation directory the simulated Linux host accepts as
|
||||
* absolute. On Windows it is made under the working directory and spelled as a
|
||||
* POSIX path on that drive; other hosts get an ordinary test directory. The
|
||||
* caller owns and disposes the native directory.
|
||||
*/
|
||||
export const createSimulatedInstallDirectory = async (
|
||||
prefix: string,
|
||||
): Promise<{
|
||||
readonly path: string;
|
||||
readonly dispose: () => Promise<void>;
|
||||
}> => {
|
||||
const root =
|
||||
process.platform === "win32"
|
||||
? join(process.cwd(), "build")
|
||||
: await realpath(tmpdir());
|
||||
await mkdir(root, { recursive: true });
|
||||
const owned = await realpath(
|
||||
await mkdtemp(join(root, normalizeTestTemporaryPrefix(prefix))),
|
||||
);
|
||||
return {
|
||||
path:
|
||||
process.platform === "win32"
|
||||
? `/${relative(parse(owned).root, owned).replaceAll("\\", "/")}`
|
||||
: owned,
|
||||
dispose: () => removeTestWorkspace(owned),
|
||||
};
|
||||
};
|
||||
|
||||
/** Own the simulated directory for a single test. */
|
||||
export const simulatedInstallDirectory = async (
|
||||
prefix: string,
|
||||
): Promise<string> => {
|
||||
const directory = await createSimulatedInstallDirectory(prefix);
|
||||
onTestFinished(directory.dispose);
|
||||
return directory.path;
|
||||
};
|
||||
|
||||
/** A confirmed absent Java command for installation admission fixtures. */
|
||||
export const missingJavaProbe = err<GhidraJavaProbeFailure>({
|
||||
_tag: "GhidraJavaProbeFailure",
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
import {
|
||||
chmod,
|
||||
mkdir,
|
||||
mkdtemp,
|
||||
readdir,
|
||||
rm,
|
||||
writeFile,
|
||||
} from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join, parse, relative } from "node:path";
|
||||
import { chmod, mkdir, readdir, rm, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
import { createTestTempDirectory } from "../../tests/fixtures/temporaryDirectory.js";
|
||||
import { parseConfig } from "../config/parseConfig.js";
|
||||
@@ -18,7 +10,10 @@ import {
|
||||
ghidraProfileLanguageOverride,
|
||||
sameGhidraLanguageOverride,
|
||||
} from "./GhidraAnalysisProfile.js";
|
||||
import { ghidraProfileInstallationHost as host } from "./GhidraInstallation.fixture.js";
|
||||
import {
|
||||
createSimulatedInstallDirectory,
|
||||
ghidraProfileInstallationHost as host,
|
||||
} from "./GhidraInstallation.fixture.js";
|
||||
import {
|
||||
admitGhidraLanguageOverride,
|
||||
parseGhidraLanguageDefinitions,
|
||||
@@ -106,25 +101,19 @@ const legacyMips: BinaryTarget = {
|
||||
};
|
||||
|
||||
let installDir = "";
|
||||
let ownedInstallDir = "";
|
||||
let disposeInstallDir: (() => Promise<void>) | undefined;
|
||||
beforeAll(async () => {
|
||||
const root =
|
||||
process.platform === "win32" ? join(process.cwd(), "build") : tmpdir();
|
||||
await mkdir(root, { recursive: true });
|
||||
ownedInstallDir = await mkdtemp(join(root, "rea-ghidra-languages-"));
|
||||
// The simulated Linux host needs a POSIX absolute path. Keep the owned
|
||||
// native path for cleanup and derive the simulated path on the same drive.
|
||||
installDir =
|
||||
process.platform === "win32"
|
||||
? `/${relative(parse(ownedInstallDir).root, ownedInstallDir).replaceAll("\\", "/")}`
|
||||
: ownedInstallDir;
|
||||
const directory = await createSimulatedInstallDirectory(
|
||||
"rea-ghidra-languages-",
|
||||
);
|
||||
installDir = directory.path;
|
||||
disposeInstallDir = directory.dispose;
|
||||
const languages = join(installDir, "Ghidra/Processors/x86/data/languages");
|
||||
await mkdir(languages, { recursive: true });
|
||||
await writeFile(join(languages, "x86.ldefs"), X86_LDEFS);
|
||||
});
|
||||
afterAll(async () => {
|
||||
if (ownedInstallDir !== "")
|
||||
await rm(ownedInstallDir, { recursive: true, force: true });
|
||||
await disposeInstallDir?.();
|
||||
});
|
||||
|
||||
const provider = (environment: Record<string, string>) => {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { mkdir, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { createTestTempDirectory } from "../../tests/fixtures/temporaryDirectory.js";
|
||||
import { ok } from "../domain/result.js";
|
||||
import { parseConfig } from "../config/parseConfig.js";
|
||||
import type {
|
||||
@@ -17,7 +16,10 @@ import {
|
||||
ghidraMipsProfileMismatchReason,
|
||||
ghidraMipsProfileParameters,
|
||||
} from "./GhidraMipsProfile.js";
|
||||
import { ghidraProfileInstallationHost as host } from "./GhidraInstallation.fixture.js";
|
||||
import {
|
||||
ghidraProfileInstallationHost as host,
|
||||
simulatedInstallDirectory,
|
||||
} from "./GhidraInstallation.fixture.js";
|
||||
import { GHIDRA_SESSION_CAPABILITIES } from "./GhidraSessionValues.js";
|
||||
import type { GhidraMipsSoftFloatReport } from "./GhidraMipsProfile.js";
|
||||
import {
|
||||
@@ -45,7 +47,7 @@ const MIPS_LANGUAGE_DEFINITIONS = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
`;
|
||||
|
||||
const installedMipsConfig = async () => {
|
||||
const installDir = await createTestTempDirectory("rea-ghidra-mips-");
|
||||
const installDir = await simulatedInstallDirectory("rea-ghidra-mips-");
|
||||
const languages = join(installDir, "Ghidra/Processors/MIPS/data/languages");
|
||||
await mkdir(languages, { recursive: true });
|
||||
await writeFile(join(languages, "mips.ldefs"), MIPS_LANGUAGE_DEFINITIONS);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join, parse, relative } from "node:path";
|
||||
import { describe, expect, it, onTestFinished } from "vitest";
|
||||
import { mkdir, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { parseConfig } from "../config/parseConfig.js";
|
||||
import type {
|
||||
BinaryTarget,
|
||||
@@ -16,7 +15,10 @@ import {
|
||||
ghidraProfileLanguageOverride,
|
||||
} from "./GhidraAnalysisProfile.js";
|
||||
import { GhidraProvider } from "./GhidraProvider.js";
|
||||
import { ghidraProfileInstallationHost as host } from "./GhidraInstallation.fixture.js";
|
||||
import {
|
||||
ghidraProfileInstallationHost as host,
|
||||
simulatedInstallDirectory,
|
||||
} from "./GhidraInstallation.fixture.js";
|
||||
|
||||
// Abbreviated from Ghidra 12.1.4 Processors/PowerPC/data/languages/ppc.ldefs.
|
||||
const PPC_LDEFS = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
@@ -76,19 +78,7 @@ describe("bounded Ghidra PowerPC admission", () => {
|
||||
});
|
||||
|
||||
it("lets a configured language replace the lane default", async () => {
|
||||
const root =
|
||||
process.platform === "win32" ? join(process.cwd(), "build") : tmpdir();
|
||||
await mkdir(root, { recursive: true });
|
||||
const ownedInstallDir = await mkdtemp(join(root, "rea-ghidra-ppc-"));
|
||||
onTestFinished(async () => {
|
||||
await rm(ownedInstallDir, { recursive: true, force: true });
|
||||
});
|
||||
// The simulated Linux host needs a POSIX absolute path. Keep the owned
|
||||
// native path for cleanup and derive the simulated path on the same drive.
|
||||
const installDir =
|
||||
process.platform === "win32"
|
||||
? `/${relative(parse(ownedInstallDir).root, ownedInstallDir).replaceAll("\\", "/")}`
|
||||
: ownedInstallDir;
|
||||
const installDir = await simulatedInstallDirectory("rea-ghidra-ppc-");
|
||||
const languages = join(
|
||||
installDir,
|
||||
"Ghidra/Processors/PowerPC/data/languages",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join, parse, relative } from "node:path";
|
||||
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { afterAll, beforeAll, describe, expect, it } from "vitest";
|
||||
import { parseConfig } from "../config/parseConfig.js";
|
||||
import type {
|
||||
@@ -31,7 +30,10 @@ import {
|
||||
GHIDRA_SESSION_CAPABILITIES,
|
||||
type GhidraSessionInfo,
|
||||
} from "./GhidraSessionValues.js";
|
||||
import { ghidraProfileInstallationHost as host } from "./GhidraInstallation.fixture.js";
|
||||
import {
|
||||
createSimulatedInstallDirectory,
|
||||
ghidraProfileInstallationHost as host,
|
||||
} from "./GhidraInstallation.fixture.js";
|
||||
import {
|
||||
ghidraPinnedLanguage,
|
||||
ghidraProfileLanguageOverride,
|
||||
@@ -107,21 +109,19 @@ const ilp32 = (
|
||||
});
|
||||
|
||||
let installDir = "";
|
||||
let disposeInstallDir: (() => Promise<void>) | undefined;
|
||||
beforeAll(async () => {
|
||||
const root =
|
||||
process.platform === "win32" ? join(process.cwd(), "build") : tmpdir();
|
||||
await mkdir(root, { recursive: true });
|
||||
installDir = await mkdtemp(join(root, "rea-ghidra-riscv-languages-"));
|
||||
// The simulated Linux host needs a POSIX absolute path. A current-drive root
|
||||
// path also reaches this real fixture on Windows without changing admission.
|
||||
if (process.platform === "win32")
|
||||
installDir = `/${relative(parse(installDir).root, installDir).replaceAll("\\", "/")}`;
|
||||
const directory = await createSimulatedInstallDirectory(
|
||||
"rea-ghidra-riscv-languages-",
|
||||
);
|
||||
installDir = directory.path;
|
||||
disposeInstallDir = directory.dispose;
|
||||
const languages = join(installDir, "Ghidra/Processors/RISCV/data/languages");
|
||||
await mkdir(languages, { recursive: true });
|
||||
await writeFile(join(languages, "riscv.ldefs"), RISCV_LDEFS);
|
||||
});
|
||||
afterAll(async () => {
|
||||
await rm(installDir, { recursive: true, force: true });
|
||||
await disposeInstallDir?.();
|
||||
});
|
||||
|
||||
const ghidra = (environment: Record<string, string> = {}) =>
|
||||
|
||||
@@ -10,5 +10,6 @@ export const MCP_SHUTDOWN_FAILED =
|
||||
"REA could not close cleanly. End the REA process before starting it again.";
|
||||
export const SERVER_START_FAILED =
|
||||
"Do not repeat this startup. Tell the user REA could not start and ask them to restart the MCP client, then run `rea doctor`.";
|
||||
export const MCP_HTTP_LISTEN_FAILED =
|
||||
"REA could not listen for MCP HTTP connections on the selected host and port. Choose another --port or stop the process using it.";
|
||||
/** The listener error owns recovery for its parsed failure; never its native cause text. */
|
||||
export const mcpHttpListenFailed = (remediation: string): string =>
|
||||
`REA could not listen for MCP HTTP connections. ${remediation}`;
|
||||
@@ -12,7 +12,7 @@ import type { OptionalProviderLoadResult } from "../application/OptionalObservat
|
||||
import { OwnedMcpServers } from "./OwnedMcpServers.js";
|
||||
import {
|
||||
MCP_CONNECTION_START_FAILED,
|
||||
MCP_HTTP_LISTEN_FAILED,
|
||||
mcpHttpListenFailed,
|
||||
} from "./messages.js";
|
||||
import { reportMcpTransportError } from "./reportMcpTransportError.js";
|
||||
|
||||
@@ -181,10 +181,7 @@ export const startMcpTransport = async (
|
||||
if (!cancelled) {
|
||||
const startFailure =
|
||||
cause instanceof StreamableHttpListenError
|
||||
? cause.classification.ok &&
|
||||
cause.classification.value.kind === "host_allowlist"
|
||||
? cause.remediationAction
|
||||
: MCP_HTTP_LISTEN_FAILED
|
||||
? mcpHttpListenFailed(cause.remediationAction)
|
||||
: MCP_CONNECTION_START_FAILED;
|
||||
serverLogger.error(
|
||||
{
|
||||
|
||||
@@ -29,7 +29,6 @@ cliTest(
|
||||
"--json",
|
||||
],
|
||||
environment: { NODE_OPTIONS: "--max-old-space-size=256" },
|
||||
timeoutMs: 30000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const evidence = toolContract("inspect_apple_ips").outputSchema.parse(
|
||||
|
||||
@@ -16,7 +16,6 @@ cliTest.for(["", " \t "])(
|
||||
"--json",
|
||||
],
|
||||
environment: { REA_LOG_LEVEL: "silent" },
|
||||
timeoutMs: 15000,
|
||||
});
|
||||
expect(response.exitCode).toBe(1);
|
||||
expect(response.json).toMatchObject({
|
||||
|
||||
@@ -30,7 +30,6 @@ cliTest(
|
||||
bundlePath,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(response.exitCode).toBe(0);
|
||||
const bundle = evidenceBundleSchema.parse(
|
||||
|
||||
@@ -9,16 +9,12 @@ processTest(
|
||||
"returns a nonzero exit for a streamed JSON analysis failure",
|
||||
async ({ processes }) => {
|
||||
const root = await createTestTempDirectory("rea-cli-js-missing-");
|
||||
const result = await processes.run(
|
||||
process.execPath,
|
||||
[
|
||||
"scripts/rea.mjs",
|
||||
"analyze-javascript-application",
|
||||
join(root, "missing"),
|
||||
"--json",
|
||||
],
|
||||
{ timeoutMs: 20_000 },
|
||||
);
|
||||
const result = await processes.run(process.execPath, [
|
||||
"scripts/rea.mjs",
|
||||
"analyze-javascript-application",
|
||||
join(root, "missing"),
|
||||
"--json",
|
||||
]);
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(JSON.parse(result.stdout)).toMatchObject({
|
||||
code: "invalid_request",
|
||||
|
||||
@@ -84,7 +84,6 @@ cliTest.skipIf(process.versions.bun !== undefined).for([
|
||||
environment: {
|
||||
NODE_OPTIONS: `--max-old-space-size=${String(heapMb)} --max-semi-space-size=8`,
|
||||
},
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(response.exitCode).toBe(0);
|
||||
const result = javascriptApplicationAnalysisResultSchema.parse(
|
||||
@@ -201,7 +200,6 @@ cliTest.skipIf(process.versions.bun !== undefined)(
|
||||
environment: {
|
||||
NODE_OPTIONS: "--max-old-space-size=640 --max-semi-space-size=8",
|
||||
},
|
||||
timeoutMs: 75_000,
|
||||
});
|
||||
expect(response.stderr).not.toMatch(/FATAL ERROR:.*heap/iu);
|
||||
expect(
|
||||
|
||||
@@ -32,11 +32,10 @@ cliTest.for(["CLI", "stdio MCP"] as const)(
|
||||
["a", "b"],
|
||||
[],
|
||||
]) {
|
||||
const control = await processes.run(
|
||||
process.execPath,
|
||||
[join(root, "child.cjs"), ...values],
|
||||
{ timeoutMs: 5_000 },
|
||||
);
|
||||
const control = await processes.run(process.execPath, [
|
||||
join(root, "child.cjs"),
|
||||
...values,
|
||||
]);
|
||||
expect(control.exitCode, control.stderr).toBe(0);
|
||||
counts.push(Number(control.stdout));
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ cliTest.for(["CLI", "stdio MCP"] as const)(
|
||||
const control = await processes.run(
|
||||
process.execPath,
|
||||
[join(root, "entry.mjs"), "abc", " mode "],
|
||||
{ env: { REA_ENDPOINT: "endpoint" }, timeoutMs: 15_000 },
|
||||
{ env: { REA_ENDPOINT: "endpoint" } },
|
||||
);
|
||||
expect(control.exitCode, control.stderr).toBe(0);
|
||||
expect(JSON.parse(control.stdout)).toEqual([
|
||||
|
||||
@@ -46,7 +46,6 @@ cliTest(
|
||||
"directory",
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(cliResponse.exitCode).toBe(0);
|
||||
const cliEvidence = toolContract(
|
||||
|
||||
@@ -35,7 +35,6 @@ cliTest(
|
||||
"directory",
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(cliResponse.exitCode).toBe(0);
|
||||
const cliEvidence = toolContract(
|
||||
@@ -160,7 +159,6 @@ cliTest(
|
||||
"directory",
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(analyzed.exitCode, analyzed.stderr).toBe(0);
|
||||
const application = toolContract(
|
||||
@@ -193,7 +191,6 @@ cliTest(
|
||||
);
|
||||
const traced = await cli.run({
|
||||
arguments: ["trace-javascript-semantics", request, "--json"],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(traced.exitCode, traced.stdout).toBe(0);
|
||||
const trace = javaScriptSemanticTraceResultSchema.parse(
|
||||
|
||||
@@ -19,7 +19,6 @@ cliTest(
|
||||
const cliResult = await driver.run({
|
||||
arguments: ["analyze-javascript-application", root, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(cliResult.exitCode, cliResult.stderr).toBe(0);
|
||||
const result = javascriptApplicationAnalysisResultSchema.parse(
|
||||
|
||||
@@ -591,7 +591,7 @@ cliTest(
|
||||
|
||||
const result = await analyzeJavaScriptDirectory(
|
||||
"CLI",
|
||||
{ run: (invocation) => cli.run({ ...invocation, timeoutMs: 20_000 }) },
|
||||
{ run: (invocation) => cli.run({ ...invocation }) },
|
||||
root,
|
||||
);
|
||||
expect(result.statistics.parse_failures).toBe(0);
|
||||
|
||||
@@ -39,11 +39,9 @@ cliTest.for(["CLI", "stdio MCP"] as const)(
|
||||
"console.log(JSON.stringify([a, b, c, d, first.length, rest.length, mixed.length]));",
|
||||
].join("\n"),
|
||||
});
|
||||
const control = await processes.run(
|
||||
process.execPath,
|
||||
[join(root, "entry.mts")],
|
||||
{ timeoutMs: 15_000 },
|
||||
);
|
||||
const control = await processes.run(process.execPath, [
|
||||
join(root, "entry.mts"),
|
||||
]);
|
||||
expect(control.exitCode, control.stderr).toBe(0);
|
||||
expect(JSON.parse(control.stdout)).toEqual([
|
||||
7,
|
||||
|
||||
@@ -25,7 +25,6 @@ cliTest(
|
||||
const cliResult = await driver.run({
|
||||
arguments: ["inspect-artifact", leftPath, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(cliResult.exitCode, cliResult.stderr).toBe(0);
|
||||
const cliEvidence = parseEvidence(JSON.parse(cliResult.stdout));
|
||||
|
||||
@@ -23,7 +23,6 @@ cliTest(
|
||||
const result = await driver.run({
|
||||
arguments: ["inspect-artifact", path, "--detail", "complete", "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const inspection = artifactInspectionResultSchema.parse(
|
||||
|
||||
@@ -39,7 +39,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
"--json",
|
||||
],
|
||||
environment: { BROWSER_FIXTURE_SECRET: secret },
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(response.exitCode, response.stdout + response.stderr).toBe(1);
|
||||
expect(response.stdout).not.toContain(secret);
|
||||
|
||||
@@ -47,7 +47,6 @@ cliTest(
|
||||
"--total-analysis-timeout-ms",
|
||||
"1",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(
|
||||
interrupted.exitCode,
|
||||
@@ -74,7 +73,6 @@ cliTest(
|
||||
|
||||
const recovered = await cli.run({
|
||||
arguments: baseArguments,
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(recovered.exitCode, recovered.stdout + recovered.stderr).toBe(0);
|
||||
expect(recovered.json).toMatchObject({
|
||||
|
||||
@@ -46,7 +46,6 @@ cliTest.for([
|
||||
const result = await cli.run({
|
||||
arguments: ["capture-browser-scenario", path, "--json"],
|
||||
environment: { HOME: home, REA_LOG_LEVEL: "silent" },
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject(expected);
|
||||
|
||||
@@ -30,7 +30,6 @@ cliTest(
|
||||
"30000",
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 55_000,
|
||||
});
|
||||
// Analysis retains the interrupted file rather than failing the command.
|
||||
expect(response.exitCode, `${response.stdout}\n${response.stderr}`).toBe(0);
|
||||
|
||||
@@ -29,7 +29,6 @@ cliTest(
|
||||
}),
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(unpublished.exitCode, unpublished.stderr).toBe(1);
|
||||
expect(unpublished.json).toMatchObject({
|
||||
@@ -60,7 +59,6 @@ cliTest(
|
||||
bundle,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(analyzed.exitCode, analyzed.stderr).toBe(0);
|
||||
const request = (fields?: readonly string[]) =>
|
||||
|
||||
@@ -66,7 +66,6 @@ for (const { jarConfigured, setting } of [
|
||||
const cliResult = await cli.run({
|
||||
arguments: ["inspect-android-package", apk, "--json"],
|
||||
environment,
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
expect(cliResult.exitCode).toBe(1);
|
||||
expect(cliResult.json).toMatchObject({ code: "capability_unavailable" });
|
||||
@@ -91,7 +90,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
const cliResult = await cli.run({
|
||||
arguments: ["inspect-android-package", apk, "--json"],
|
||||
environment: { REA_LOG_LEVEL: "silent", ...environment },
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
expect(cliResult.exitCode).toBe(1);
|
||||
const client = await connect({ REA_LOG_LEVEL: "silent", ...environment });
|
||||
@@ -146,7 +144,6 @@ cliTest.skipIf(process.platform !== "linux")(
|
||||
const cliResult = await cli.run({
|
||||
arguments: ["inspect-firmware-regions", path, "--json"],
|
||||
environment,
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
expect(cliResult.exitCode).toBe(1);
|
||||
expect(cliResult.json).toMatchObject({ code: "capability_unavailable" });
|
||||
@@ -172,7 +169,6 @@ cliTest.skipIf(process.platform !== "linux")(
|
||||
arguments: ["inspect-firmware-regions", "input.bin", "--json"],
|
||||
cwd: root,
|
||||
environment: { REA_LOG_LEVEL: "silent" },
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
// A relative path must pass input validation and reach the provider,
|
||||
// which reports the missing firmware engine — not a validation error.
|
||||
@@ -199,7 +195,6 @@ cliTest(
|
||||
"--json",
|
||||
],
|
||||
environment,
|
||||
timeoutMs: 10000,
|
||||
});
|
||||
expect(cliResult.exitCode).toBe(1);
|
||||
expect(cliResult.json).toMatchObject({ code: "capability_unavailable" });
|
||||
@@ -239,7 +234,6 @@ cliTest(
|
||||
"--json",
|
||||
],
|
||||
environment,
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
const response = await client.callTool({
|
||||
name: "recover_javascript_sources",
|
||||
|
||||
@@ -60,7 +60,6 @@ cliTest.skipIf(missingNative)(
|
||||
const success = await cli.run({
|
||||
arguments: ["inspect-pcap-capture", single, "--json"],
|
||||
environment: environmentFor(root),
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(success.exitCode, success.stderr).toBe(0);
|
||||
expect(success.stdout.includes(credential)).toBe(false);
|
||||
@@ -78,7 +77,6 @@ cliTest.skipIf(missingNative)(
|
||||
const failed = await cli.run({
|
||||
arguments: ["inspect-pcap-capture", many, "--json"],
|
||||
environment: environmentFor(root),
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(failed.exitCode, failed.stderr).toBe(1);
|
||||
expect(failed.stdout.includes(credential)).toBe(false);
|
||||
|
||||
@@ -132,7 +132,6 @@ test.for(["target", "loader"] as const)(
|
||||
const result = await cli.run({
|
||||
arguments: ["analyze", target, "--provider", "hopper", "--json"],
|
||||
environment,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -223,7 +222,6 @@ test("recovers a denied Hopper launch through the same stdio MCP session and CLI
|
||||
const deniedCli = await cli.run({
|
||||
arguments: ["analyze", target, "--provider", "hopper", "--json"],
|
||||
environment,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(deniedCli.exitCode).toBe(1);
|
||||
expect(deniedCli.json).toMatchObject({
|
||||
|
||||
@@ -160,7 +160,6 @@ cliTest(
|
||||
const result = await driver.run({
|
||||
arguments: ["inspect-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const inspection = artifactInspectionResultSchema.parse(
|
||||
@@ -328,7 +327,6 @@ cliTest(
|
||||
const result = await driver.run({
|
||||
arguments: ["extract-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const extraction = artifactExtractionResultSchema.parse(
|
||||
@@ -392,7 +390,6 @@ cliTest(
|
||||
const result = await driver.run({
|
||||
arguments: ["inspect-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const inspection = artifactInspectionResultSchema.parse(
|
||||
@@ -445,7 +442,6 @@ cliTest(
|
||||
const result = await driver.run({
|
||||
arguments: ["inspect-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const inspection = artifactInspectionResultSchema.parse(
|
||||
@@ -473,7 +469,6 @@ cliTest(
|
||||
const result = await driver.run({
|
||||
arguments: ["extract-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const extracted = artifactExtractionResultSchema.parse(
|
||||
@@ -536,7 +531,6 @@ cliTest(
|
||||
const inspectResult = await driver.run({
|
||||
arguments: ["inspect-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(inspectResult.exitCode, inspectResult.stderr).toBe(0);
|
||||
const inspection = artifactInspectionResultSchema.parse(
|
||||
@@ -610,7 +604,6 @@ cliTest(
|
||||
const extractResult = await driver.run({
|
||||
arguments: ["extract-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(extractResult.exitCode, extractResult.stderr).toBe(0);
|
||||
const extracted = artifactExtractionResultSchema.parse(
|
||||
@@ -645,7 +638,6 @@ cliTest(
|
||||
const result = await driver.run({
|
||||
arguments: ["inspect-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const inspection = artifactInspectionResultSchema.parse(
|
||||
@@ -688,7 +680,6 @@ cliTest.for([
|
||||
const result = await driver.run({
|
||||
arguments: ["inspect-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const inspection = artifactInspectionResultSchema.parse(
|
||||
@@ -752,7 +743,6 @@ cliTest.for([
|
||||
const result = await driver.run({
|
||||
arguments: ["inspect-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
const inspection = artifactInspectionResultSchema.parse(
|
||||
@@ -800,7 +790,6 @@ cliTest(
|
||||
const result = await driver.run({
|
||||
arguments: ["inspect-artifact", path, "--json"],
|
||||
environment: process.env,
|
||||
timeoutMs: 15_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
|
||||
@@ -200,7 +200,6 @@ cliTest(
|
||||
arguments: [...args, "--json"],
|
||||
cwd: home,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const plan = await run(["setup", "--client", "dsh", "--dry-run"]);
|
||||
expect(plan.exitCode).toBe(0);
|
||||
|
||||
@@ -50,7 +50,6 @@ for (const version of ["1.1", "1.2"] as const) {
|
||||
HERMES_HOME: profile,
|
||||
HOPPER_LAUNCHER_PATH: process.execPath,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(removed.exitCode).toBe(0);
|
||||
expect(await readFile(config, "utf8")).toBe(original);
|
||||
@@ -84,7 +83,6 @@ for (const version of ["1.1", "1.2"] as const) {
|
||||
GHIDRA_INSTALL_DIR: ghidra,
|
||||
JAVA_HOME: java,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const setup = [
|
||||
"setup",
|
||||
@@ -166,7 +164,6 @@ cliTest("Hermes still registers into an explicit table", async ({ cli }) => {
|
||||
HERMES_HOME: profile,
|
||||
HOPPER_LAUNCHER_PATH: process.execPath,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(applied.exitCode).toBe(0);
|
||||
expect(applied.json).toMatchObject({ status: "ready" });
|
||||
@@ -209,7 +206,6 @@ for (const version of ["1.1", "1.2"] as const) {
|
||||
HERMES_HOME: profile,
|
||||
HOPPER_LAUNCHER_PATH: process.execPath,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(applied.exitCode).toBe(0);
|
||||
const configured = parse(await readFile(config, "utf8"), { version });
|
||||
@@ -237,7 +233,6 @@ cliTest(
|
||||
HERMES_HOME: profile,
|
||||
HOPPER_LAUNCHER_PATH: process.execPath,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const [command, ...args] = currentClientRegistrationCommand({
|
||||
entrypointPath: resolve("scripts/rea.mjs"),
|
||||
@@ -316,7 +311,6 @@ for (const original of [
|
||||
HERMES_HOME: profile,
|
||||
HOPPER_LAUNCHER_PATH: process.execPath,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(rejected.exitCode).not.toBe(0);
|
||||
expect(rejected.json).toMatchObject({
|
||||
|
||||
@@ -23,7 +23,6 @@ const cliLifecycle = (cli: TestCli, home: string, profile: string) => {
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment: { HOME: home, USERPROFILE: home, HERMES_HOME: profile },
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const setup = [
|
||||
"setup",
|
||||
|
||||
@@ -61,7 +61,6 @@ for (const [version, keyStyle] of [
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment: { USERPROFILE: home, HERMES_HOME: profile },
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const setup = [
|
||||
"setup",
|
||||
@@ -141,7 +140,6 @@ cliTest(
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment: { USERPROFILE: home, HERMES_HOME: profile },
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const setup = ["setup", "--client", "hermes", "--skill=false", "--json"];
|
||||
const preview = await run([...setup, "--dry-run"]);
|
||||
@@ -223,7 +221,6 @@ cliTest(
|
||||
REA_CLIENT_PROFILE_HOME: home,
|
||||
HERMES_HOME: " ${REA_CLIENT_PROFILE_HOME}/profile ",
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const planned = await run([
|
||||
"setup",
|
||||
@@ -333,7 +330,6 @@ for (const selection of ["default", "custom", "suffix", "explicit"] as const) {
|
||||
? root
|
||||
: undefined,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const plan = await run([
|
||||
"setup",
|
||||
@@ -468,7 +464,6 @@ for (const selection of [
|
||||
LOCALAPPDATA: join(home, "AppData", "Local"),
|
||||
HERMES_HOME: root,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
if (selection === "missing") {
|
||||
expect(plan.exitCode).toBe(1);
|
||||
@@ -573,7 +568,6 @@ for (const layout of ["symlinked-default", "escaping-prefix"] as const) {
|
||||
LOCALAPPDATA: join(home, "AppData", "Local"),
|
||||
HERMES_HOME: root,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(plan.exitCode, plan.stdout).toBe(0);
|
||||
expect(plan.json).toMatchObject({
|
||||
@@ -650,7 +644,6 @@ for (const name of ["missing", "deleted", "ghost", "../escape", "root"]) {
|
||||
arguments: args,
|
||||
cwd: home,
|
||||
environment: { USERPROFILE: home, HERMES_HOME: root },
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const rejected = await run([
|
||||
"setup",
|
||||
@@ -720,7 +713,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
HERMES_HOME: "$REA_HERMES_PROFILE",
|
||||
REA_HERMES_PROFILE: override,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const planned = await run([
|
||||
"setup",
|
||||
@@ -783,7 +775,6 @@ cliTest(
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment: { USERPROFILE: home, HERMES_HOME: override },
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const setup = await run(["setup", "--client", "hermes", "--yes", "--json"]);
|
||||
expect(setup.exitCode).not.toBe(0);
|
||||
|
||||
@@ -161,7 +161,6 @@ cliTest.skipIf(process.platform === "win32").for([
|
||||
XDG_CONFIG_HOME: join(home, ".config"),
|
||||
PATH: process.env.PATH ?? "",
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
|
||||
const setup = await run(registered, [
|
||||
@@ -296,7 +295,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
XDG_CONFIG_HOME: join(home, ".config"),
|
||||
PATH: process.env.PATH ?? "",
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
const uninstall = await run(["uninstall", "--json"]);
|
||||
expect(uninstall.exitCode, uninstall.stderr).toBe(0);
|
||||
|
||||
@@ -34,7 +34,6 @@ for (const [variable, profile] of [
|
||||
PI_CODING_AGENT_DIR: agent,
|
||||
[variable]: profile,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
for (const option of ["--dry-run", "--yes"]) {
|
||||
const rejected = await run(
|
||||
@@ -101,7 +100,6 @@ cliTest(
|
||||
OMP_PROFILE: " ",
|
||||
PI_PROFILE: "Bad Name",
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(0);
|
||||
expect(result.json).toMatchObject({ status: "ready" });
|
||||
|
||||
@@ -138,7 +138,6 @@ cliTest(
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(applied.exitCode).toBe(0);
|
||||
expect(applied.json).toMatchObject({
|
||||
@@ -193,7 +192,6 @@ cliTest(
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(repeated.exitCode).toBe(0);
|
||||
expect(repeated.json).toMatchObject({
|
||||
@@ -232,7 +230,6 @@ cliTest(
|
||||
PI_PROFILE: "legacy",
|
||||
PI_CONFIG_DIR: ".omp-other",
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
|
||||
const planned = await run([
|
||||
@@ -345,7 +342,6 @@ cliTest(
|
||||
HOPPER_LAUNCHER_PATH: join(home, "unconfigured-hopper"),
|
||||
PI_CODING_AGENT_DIR: "custom-agent",
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const run = runIn(created);
|
||||
const setup = await run(["setup", "--client", "pi", "--yes", "--json"]);
|
||||
@@ -456,7 +452,6 @@ cliTest(
|
||||
PI_CODING_AGENT_DIR: "file:///agent%2fdir",
|
||||
REA_DARWIN_MODULE_CACHE_PATH: moduleCache,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const plan = await run([
|
||||
"setup",
|
||||
|
||||
@@ -46,7 +46,6 @@ cliTest(
|
||||
cli.run({
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
timeoutMs: 20_000,
|
||||
environment: {
|
||||
USERPROFILE: home,
|
||||
PATH: [
|
||||
|
||||
@@ -36,7 +36,6 @@ cliTest(
|
||||
"--json",
|
||||
],
|
||||
environment,
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode, result.stdout + result.stderr).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
|
||||
@@ -43,7 +43,6 @@ cliTest(
|
||||
// This single CLI invocation cannot reuse a newly written cache.
|
||||
NODE_DISABLE_COMPILE_CACHE: "1",
|
||||
},
|
||||
timeoutMs: 15000,
|
||||
});
|
||||
expect(cliResponse.exitCode, cliResponse.stdout + cliResponse.stderr).toBe(
|
||||
0,
|
||||
|
||||
@@ -72,7 +72,6 @@ const expectCliSourceLocationSummary = async (
|
||||
const { bundlePath, evidenceId, sha256 } = expected;
|
||||
const missingSink = await cli.run({
|
||||
arguments: [...arguments_, "--detail", "summary"],
|
||||
timeoutMs: 45000,
|
||||
});
|
||||
expect(missingSink.exitCode).toBe(1);
|
||||
expect(missingSink.json).toMatchObject({
|
||||
@@ -87,7 +86,6 @@ const expectCliSourceLocationSummary = async (
|
||||
"--evidence_output",
|
||||
bundlePath,
|
||||
],
|
||||
timeoutMs: 45000,
|
||||
});
|
||||
expect(summary.exitCode, summary.stderr).toBe(0);
|
||||
expect(summary.stdout.length).toBeLessThan(30000);
|
||||
@@ -217,7 +215,6 @@ cliTest(
|
||||
REA_BROWSER_EXECUTABLE: "relative-unconfigured-browser",
|
||||
CLANG_MODULE_CACHE_PATH: map,
|
||||
},
|
||||
timeoutMs: 45000,
|
||||
});
|
||||
expect(response.exitCode, response.stdout + response.stderr).toBe(0);
|
||||
expect(response.json).toMatchObject({
|
||||
@@ -315,7 +312,6 @@ cliTest(
|
||||
"--json",
|
||||
],
|
||||
environment: { REA_LOG_LEVEL: "silent" },
|
||||
timeoutMs: 45000,
|
||||
});
|
||||
expect(invalid.exitCode).toBe(1);
|
||||
expectInvalidSourceLocation(
|
||||
@@ -372,7 +368,6 @@ cliTest(
|
||||
REA_LOG_LEVEL: "silent",
|
||||
REA_BROWSER_EXECUTABLE: "relative-unconfigured-browser",
|
||||
},
|
||||
timeoutMs: 45_000,
|
||||
});
|
||||
const response = await call("trace_web_source_location", {
|
||||
manifest_path: manifest,
|
||||
@@ -491,7 +486,6 @@ cliTest(
|
||||
"--json",
|
||||
],
|
||||
environment: { REA_LOG_LEVEL: "silent" },
|
||||
timeoutMs: 45_000,
|
||||
});
|
||||
const response = await call("trace_web_source_location", {
|
||||
manifest_path: manifest,
|
||||
@@ -578,7 +572,6 @@ cliTest(
|
||||
REA_LOG_LEVEL: "silent",
|
||||
REA_BROWSER_EXECUTABLE: "relative-unconfigured-browser",
|
||||
},
|
||||
timeoutMs: 45_000,
|
||||
});
|
||||
expect(result.exitCode, result.stdout + result.stderr).toBe(0);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -649,7 +642,6 @@ cliTest(
|
||||
];
|
||||
const refused = await cli.run({
|
||||
arguments: [...args, "--source-map-bytes", "128"],
|
||||
timeoutMs: 45000,
|
||||
});
|
||||
expect(refused.exitCode).toBe(1);
|
||||
expect((refused.json as { code?: unknown }).code).toBe("truncated");
|
||||
@@ -665,7 +657,6 @@ cliTest(
|
||||
"--source-map-bytes",
|
||||
String(Buffer.byteLength(fixture.sourceMap.text)),
|
||||
],
|
||||
timeoutMs: 45000,
|
||||
});
|
||||
expect(recovered.exitCode, recovered.stderr).toBe(0);
|
||||
expect(recovered.json).toMatchObject({
|
||||
@@ -721,7 +712,6 @@ cliTest(
|
||||
];
|
||||
const refused = await cli.run({
|
||||
arguments: [...arguments_, "--source-map-bytes", "4194304"],
|
||||
timeoutMs: 45000,
|
||||
});
|
||||
expect(refused.exitCode).toBe(1);
|
||||
expect(JSON.stringify(refused.json)).toContain(
|
||||
@@ -729,7 +719,6 @@ cliTest(
|
||||
);
|
||||
const completed = await cli.run({
|
||||
arguments: arguments_,
|
||||
timeoutMs: 45000,
|
||||
});
|
||||
expect(completed.exitCode, completed.stderr).toBe(0);
|
||||
const evidence = completed.json as {
|
||||
|
||||
@@ -7,19 +7,15 @@ for (const kind of ["proxy", "workers", "storage"] as const) {
|
||||
processTest(
|
||||
`${kind} HTTP fixture preserves targets and survives invalid requests`,
|
||||
async ({ processes }) => {
|
||||
const result = await processes.run(
|
||||
process.execPath,
|
||||
[
|
||||
fileURLToPath(
|
||||
new URL(
|
||||
"../../fixtures/browserFixtureHttpTargets.mjs",
|
||||
import.meta.url,
|
||||
),
|
||||
const result = await processes.run(process.execPath, [
|
||||
fileURLToPath(
|
||||
new URL(
|
||||
"../../fixtures/browserFixtureHttpTargets.mjs",
|
||||
import.meta.url,
|
||||
),
|
||||
kind,
|
||||
],
|
||||
{ timeoutMs: 15_000 },
|
||||
);
|
||||
),
|
||||
kind,
|
||||
]);
|
||||
expect(result.signal, result.stderr).toBeNull();
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
expect(result.stderr).toBe("");
|
||||
|
||||
@@ -11,20 +11,16 @@ const hasNonLoopbackIpv4 = Object.values(networkInterfaces())
|
||||
processTest.skipIf(!hasNonLoopbackIpv4)(
|
||||
"storage fixture serves localhost and refuses this host's non-loopback interface",
|
||||
async ({ processes }) => {
|
||||
const result = await processes.run(
|
||||
process.execPath,
|
||||
[
|
||||
fileURLToPath(
|
||||
new URL(
|
||||
"../../fixtures/browserFixtureHttpTargets.mjs",
|
||||
import.meta.url,
|
||||
),
|
||||
const result = await processes.run(process.execPath, [
|
||||
fileURLToPath(
|
||||
new URL(
|
||||
"../../fixtures/browserFixtureHttpTargets.mjs",
|
||||
import.meta.url,
|
||||
),
|
||||
"storage",
|
||||
"listener-scope",
|
||||
],
|
||||
{ timeoutMs: 15_000 },
|
||||
);
|
||||
),
|
||||
"storage",
|
||||
"listener-scope",
|
||||
]);
|
||||
expect(result.signal, result.stderr).toBeNull();
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
expect(result.stderr).toBe("");
|
||||
|
||||
@@ -73,7 +73,6 @@ processTest(
|
||||
["--input-type=module", "--eval", source],
|
||||
{
|
||||
env: { ...process.env, REA_BROWSER_EXECUTABLE: "fixture-chrome" },
|
||||
timeoutMs: 15_000,
|
||||
},
|
||||
);
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
|
||||
@@ -3774,7 +3774,7 @@ const runNode = async (
|
||||
const result = await processes.run(
|
||||
process.execPath,
|
||||
[...nodeArguments, ...(preloadHook ? ["-r", hook] : []), script],
|
||||
{ cwd: root, env: process.env, timeoutMs: 10_000 },
|
||||
{ cwd: root, env: process.env },
|
||||
);
|
||||
return {
|
||||
code: result.exitCode,
|
||||
|
||||
@@ -90,7 +90,6 @@ cliTest(
|
||||
|
||||
const fromCli = await cli.run({
|
||||
arguments: ["inspect-web-network-capture", path, "har", "--json"],
|
||||
timeoutMs: 120_000,
|
||||
});
|
||||
expect(fromCli.exitCode).toBe(0);
|
||||
const cliSummary = summarize(fromCli.json);
|
||||
|
||||
@@ -29,7 +29,6 @@ cliTest(
|
||||
arguments: ["mcp", "add", "--agent=amp", ...options, "--json"],
|
||||
cwd: root,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const settingsPath = ampSettings(home);
|
||||
const original = JSON.stringify(
|
||||
@@ -133,7 +132,6 @@ cliTest(
|
||||
arguments: ["mcp", "add", "--agent", "amp", "--json"],
|
||||
cwd: root,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(rejected.exitCode, rejected.stderr).toBe(1);
|
||||
expect(mcpRegistrationReportSchema.parse(rejected.json)).toMatchObject({
|
||||
|
||||
@@ -293,7 +293,6 @@ describe("CLI output flag value forms", () => {
|
||||
]) {
|
||||
const result = await cli.run({
|
||||
arguments: [...filter, "providers", "--json"],
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(0);
|
||||
expect(JSON.parse(result.stdout)).toEqual({});
|
||||
@@ -393,7 +392,6 @@ describe("unclosed CLI output filter slices", () => {
|
||||
"--filter-output",
|
||||
"result[0,1].name[",
|
||||
],
|
||||
timeoutMs: 3000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.stdout).toContain("INVALID_OUTPUT_FILTER");
|
||||
@@ -402,7 +400,6 @@ describe("unclosed CLI output filter slices", () => {
|
||||
}
|
||||
const splitPath = await cli.run({
|
||||
arguments: ["providers", "--json", "--filter-output", "][,]"],
|
||||
timeoutMs: 3000,
|
||||
});
|
||||
expect(splitPath.exitCode).toBe(1);
|
||||
expect(splitPath.json).toMatchObject({
|
||||
@@ -422,7 +419,6 @@ describe("unclosed CLI output filter slices", () => {
|
||||
"--filter-output",
|
||||
"capabilities[0,1].provider.id,open",
|
||||
],
|
||||
timeoutMs: 3000,
|
||||
});
|
||||
expect(result.exitCode).toBe(0);
|
||||
expect(result.json).toEqual({
|
||||
|
||||
@@ -365,7 +365,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
XDG_DATA_HOME: join(home, ".local", "share"),
|
||||
XDG_CACHE_HOME: join(home, ".cache"),
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
|
||||
const planned = await setup("--dry-run");
|
||||
|
||||
@@ -306,7 +306,6 @@ cliTest(
|
||||
XDG_CONFIG_HOME: join(root, "xdg-config"),
|
||||
XDG_CACHE_HOME: join(root, "xdg-cache"),
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
@@ -352,7 +351,6 @@ for (const group of groups) {
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const planned = await run([
|
||||
"setup",
|
||||
@@ -470,7 +468,6 @@ cliTest("uninstall names each retained skill directory", async ({ cli }) => {
|
||||
USERPROFILE: home,
|
||||
CLAUDE_CONFIG_DIR: join(home, ".claude"),
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
|
||||
@@ -33,7 +33,6 @@ cliTest(
|
||||
USERPROFILE: home,
|
||||
CLAUDE_CONFIG_DIR: "",
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const setup = (flags: readonly string[] = []) =>
|
||||
run(["setup", "--client", "claude_code", ...flags, "--json"]);
|
||||
@@ -151,7 +150,6 @@ for (const policy of [{ excluded: ["rea"] }, { allowed: ["other"] }]) {
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment: { HOME: home, USERPROFILE: home },
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const setup = await run([
|
||||
"setup",
|
||||
@@ -221,7 +219,6 @@ cliTest(
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment: { HOME: home, USERPROFILE: home },
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const before = await run(["doctor", "--client", "opencode", "--json"]);
|
||||
expect(before.exitCode).toBe(1);
|
||||
|
||||
@@ -49,7 +49,6 @@ cliTest(
|
||||
],
|
||||
cwd: f.home,
|
||||
environment: f.environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const first = await run();
|
||||
expect(first.exitCode, first.stderr).toBe(0);
|
||||
@@ -107,7 +106,6 @@ cliTest(
|
||||
arguments: ["mcp", "add", ...(json ? ["--json"] : [])],
|
||||
cwd: f.home,
|
||||
environment: f.environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
const document = report(result.stdout, json);
|
||||
@@ -142,7 +140,6 @@ cliTest(
|
||||
arguments: arguments_,
|
||||
cwd: f.home,
|
||||
environment: f.environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(result.exitCode, result.stdout).toBe(0);
|
||||
expect(await readFile(f.settings, "utf8")).toBe("broken JSON\n");
|
||||
@@ -167,7 +164,6 @@ cliTest(
|
||||
arguments: arguments_,
|
||||
cwd: f.home,
|
||||
environment: f.environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const registered = await run();
|
||||
expect(registered.exitCode, registered.stdout).toBe(0);
|
||||
@@ -235,7 +231,6 @@ cliTest(
|
||||
],
|
||||
cwd: f.home,
|
||||
environment: f.environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(result.exitCode, result.stdout).toBe(0);
|
||||
expect(report(result.stdout, true)).toMatchObject({
|
||||
@@ -265,7 +260,6 @@ cliTest(
|
||||
arguments: ["mcp", "add", ...options, "--json"],
|
||||
cwd: f.home,
|
||||
environment: f.environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
|
||||
@@ -91,7 +91,6 @@ cliTest.skipIf(!["darwin", "linux"].includes(process.platform))(
|
||||
"--json",
|
||||
],
|
||||
environment,
|
||||
timeoutMs: 45_000,
|
||||
});
|
||||
const report = z
|
||||
.object({ scope_checks: z.array(checkSchema) })
|
||||
@@ -152,7 +151,6 @@ cliTest.skipIf(!["darwin", "linux"].includes(process.platform))(
|
||||
"--json",
|
||||
],
|
||||
environment,
|
||||
timeoutMs: 45_000,
|
||||
});
|
||||
const report = z
|
||||
.object({ scope_checks: z.array(checkSchema) })
|
||||
@@ -183,7 +181,6 @@ cliTest.skipIf(!["darwin", "linux"].includes(process.platform))(
|
||||
...environment,
|
||||
REA_DOCKER_COMMAND: join(environment.HOME, "..", "bin", "docker"),
|
||||
},
|
||||
timeoutMs: 45_000,
|
||||
});
|
||||
|
||||
expect(result.exitCode, result.stderr).toBe(1);
|
||||
@@ -242,7 +239,6 @@ cliTest.skipIf(!["darwin", "linux"].includes(process.platform))(
|
||||
"--json",
|
||||
],
|
||||
environment,
|
||||
timeoutMs: 45_000,
|
||||
});
|
||||
|
||||
const plan = z
|
||||
|
||||
@@ -178,7 +178,6 @@ cliTest.skipIf(!["darwin", "linux"].includes(process.platform))(
|
||||
REA_HOPPER_TEST_MARKER: launchMarker,
|
||||
GHIDRA_INSTALL_DIR: join(home, "missing-ghidra"),
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
|
||||
const hopperReady = process.platform === "darwin";
|
||||
|
||||
@@ -75,7 +75,6 @@ const run = async (
|
||||
const result = await cli.run({
|
||||
arguments: [...arguments_, "--json"],
|
||||
environment,
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
return { result, report: reportSchema.safeParse(result.json) };
|
||||
};
|
||||
|
||||
@@ -44,7 +44,6 @@ cliTest.for([
|
||||
REA_FUSE_PROBE_TRACE: tracePath,
|
||||
REA_FUSE_PROBE_ALLOW: join(root, "allow"),
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
},
|
||||
);
|
||||
const trace = (await readFile(tracePath, "utf8"))
|
||||
|
||||
@@ -59,7 +59,6 @@ cliTest(
|
||||
"--json",
|
||||
],
|
||||
cwd: root,
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(built.exitCode, built.stderr).toBe(0);
|
||||
expect(built.json).toMatchObject({
|
||||
@@ -111,7 +110,6 @@ cliTest(
|
||||
join(root, "three-step"),
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(exported.exitCode, exported.stderr).toBe(0);
|
||||
|
||||
@@ -178,7 +176,6 @@ cliTest(
|
||||
"--capture-timeout-ms=030000",
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(planned.exitCode, planned.stderr).toBe(0);
|
||||
expect(planned.json).toMatchObject({
|
||||
@@ -231,7 +228,6 @@ cliTest(
|
||||
|
||||
const noDirectory = await cli.run({
|
||||
arguments: ["environment-build", har, "--json"],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(noDirectory.exitCode).toBe(1);
|
||||
expect(noDirectory.json).toMatchObject({
|
||||
@@ -265,7 +261,6 @@ cliTest.for(["--dry-run=abc", "--dry-run="] as const)(
|
||||
await writeFile(har, JSON.stringify(environmentManifestHar()));
|
||||
const result = await cli.run({
|
||||
arguments: ["environment-build", har, output, dryRun, "--json"],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(result.exitCode).not.toBe(0);
|
||||
expect(`${result.stdout}\n${result.stderr}`).toContain("--dry-run");
|
||||
@@ -284,7 +279,6 @@ cliTest.for(["--dry-run=true", "--dry-run=false"] as const)(
|
||||
await writeFile(har, JSON.stringify(environmentManifestHar()));
|
||||
const result = await cli.run({
|
||||
arguments: ["environment-build", har, output, dryRun, "--json"],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
expect(result.json).toMatchObject({
|
||||
|
||||
@@ -709,7 +709,6 @@ describe("rea environment-compare replay and chronology", () => {
|
||||
files.probe,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(0);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -737,7 +736,6 @@ describe("rea environment-compare replay and chronology", () => {
|
||||
files.manifest,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
|
||||
@@ -46,7 +46,6 @@ cliTest(
|
||||
NODE_OPTIONS: `--import=${preload} --max-old-space-size=768`,
|
||||
NODE_DISABLE_COMPILE_CACHE: "1",
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -93,7 +92,6 @@ cliTest(
|
||||
name,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -123,7 +121,6 @@ cliTest(
|
||||
directory,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.stderr).toBe("");
|
||||
expect(result.exitCode).toBe(0);
|
||||
@@ -211,7 +208,6 @@ cliTest(
|
||||
directory,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -253,7 +249,6 @@ cliTest(
|
||||
directory,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -290,7 +285,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
NODE_OPTIONS: `--import=${preload} --max-old-space-size=768`,
|
||||
NODE_DISABLE_COMPILE_CACHE: "1",
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
for (const relative of BUNDLE_FILES) {
|
||||
@@ -332,7 +326,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
packagePath,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -387,7 +380,6 @@ cliTest.skipIf(HOST_PATH_MAX[process.platform] === undefined)(
|
||||
directory,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
|
||||
@@ -46,7 +46,6 @@ for (const role of ["manifest", "evidence"] as const) {
|
||||
REA_TEST_EXPORT_READ_MARKER: marker,
|
||||
REA_TEST_EXPORT_READ_ACTION: "append",
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(await readFile(marker, "utf8")).toBe("read");
|
||||
expect(
|
||||
@@ -122,7 +121,6 @@ cliTest(
|
||||
REA_TEST_EXPORT_READ_MARKER: marker,
|
||||
REA_TEST_EXPORT_READ_ACTION: "record",
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(1);
|
||||
const limits = heapRefusalSchema.parse(result.json).details
|
||||
@@ -178,7 +176,6 @@ cliTest(
|
||||
REA_TEST_EXPORT_READ_MARKER: marker,
|
||||
REA_TEST_EXPORT_READ_ACTION: "fail-copy",
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(await readFile(marker, "utf8")).toBe("copy");
|
||||
expect(await readFile(tarball, "utf8")).toBe("admitted package");
|
||||
|
||||
@@ -41,7 +41,6 @@ describe("rea environment-serve refusals", () => {
|
||||
"0",
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -66,7 +65,6 @@ describe("rea environment-serve refusals", () => {
|
||||
const files = await writeEnvironmentServeFiles(root);
|
||||
const result = await cli.run({
|
||||
arguments: ["environment-serve", files.manifestPath, "--json"],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -97,7 +95,6 @@ describe("rea environment-serve refusals", () => {
|
||||
flag,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -121,7 +118,6 @@ describe("rea environment-serve refusals", () => {
|
||||
files.capturePath,
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -195,7 +191,6 @@ cliTest(
|
||||
"0",
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30000,
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
|
||||
@@ -37,7 +37,6 @@ const serve = async (
|
||||
String(port),
|
||||
"--json",
|
||||
],
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
return {
|
||||
exitCode: result.exitCode,
|
||||
|
||||
@@ -23,24 +23,22 @@ cliTest.skipIf(process.platform !== "darwin")(
|
||||
const directory = await createTestTempDirectory("rea-foreign-fat-cli-");
|
||||
const thin = join(directory, "thin");
|
||||
const universal = join(directory, "universal");
|
||||
const compiled = await processes.run(
|
||||
"/usr/bin/xcrun",
|
||||
[
|
||||
"clang",
|
||||
"-arch",
|
||||
foreign.name,
|
||||
resolve("tests/conformance/c/fixture.c"),
|
||||
"-o",
|
||||
thin,
|
||||
],
|
||||
{ timeoutMs: 30_000 },
|
||||
);
|
||||
const compiled = await processes.run("/usr/bin/xcrun", [
|
||||
"clang",
|
||||
"-arch",
|
||||
foreign.name,
|
||||
resolve("tests/conformance/c/fixture.c"),
|
||||
"-o",
|
||||
thin,
|
||||
]);
|
||||
expect(compiled.exitCode, compiled.stderr).toBe(0);
|
||||
const created = await processes.run(
|
||||
"/usr/bin/xcrun",
|
||||
["lipo", "-create", thin, "-output", universal],
|
||||
{ timeoutMs: 30_000 },
|
||||
);
|
||||
const created = await processes.run("/usr/bin/xcrun", [
|
||||
"lipo",
|
||||
"-create",
|
||||
thin,
|
||||
"-output",
|
||||
universal,
|
||||
]);
|
||||
expect(created.exitCode, created.stderr).toBe(0);
|
||||
|
||||
const result = await cli.run({
|
||||
|
||||
@@ -31,7 +31,6 @@ cliTest.for(["pipe", "capacity"] as const)(
|
||||
JAVA_HOME: join(root, "missing-jdk"),
|
||||
REA_LOG_LEVEL: "silent",
|
||||
},
|
||||
timeoutMs: 5000,
|
||||
});
|
||||
expect(result.exitCode, `${result.stdout}\n${result.stderr}`).toBe(1);
|
||||
expect(result.signal).toBeNull();
|
||||
|
||||
@@ -156,7 +156,6 @@ setTimeout(() => process.exit(92), 12000);
|
||||
GHIDRA_INSTALL_DIR: install,
|
||||
REA_LOG_LEVEL: "silent",
|
||||
},
|
||||
timeoutMs: 15000,
|
||||
});
|
||||
// Capture the actual group while the selected process is alive; the PID
|
||||
// alone is never used as cleanup authority. Release is a private protocol.
|
||||
|
||||
@@ -147,7 +147,6 @@ describe.skipIf(process.platform === "win32")(
|
||||
{
|
||||
cwd: workspace,
|
||||
env,
|
||||
timeoutMs: 30_000,
|
||||
},
|
||||
);
|
||||
const checkoutReports = join(workspace, "reports", "rea");
|
||||
|
||||
@@ -79,7 +79,6 @@ cliTest(
|
||||
});
|
||||
const built = await cli.run({
|
||||
arguments: ["environment-build", har, "--dry-run", "--json"],
|
||||
timeoutMs: 60_000,
|
||||
});
|
||||
expect(built.exitCode, built.stdout + built.stderr).toBe(0);
|
||||
expect(built.json).toMatchObject({
|
||||
|
||||
@@ -54,7 +54,6 @@ describe("Hopper launcher failure through the one-shot CLI", () => {
|
||||
HOPPER_LOADER_ARGS_JSON: JSON.stringify(loaderArgs),
|
||||
REA_LOG_LEVEL: "silent",
|
||||
},
|
||||
timeoutMs: 45_000,
|
||||
});
|
||||
const retained = RetainedRuntime.safeParse(result.json);
|
||||
if (retained.success)
|
||||
|
||||
@@ -15,7 +15,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
const result = await cli.run({
|
||||
arguments: ["doctor", "--provider", "ida", "--json"],
|
||||
environment: { HOME: root, REA_IDA_MCP_CONFIG: registration },
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -64,7 +63,6 @@ cliTest.skipIf(process.platform !== "darwin").for([true, false])(
|
||||
const result = await cli.run({
|
||||
arguments: ["doctor", "--provider", "ida", "--json"],
|
||||
environment: { HOME: root, REA_IDA_MCP_CONFIG: registration },
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(usable ? 0 : 1);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -144,7 +142,6 @@ cliTest.for([
|
||||
const result = await cli.run({
|
||||
arguments: ["doctor", "--provider", "ida", "--json"],
|
||||
environment: { HOME: root, REA_IDA_MCP_CONFIG: path },
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(
|
||||
constraint === undefined ? 0 : 1,
|
||||
@@ -171,7 +168,6 @@ cliTest.for([
|
||||
const providers = await cli.run({
|
||||
arguments: ["providers", "--json"],
|
||||
environment: { HOME: root, REA_IDA_MCP_CONFIG: path },
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
expect(providers.exitCode, providers.stderr).toBe(0);
|
||||
expect(providers.json).toMatchObject({
|
||||
|
||||
@@ -58,7 +58,6 @@ describe("headless IDA timeout through the one-shot CLI", () => {
|
||||
REA_IDA_MCP_CONFIG: registration,
|
||||
REA_LOG_LEVEL: "silent",
|
||||
},
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
|
||||
expect(result.exitCode).toBe(1);
|
||||
|
||||
@@ -227,7 +227,6 @@ workspaceCliTest.for([
|
||||
REA_IDA_MCP_CONFIG: registration,
|
||||
REA_LOG_LEVEL: "silent",
|
||||
},
|
||||
timeoutMs: 15000,
|
||||
});
|
||||
expect(result.stderr).toBe("");
|
||||
expect(supervisor.database).toBeUndefined();
|
||||
|
||||
@@ -112,7 +112,7 @@ processTest.for([1_000, 16_000])(
|
||||
path,
|
||||
"--json",
|
||||
],
|
||||
{ cwd: root, timeoutMs: 30_000 },
|
||||
{ cwd: root },
|
||||
);
|
||||
expect(
|
||||
response.exitCode,
|
||||
|
||||
@@ -124,7 +124,6 @@ it.each(
|
||||
const result = await cli.run({
|
||||
arguments: argv,
|
||||
environment: { HOME: home, REA_JEB_MCP_URL: fixture.endpoint },
|
||||
timeoutMs: 10_000,
|
||||
});
|
||||
const output = JSON.parse(result.stdout);
|
||||
if (stage === "success") {
|
||||
|
||||
@@ -41,7 +41,6 @@ ${mutation}
|
||||
REA_KUNA_CACHE_DIR: join(root, "cache"),
|
||||
REA_LOG_LEVEL: "silent",
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const after = await readFile(executable);
|
||||
const afterHash = createHash("sha256").update(after).digest("hex");
|
||||
|
||||
@@ -212,7 +212,6 @@ cliTest(
|
||||
"md",
|
||||
"--full-output",
|
||||
],
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(markdown.exitCode, markdown.stderr).toBe(0);
|
||||
const renderer = await createMarkdownRenderer(root, { linkify: false });
|
||||
|
||||
@@ -19,7 +19,6 @@ cliTest(
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment,
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
const schema = await run([
|
||||
"mcp",
|
||||
@@ -110,7 +109,6 @@ cliTest(
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment,
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
const filtered = await run([
|
||||
"mcp",
|
||||
|
||||
@@ -23,7 +23,6 @@ cliTest("mcp add rejects valued options without a value", async ({ cli }) => {
|
||||
arguments: [...arguments_, "--json"],
|
||||
cwd: root,
|
||||
environment: await registrationEnvironment(selectedHome),
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
|
||||
for (const [flag, field] of [
|
||||
@@ -106,7 +105,6 @@ cliTest(
|
||||
arguments: [...arguments_, "--json"],
|
||||
cwd: root,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
|
||||
// Incur skips a stray word, so the registration used to succeed for a request
|
||||
@@ -178,7 +176,6 @@ cliTest(
|
||||
arguments: [...arguments_, "--json"],
|
||||
cwd: root,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
|
||||
// A stray word alongside a missing value: the message describes the missing
|
||||
@@ -223,7 +220,6 @@ cliTest(
|
||||
],
|
||||
cwd: project,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(1);
|
||||
expect(result.json).toMatchObject({
|
||||
|
||||
@@ -58,7 +58,6 @@ describe("Swift demangling CLI with line-terminator characters", () => {
|
||||
"--json",
|
||||
],
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(result.signal).toBeNull();
|
||||
expect(result.exitCode).toBe(1);
|
||||
@@ -76,7 +75,6 @@ describe("Swift demangling CLI with line-terminator characters", () => {
|
||||
const result = await cli.run({
|
||||
arguments: ["demangle-swift", "--json"],
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(result.signal).toBeNull();
|
||||
expect(result.exitCode).toBe(1);
|
||||
|
||||
@@ -31,11 +31,15 @@ describe.skipIf(process.platform !== "darwin")(
|
||||
const source = join(directory, "watch.c");
|
||||
await writeFile(source, "int rea_watch_value(void) { return 42; }\n");
|
||||
const object = join(directory, "watch.o");
|
||||
const compiled = await processes.run(
|
||||
"/usr/bin/xcrun",
|
||||
["clang", "-arch", "arm64_32", "-c", source, "-o", object],
|
||||
{ timeoutMs: 30_000 },
|
||||
);
|
||||
const compiled = await processes.run("/usr/bin/xcrun", [
|
||||
"clang",
|
||||
"-arch",
|
||||
"arm64_32",
|
||||
"-c",
|
||||
source,
|
||||
"-o",
|
||||
object,
|
||||
]);
|
||||
expect(compiled.exitCode, compiled.stderr).toBe(0);
|
||||
for (const command of [
|
||||
"list-architectures",
|
||||
|
||||
@@ -20,18 +20,14 @@ describe.skipIf(process.platform !== "darwin")(
|
||||
const source = join(directory, "library.c");
|
||||
const library = join(directory, "libprobe.dylib");
|
||||
await writeFile(source, "int exported_value(void) { return 42; }\n");
|
||||
const compiled = await processes.run(
|
||||
"/usr/bin/xcrun",
|
||||
[
|
||||
"clang",
|
||||
"-dynamiclib",
|
||||
source,
|
||||
"-Wl,-install_name,@rpath/libprobe.dylib",
|
||||
"-o",
|
||||
library,
|
||||
],
|
||||
{ timeoutMs: 30_000 },
|
||||
);
|
||||
const compiled = await processes.run("/usr/bin/xcrun", [
|
||||
"clang",
|
||||
"-dynamiclib",
|
||||
source,
|
||||
"-Wl,-install_name,@rpath/libprobe.dylib",
|
||||
"-o",
|
||||
library,
|
||||
]);
|
||||
expect(compiled.exitCode, compiled.stderr).toBe(0);
|
||||
const result = await cli.run({
|
||||
arguments: ["inspect-macho", library, "--json"],
|
||||
@@ -54,11 +50,12 @@ describe.skipIf(process.platform !== "darwin")(
|
||||
|
||||
// One architecture can still have a FAT container header.
|
||||
const universal = join(directory, "libprobe-universal.dylib");
|
||||
const combined = await processes.run(
|
||||
"/usr/bin/lipo",
|
||||
["-create", library, "-output", universal],
|
||||
{ timeoutMs: 30_000 },
|
||||
);
|
||||
const combined = await processes.run("/usr/bin/lipo", [
|
||||
"-create",
|
||||
library,
|
||||
"-output",
|
||||
universal,
|
||||
]);
|
||||
expect(combined.exitCode, combined.stderr).toBe(0);
|
||||
const fatResult = await cli.run({
|
||||
arguments: ["inspect-macho", universal, "--json"],
|
||||
|
||||
@@ -52,20 +52,16 @@ describe.skipIf(process.platform !== "darwin")(
|
||||
"rea-native-cli-echo-",
|
||||
);
|
||||
const fixture = join(directory, "fat-fixture");
|
||||
const compiled = await processes.run(
|
||||
"/usr/bin/xcrun",
|
||||
[
|
||||
"clang",
|
||||
"-arch",
|
||||
"arm64",
|
||||
"-arch",
|
||||
"x86_64",
|
||||
resolve("tests/conformance/c/fixture.c"),
|
||||
"-o",
|
||||
fixture,
|
||||
],
|
||||
{ timeoutMs: 30_000 },
|
||||
);
|
||||
const compiled = await processes.run("/usr/bin/xcrun", [
|
||||
"clang",
|
||||
"-arch",
|
||||
"arm64",
|
||||
"-arch",
|
||||
"x86_64",
|
||||
resolve("tests/conformance/c/fixture.c"),
|
||||
"-o",
|
||||
fixture,
|
||||
]);
|
||||
expect(compiled.exitCode, compiled.stderr).toBe(0);
|
||||
const inspect = async (name: string) => {
|
||||
const path = join(directory, name);
|
||||
|
||||
@@ -37,9 +37,7 @@ describe.skipIf(process.platform !== "darwin")(
|
||||
const fat = join(directory, "fat_enc");
|
||||
await writeFile(source, "int main(void) { return 0; }\n");
|
||||
const run = async (command: string, arguments_: string[]) => {
|
||||
const result = await processes.run(command, arguments_, {
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
const result = await processes.run(command, arguments_);
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
return result.stdout;
|
||||
};
|
||||
|
||||
@@ -28,11 +28,13 @@ describe.skipIf(process.platform !== "darwin")(
|
||||
"",
|
||||
].join("\n"),
|
||||
);
|
||||
const compiled = await processes.run(
|
||||
"/usr/bin/xcrun",
|
||||
["clang", "-c", source, "-o", object],
|
||||
{ timeoutMs: 30_000 },
|
||||
);
|
||||
const compiled = await processes.run("/usr/bin/xcrun", [
|
||||
"clang",
|
||||
"-c",
|
||||
source,
|
||||
"-o",
|
||||
object,
|
||||
]);
|
||||
expect(compiled.exitCode, compiled.stderr).toBe(0);
|
||||
const result = await cli.run({
|
||||
arguments: ["inspect-macho", object, "--json"],
|
||||
|
||||
@@ -58,9 +58,7 @@ describe.skipIf(process.platform !== "darwin")(
|
||||
["clang", "-o", control, source],
|
||||
["clang", "-c", source, "-o", object],
|
||||
]) {
|
||||
const compiled = await processes.run("/usr/bin/xcrun", arguments_, {
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
const compiled = await processes.run("/usr/bin/xcrun", arguments_);
|
||||
expect(compiled.exitCode, compiled.stderr).toBe(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,11 +20,13 @@ describe.skipIf(process.platform !== "darwin")(
|
||||
const source = join(directory, "qa.c");
|
||||
const object = join(directory, "qa.o");
|
||||
await writeFile(source, "int qa(void) { return 7; }\n");
|
||||
const compiled = await processes.run(
|
||||
"/usr/bin/xcrun",
|
||||
["clang", "-c", source, "-o", object],
|
||||
{ timeoutMs: 30_000 },
|
||||
);
|
||||
const compiled = await processes.run("/usr/bin/xcrun", [
|
||||
"clang",
|
||||
"-c",
|
||||
source,
|
||||
"-o",
|
||||
object,
|
||||
]);
|
||||
expect(compiled.exitCode, compiled.stderr).toBe(0);
|
||||
const result = await cli.run({
|
||||
arguments: ["inspect-macho", object, "--json"],
|
||||
|
||||
@@ -70,7 +70,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
const setup = await processes.run(npm.command, npm.arguments, {
|
||||
cwd: trusted,
|
||||
env: environment,
|
||||
timeoutMs: 30_000,
|
||||
});
|
||||
expect(setup.exitCode, setup.stderr).toBe(0);
|
||||
const configPath = join(home, ".omp", "agent", "mcp.json");
|
||||
@@ -160,7 +159,7 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
const missing = await processes.run(
|
||||
registration.command,
|
||||
registration.args,
|
||||
{ cwd: project, env: clientEnvironment, timeoutMs: 10_000 },
|
||||
{ cwd: project, env: clientEnvironment },
|
||||
);
|
||||
expect(missing.exitCode).not.toBe(0);
|
||||
await expect(access(marker)).rejects.toMatchObject({ code: "ENOENT" });
|
||||
@@ -192,7 +191,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
USERPROFILE: home,
|
||||
PATH: [bin, process.env.PATH ?? ""].join(delimiter),
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
},
|
||||
);
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
@@ -211,7 +209,7 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
const start = await processes.run(
|
||||
settings["amp.mcpServers"].rea.command,
|
||||
[alias, "--version"],
|
||||
{ cwd: home, timeoutMs: 10_000 },
|
||||
{ cwd: home },
|
||||
);
|
||||
expect(start.exitCode, start.stderr).toBe(0);
|
||||
expect(start.stdout).toContain(PRODUCT_IDENTITY.packageVersion);
|
||||
|
||||
@@ -75,7 +75,6 @@ for (const { runner, userAgent } of [
|
||||
arguments: arguments_,
|
||||
cwd: home,
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
const setup = await run([
|
||||
"setup",
|
||||
|
||||
@@ -28,7 +28,6 @@ cliTest.skipIf(process.platform === "win32").for(["blocked", "ready"] as const)(
|
||||
REA_KUNA_COMMAND: command,
|
||||
REA_KUNA_CACHE_DIR: cachePath,
|
||||
},
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
expect(result.json).toMatchObject({
|
||||
@@ -88,7 +87,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
const setup = await cli.run({
|
||||
arguments: ["setup", "--client", "claude_code", "--dry-run", "--json"],
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(setup.exitCode, setup.stdout).toBe(0);
|
||||
expect(setup.json).toMatchObject({
|
||||
@@ -111,7 +109,6 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
const doctor = await cli.run({
|
||||
arguments: ["doctor", "--json"],
|
||||
environment,
|
||||
timeoutMs: 20_000,
|
||||
});
|
||||
expect(doctor.json).toMatchObject({
|
||||
providerInspections: expect.arrayContaining([
|
||||
|
||||
@@ -130,15 +130,12 @@ cliTest.skipIf(process.platform === "win32")(
|
||||
const root = await createTestTempDirectory("rea-script-selection-cli-");
|
||||
const capturePath = join(root, "capture.pipe");
|
||||
const outputDirectory = join(root, "export");
|
||||
const created = await processes.run("mkfifo", [capturePath], {
|
||||
timeoutMs: 5_000,
|
||||
});
|
||||
const created = await processes.run("mkfifo", [capturePath]);
|
||||
expect(created.exitCode).toBe(0);
|
||||
|
||||
const response = await cli.run({
|
||||
arguments: ["export-web-scripts", capturePath, outputDirectory, "--json"],
|
||||
environment: { REA_LOG_LEVEL: "silent" },
|
||||
timeoutMs: 5_000,
|
||||
});
|
||||
expect(response.exitCode).toBe(1);
|
||||
expect(response.signal).toBeNull();
|
||||
|
||||
@@ -53,7 +53,6 @@ for (const [fixture, factory, ordinaryPath, malformedPath] of [
|
||||
["--input-type=module", "-e", program],
|
||||
{
|
||||
cwd: fileURLToPath(new URL("../../../", import.meta.url)),
|
||||
timeoutMs: 10_000,
|
||||
},
|
||||
);
|
||||
expect(result.signal, result.stderr).toBeNull();
|
||||
|
||||
@@ -116,7 +116,6 @@ it("keeps owned Gemini launcher facts separate from native connection admission
|
||||
process.execPath,
|
||||
["--import", "tsx", entrypoint],
|
||||
{
|
||||
timeoutMs: 20_000,
|
||||
env: {
|
||||
PATH: process.env.PATH,
|
||||
SystemRoot: process.env.SystemRoot,
|
||||
|
||||
@@ -249,7 +249,6 @@ for (const scenario of cases) {
|
||||
],
|
||||
{
|
||||
cwd: project,
|
||||
timeoutMs: 15_000,
|
||||
},
|
||||
);
|
||||
expect(result.signal, result.stderr).toBeNull();
|
||||
@@ -294,7 +293,7 @@ export const unnecessary = /\!/;
|
||||
"--fix",
|
||||
applicationSource,
|
||||
],
|
||||
{ cwd: project, timeoutMs: 15_000 },
|
||||
{ cwd: project },
|
||||
);
|
||||
expect(result.signal, result.stderr).toBeNull();
|
||||
expect(result.exitCode, result.stderr || result.stdout).toBe(0);
|
||||
|
||||
@@ -18,11 +18,11 @@ processTest.skipIf(process.platform === "win32")(
|
||||
import.meta.url,
|
||||
),
|
||||
);
|
||||
const result = await processes.run(
|
||||
process.execPath,
|
||||
[probe, readerModule, root],
|
||||
{ timeoutMs: 3_000 },
|
||||
);
|
||||
const result = await processes.run(process.execPath, [
|
||||
probe,
|
||||
readerModule,
|
||||
root,
|
||||
]);
|
||||
expect(result.exitCode, result.stderr).toBe(0);
|
||||
expect(result.stdout.trim()).toBe("changed");
|
||||
},
|
||||
|
||||
Loaded 100 of 131 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user