Merge pull request #2587 from pikasTech/test/workbench-live-admission-no-outbox
Pipelines as Code CI / hwlab-nc01-v03-ci-poll- Success

test: 固定 direct Kafka admission 不依赖 outbox
This commit is contained in:
Lyon
2026-07-17 02:12:16 +08:00
committed by GitHub
+7 -1
View File
@@ -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, {