Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("CodexAppServerSupervisor", () => {
it.skipIf(process.platform === "win32")("delivers a notification written right before the exit, then disposes", async () => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "codex-dying-"));
const script = path.join(dir, "codex");
fs.writeFileSync(script, `#!/usr/bin/env node
fs.writeFileSync(script, `#!${process.execPath}
process.stdout.write(JSON.stringify({method: "turn/completed", params: {threadId: "t", turn: {id: "u"}}}) + "\\n", () => process.exit(1));
`);
fs.chmodSync(script, 0o755);
Expand All @@ -66,7 +66,7 @@ process.stdout.write(JSON.stringify({method: "turn/completed", params: {threadId
it.skipIf(process.platform === "win32")("delivers a burst of output written before the exit, up to its last message", async () => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "codex-burst-"));
const script = path.join(dir, "codex");
fs.writeFileSync(script, `#!/usr/bin/env node
fs.writeFileSync(script, `#!${process.execPath}
let out = "";
for (let i = 0; i < 10000; i++) out += JSON.stringify({method: "item/agentMessage/delta", params: {threadId: "t", delta: "x"}}) + "\\n";
out += JSON.stringify({method: "turn/completed", params: {threadId: "t", turn: {id: "u"}}}) + "\\n";
Expand Down Expand Up @@ -96,7 +96,7 @@ process.stdout.write(out, () => process.exit(1));
it.skipIf(process.platform === "win32")("waits for a backlog that takes longer to handle than the close grace time", async () => {
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "codex-backlog-"));
const script = path.join(dir, "codex");
fs.writeFileSync(script, `#!/usr/bin/env node
fs.writeFileSync(script, `#!${process.execPath}
let out = "";
for (let i = 0; i < 2000; i++) out += JSON.stringify({method: "item/agentMessage/delta", params: {threadId: "t", delta: "x"}}) + "\\n";
out += JSON.stringify({method: "turn/completed", params: {threadId: "t", turn: {id: "u"}}}) + "\\n";
Expand Down