diff --git a/internal/cloud/server-agent-chat.test.ts b/internal/cloud/server-agent-chat.test.ts index 580dba2f..92538201 100644 --- a/internal/cloud/server-agent-chat.test.ts +++ b/internal/cloud/server-agent-chat.test.ts @@ -1883,7 +1883,7 @@ test("cloud api surfaces manager-side evicted-session recovery through Kafka pro } }); -test("cloud api AgentRun adapter maps minimax-m3 provider profile to AgentRun backend", async () => { +test("cloud api AgentRun adapter admits direct live Kafka turns without outbox promotion", async () => { const calls = []; const agentRunServer = createHttpServer(async (request, response) => { const url = new URL(request.url || "/", "http://127.0.0.1"); @@ -1972,6 +1972,11 @@ test("cloud api AgentRun adapter maps minimax-m3 provider profile to AgentRun ba })]]); const traceStore = createCodeAgentTraceStore(); const runtimeStore = createCloudRuntimeStore(); + let admissionPromotionCalls = 0; + runtimeStore.promoteWorkbenchTurnAdmission = async () => { + admissionPromotionCalls += 1; + throw new Error("direct live Kafka admission must not call the transactional outbox promotion store"); + }; const server = createCloudApiServer({ traceStore, runtimeStore, @@ -2031,6 +2036,7 @@ test("cloud api AgentRun adapter maps minimax-m3 provider profile to AgentRun ba const liveAdmission = await waitForTraceEvent(traceStore, traceId, (event) => event.label === "turn:admitted-live-kafka"); assert.equal(liveAdmission.waitingFor, "hwlab-live-kafka-sse"); + assert.equal(admissionPromotionCalls, 0); await waitForTraceEvent(traceStore, traceId, (event) => event.label === "agentrun:dispatch-intent:admitted"); await commitTestKafkaTerminal(runtimeStore, {