mirror of
https://github.com/morluto/rea.git
synced 2026-11-21 14:05:49 +00:00
239 literal timeoutMs values on cli.run and processes.run only restated a guess at host speed. On hosted runners with four workers, cliOutput's 3-second value failed while the command still produced correct output. Deadlines that are the behavior under test, derived from an operation budget, or that bound a regression's wait remain. Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
973 B
TypeScript
30 lines
973 B
TypeScript
import { fileURLToPath } from "node:url";
|
|
import { expect } from "vitest";
|
|
import { processTest } from "../../support/process/processFixture.js";
|
|
|
|
processTest.for([3, 130_000])(
|
|
"completes an authenticated inventory with %i child occurrences on the server stack",
|
|
async (count, { processes }) => {
|
|
// Thread-pool tests have a larger stack than the stdio server. Use a fresh
|
|
// main thread and enough heap for the ledger's conservative admission.
|
|
const result = await processes.run(process.execPath, [
|
|
"--max-old-space-size=4096",
|
|
"--import",
|
|
"tsx",
|
|
fileURLToPath(
|
|
new URL(
|
|
"../../fixtures/promptOccurrenceCompletion.ts",
|
|
import.meta.url,
|
|
),
|
|
),
|
|
String(count),
|
|
]);
|
|
expect(result.exitCode, result.stderr).toBe(0);
|
|
expect(JSON.parse(result.stdout)).toMatchObject({
|
|
values: Math.min(count + 1, 100),
|
|
total: count + 1,
|
|
hasMore: count + 1 > 100,
|
|
});
|
|
},
|
|
);
|