From 80c0b6c8f1b9c4799dc543578e81949b2023ca15 Mon Sep 17 00:00:00 2001 From: EdgeMLHacker <126883848+Apageoflove@users.noreply.github.com> Date: Fri, 20 Nov 2026 07:10:00 -0500 Subject: [PATCH] =?UTF-8?q?fix(minimax-bot):=20=E4=B8=80=E8=BD=AE=E9=87=8C?= =?UTF-8?q?=E6=B2=A1=E4=BA=BA=E8=AF=B4=E8=AF=9D=E6=97=B6=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E6=8A=8A=20[PASS]=20=E5=BD=93=E6=88=90=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../minimax-bot/.minimax-plugin/plugin.json | 2 +- plugins/minimax-ai/minimax-bot/README.md | 6 ++++ .../minimax-bot/miniapp/node/engine.mjs | 10 +++--- .../minimax-bot/miniapp/node/mcp.mjs | 2 +- plugins/minimax-ai/minimax-bot/package.json | 2 +- .../tests/engine-reliability.test.mjs | 35 +++++++++++++++++++ 6 files changed, 50 insertions(+), 7 deletions(-) diff --git a/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json b/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json index 7e5cc956..555b7cd3 100644 --- a/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json +++ b/plugins/minimax-ai/minimax-bot/.minimax-plugin/plugin.json @@ -2,7 +2,7 @@ "schemaVersion": 1, "name": "minimax-bot", "displayName": "MiniMax Bot", - "version": "0.7.32", + "version": "0.7.37", "description": "Turn MiniMax Code into an always-on team of Bots. A Chief Bot helps you build the team; in group chats the admin answers and @mentions hand work to other members. Every Bot has its own octopus avatar and memory, with scheduled tasks and usage stats.", "author": "MiniMax Code", "icon": "icon.png", diff --git a/plugins/minimax-ai/minimax-bot/README.md b/plugins/minimax-ai/minimax-bot/README.md index dcaf8d60..3e565a51 100644 --- a/plugins/minimax-ai/minimax-bot/README.md +++ b/plugins/minimax-ai/minimax-bot/README.md @@ -116,6 +116,12 @@ The hand-over between two Bots of a group carried the tail of the previous reply - Two writes the plugin fires and forgets had nothing to catch their failure: the session id recorded when a turn starts, and the scheduled-task scan that runs every 30 seconds. A failed write there became an unhandled rejection, and the Host fails the whole Mini App process on one of those — so a disk that would not take a write took every running turn with it, and the scheduled task kept retrying every 30 seconds. - Both now report the failure through the plugin log, the way the task save next to one of them already did. The turn carries on, and the scan keeps running. +## 0.7.37 A round of passes does not hand [PASS] back as its outcome + +- When a member of a group has nothing to add it replies `[PASS]` and is skipped. That turn was still kept as the round's result, so a discussion that ended on a pass reported `[PASS]` as what it produced. A group task opened from a private chat showed exactly that in its result line. +- It was worse when an earlier member had said something real: the last pass replaced the round's text with `[PASS]`, so the work that was actually done was dropped from the result and only the chat still had it. +- A pass is no longer kept as the round's result. The pass itself is still marked and still skipped, so nothing changes about who speaks; a round in which everybody passes now hands back nothing, and a round that ends on a pass keeps the last thing that was really said. + ## 0.7.10 Optional group notes - A group can keep a note of what it said. After every round the group records the closing lines of the replies, and every Bot of the group gets that record in its standing brief. diff --git a/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs b/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs index f5d28487..5e064f66 100644 --- a/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs +++ b/plugins/minimax-ai/minimax-bot/miniapp/node/engine.mjs @@ -1333,18 +1333,20 @@ export class Engine { const handover = this.handoverFor(fresh, noteRound); hops += 1; const result = await this.runBotTurn({ bot, chatId, text: '', kind: 'group', sourceMessageId, sourceMessageIds, signal: options.signal, taskId: options.taskId, handover }); - lastResult = result; accepted ||= result.accepted; if (result.status === 'aborted' && (options.signal?.aborted || loop.cancelled)) queue.unshift(botId); - if (result.safeToContinue === false) break; - // Resume this member's verification under the same task before advancing the group. - if (result.status === 'done' && result.waitingForTasks) break; + // A member that passed said nothing this round: it does not become the round's result. + // Every other turn does, whichever way the round ends next. if (result.status === 'done' && !result.pendingQuestion && PASS_RE.test(result.text)) { await this.store.updateMessage(chatId, result.messageId, { status: 'pass' }); const updated = (await this.store.getMessages(chatId)).find((m) => m.id === result.messageId); this.broadcast({ type: 'message.upsert', chatId, message: updated }); continue; } + lastResult = result; + if (result.safeToContinue === false) break; + // Resume this member's verification under the same task before advancing the group. + if (result.status === 'done' && result.waitingForTasks) break; if (result.status === 'error' && !loop.cancelled) { // One member could not reply (its error and a retry button are in the chat): the round // goes on. If nobody else is queued, the admin picks it up so the user is not left hanging. diff --git a/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs b/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs index f6c660f0..ed9da831 100644 --- a/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs +++ b/plugins/minimax-ai/minimax-bot/miniapp/node/mcp.mjs @@ -662,7 +662,7 @@ export function createMcpHandler({ team, engine }) { result = { protocolVersion: PROTOCOL_VERSIONS.includes(requested) ? requested : PROTOCOL_VERSIONS[0], capabilities: { tools: { listChanged: false } }, - serverInfo: { name: 'minimax-bot', version: '0.7.32' }, + serverInfo: { name: 'minimax-bot', version: '0.7.37' }, instructions: t('mcp.instructions'), }; break; diff --git a/plugins/minimax-ai/minimax-bot/package.json b/plugins/minimax-ai/minimax-bot/package.json index acc9773b..c152016d 100644 --- a/plugins/minimax-ai/minimax-bot/package.json +++ b/plugins/minimax-ai/minimax-bot/package.json @@ -1,6 +1,6 @@ { "name": "minimax-bot", - "version": "0.7.32", + "version": "0.7.37", "private": true, "type": "module", "mcode": { diff --git a/plugins/minimax-ai/minimax-bot/tests/engine-reliability.test.mjs b/plugins/minimax-ai/minimax-bot/tests/engine-reliability.test.mjs index 629d583e..fd610147 100644 --- a/plugins/minimax-ai/minimax-bot/tests/engine-reliability.test.mjs +++ b/plugins/minimax-ai/minimax-bot/tests/engine-reliability.test.mjs @@ -1385,3 +1385,38 @@ test('a failed save in the schedule tick is reported, not thrown as an unhandled engine.dispose(); await store.writeChain.catch(() => {}); }); + +test('a group round whose members pass does not report a pass as its outcome', async (t) => { + const { store, engine } = await fixture(t); + const { a, chatId } = groupFixture(store); + // The only member to speak passes: the round produced nothing, so there is nothing to report. + engine.agent = { async run(input, options) { + return { ...started(input, options, 'pass-session'), status: 'finished', text: '[PASS]' }; + } }; + + const result = await engine.driveGroup(store.state.groups[0], [a.id], undefined); + + assert.equal(result.text, '', 'a round that only passed has no outcome to hand over'); + assert.doesNotMatch(String(result.text ?? ''), /PASS/i); + const messages = await store.getMessages(chatId); + assert.equal(messages.filter((message) => message.status === 'pass').length, 1, 'the pass is still recorded in the chat'); +}); + +test('a pass by the last speaker does not overwrite what an earlier one said', async (t) => { + const { store, engine } = await fixture(t); + const { a, b, chatId } = groupFixture(store); + store.state.groups[0].memberIds = [a.id, b.id]; + // Alice speaks, Bob adds nothing: the round's outcome is Alice's text, not Bob's pass. + engine.agent = { async run(input, options) { + const alice = input.text.includes("It's your turn (Alice)"); + return { ...started(input, options, alice ? 'a-session' : 'b-session'), status: 'finished', + text: alice ? '@Bob take a look' : '[PASS]' }; + } }; + + const result = await engine.driveGroup(store.state.groups[0], [a.id], undefined); + + assert.equal(result.text, '@Bob take a look'); + assert.doesNotMatch(String(result.text ?? ''), /PASS/i); + const messages = await store.getMessages(chatId); + assert.equal(messages.filter((message) => message.status === 'pass').length, 1); +});