
























@@ -712,7 +712,13 @@ describe("runCodexAppServerSideQuestion", () => {
712712getSharedCodexAppServerClientMock.mockResolvedValue(client);
713713714714await expect(
715-runCodexAppServerSideQuestion(sideParams(), { nativeHookRelay: { enabled: true } }),
715+runCodexAppServerSideQuestion(
716+sideParams({
717+cfg: { tools: { loopDetection: { enabled: true } } } as never,
718+sessionKey: "agent:main:session-1",
719+}),
720+{ nativeHookRelay: { enabled: true } },
721+),
716722).rejects.toThrow("fork failed");
717723718724expect(relayIdDuringFork).toBeDefined();
@@ -738,7 +744,13 @@ describe("runCodexAppServerSideQuestion", () => {
738744getSharedCodexAppServerClientMock.mockResolvedValue(client);
739745740746await expect(
741-runCodexAppServerSideQuestion(sideParams(), { nativeHookRelay: { enabled: true } }),
747+runCodexAppServerSideQuestion(
748+sideParams({
749+cfg: { tools: { loopDetection: { enabled: true } } } as never,
750+sessionKey: "agent:main:session-1",
751+}),
752+{ nativeHookRelay: { enabled: true } },
753+),
742754).resolves.toEqual({ text: "Side answer." });
743755744756const forkParams = mockCall(client.request)[1] as Record<string, unknown> | undefined;
@@ -855,15 +867,21 @@ describe("runCodexAppServerSideQuestion", () => {
855867856868startedAtMs = Date.now();
857869await expect(
858-runCodexAppServerSideQuestion(sideParams(), {
859-pluginConfig: {
860-appServer: {
861- requestTimeoutMs,
862-turnCompletionIdleTimeoutMs: completionTimeoutMs,
870+runCodexAppServerSideQuestion(
871+sideParams({
872+cfg: { tools: { loopDetection: { enabled: true } } } as never,
873+sessionKey: "agent:main:session-1",
874+}),
875+{
876+pluginConfig: {
877+appServer: {
878+ requestTimeoutMs,
879+turnCompletionIdleTimeoutMs: completionTimeoutMs,
880+},
863881},
882+nativeHookRelay: { enabled: true },
864883},
865-nativeHookRelay: { enabled: true },
866-}),
884+),
867885).resolves.toEqual({ text: "Side answer." });
868886869887expect(relayIdDuringFork).toBeDefined();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。