Skip to content

Commit c374edf

Browse files
committed
test(codex): mirror raw reasoning event order
1 parent f62c33c commit c374edf

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

extensions/codex/src/app-server/run-attempt.test.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5653,7 +5653,7 @@ describe("runCodexAppServerAttempt", () => {
56535653
expect(harness.request.mock.calls.some(([method]) => method === "turn/interrupt")).toBe(false);
56545654
});
56555655

5656-
it("keeps waiting after raw reasoning completes before a visible message call", async () => {
5656+
it("keeps waiting after reasoning and its raw mirror complete before a visible message call", async () => {
56575657
const harness = createStartedThreadHarness();
56585658
const params = createParams(
56595659
path.join(tempDir, "session.jsonl"),
@@ -5670,6 +5670,22 @@ describe("runCodexAppServerAttempt", () => {
56705670
settled = true;
56715671
});
56725672
await harness.waitForMethod("turn/start");
5673+
await harness.notify({
5674+
method: "item/started",
5675+
params: {
5676+
threadId: "thread-1",
5677+
turnId: "turn-1",
5678+
item: { id: "reasoning-1", type: "reasoning" },
5679+
},
5680+
});
5681+
await harness.notify({
5682+
method: "item/completed",
5683+
params: {
5684+
threadId: "thread-1",
5685+
turnId: "turn-1",
5686+
item: { id: "reasoning-1", type: "reasoning" },
5687+
},
5688+
});
56735689
await harness.notify({
56745690
method: "rawResponseItem/completed",
56755691
params: {

0 commit comments

Comments
 (0)