























@@ -5255,6 +5255,50 @@ describe("runCodexAppServerAttempt", () => {
52555255expect(queueActiveRunMessageForTest("session-1", "after silent turn")).toBe(false);
52565256});
525752575258+it("keeps waiting after reasoning completes before a visible message call", async () => {
5259+const harness = createStartedThreadHarness();
5260+const params = createParams(
5261+path.join(tempDir, "session.jsonl"),
5262+path.join(tempDir, "workspace"),
5263+);
5264+params.timeoutMs = 60_000;
5265+5266+let settled = false;
5267+const run = runCodexAppServerAttempt(params, {
5268+turnCompletionIdleTimeoutMs: 15,
5269+turnTerminalIdleTimeoutMs: 500,
5270+}).finally(() => {
5271+settled = true;
5272+});
5273+await harness.waitForMethod("turn/start");
5274+await harness.notify({
5275+method: "item/started",
5276+params: {
5277+threadId: "thread-1",
5278+turnId: "turn-1",
5279+item: { id: "reasoning-1", type: "reasoning" },
5280+},
5281+});
5282+await harness.notify({
5283+method: "item/completed",
5284+params: {
5285+threadId: "thread-1",
5286+turnId: "turn-1",
5287+item: { id: "reasoning-1", type: "reasoning" },
5288+},
5289+});
5290+5291+await new Promise((resolve) => setTimeout(resolve, 25));
5292+expect(settled).toBe(false);
5293+5294+await harness.completeTurn({ threadId: "thread-1", turnId: "turn-1" });
5295+const result = await run;
5296+expect(result.aborted).toBe(false);
5297+expect(result.timedOut).toBe(false);
5298+expect(result.promptError).toBeNull();
5299+expect(harness.request.mock.calls.some(([method]) => method === "turn/interrupt")).toBe(false);
5300+});
5301+52585302it("does not treat global rate-limit notifications as turn progress", async () => {
52595303const harness = createStartedThreadHarness();
52605304const params = createParams(
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。