Skip to content

minimax-bot-team / mmx-octopus: data loss and awareness toggle issues blocking official marketplace sync #136

Closed

Description

@MyPrototypeWhat

@antianqi We found the following issues while evaluating these two packages for the official plugin marketplace. We are tracking them together here and will review the packages again once they are fixed.

The review is based on community main at 0c20f90601b767c03f6d3693fdad4d9a82ac0923, with minimax-bot-team 1.0.0 and mmx-octopus 1.9.0. Tests used Node v22.23.4, installable packages exported according to the package contract, and a simulated Agent. No real model was used, and neither Electron behavior nor installation in the real host was tested.

1. minimax-bot-team: chat messages are cleared even when saving state fails

Steps to reproduce:

  1. Initialize Store in a temporary dataDir, append a message to an existing chat, and save the original contents of state.json.
  2. Replace that temporary state.json file with a directory of the same name, then call Store.deleteChat(chatId) so the state write fails with EISDIR.
  3. The message file has already become []. Remove the directory, restore the original state file, and initialize a new Store.

Actual result: the chat is still listed, but it contains 0 messages. Under the same conditions, community minimax-bot 0.7.28 retains 2 messages after restart: the greeting and the appended message.

Team deletion implementation, L602–609 clears messages before calling save(). The minimax-bot implementation, L632–637 writes state first.

Please ensure that both the chat and its messages remain unchanged if the state write fails, and add tests for write failure and recovery after restart.

This test called Store.deleteChat directly, rather than clicking through the UI. Fault injection was limited to temporary test data.

2. mmx-octopus: cross-session awareness is on by default, and disabling it does not stop collection

Steps to reproduce:

  1. Start with a new data directory and use a simulated Host to record observe, sessions, and run calls.
  2. Open /dashboard without chatting. petAware defaults to true, and observe({all:true}) and sessions() have already been called. There has been no run call yet.
  3. Send {"enabled":false} to POST /api/petaware, restart with the same dataDir, and open the page again.

Actual result: the setting is persisted as false, but those collection APIs are still called. With the default setting enabled, subsequent chats include other sessions' titles and statuses in model requests. Disabling the setting stops that prompt injection, but not collection. The probe did not find other sessions' message bodies in these requests.

Relevant source: default value, request-triggered collection, global subscription, and toggle controlling prompt inclusion.

Under this repository's review policy, privacy-sensitive cross-session features must be off by default and documented in the README. Please:

  • Disable cross-session awareness by default and explain what information it reads and how that information is used.
  • Stop the relevant cross-session subscriptions and reads when the toggle is off, rather than only excluding the information from prompts.
  • Add tests covering first launch, toggling the setting, and restarting.
  • Correct the minimum client version in the README from 3.1.5 to 3.1.6.

The old code that wrote to the host's agent directory has been confirmed removed in 1.9.0; it is not a blocker in this review.

We are holding off on official marketplace sync MRs for both packages until these issues are fixed and reviewed again.

Activity

  1. changed the title [-]minimax-bot-team / mmx-octopus:同步官方市场前的数据丢失与感知开关问题[/-] [+]minimax-bot-team / mmx-octopus: data loss and awareness toggle issues blocking official marketplace sync[/+] on Nov 16, 2026
  2. antianqi commented on Nov 16, 2026

    @antianqi
    Contributor

    mmx-octopus 这半(第 2 条)已修完,PR #138:#138 —— CI 绿,可合并。

    两条指控都属实,我们照单认领:
    ① petAware 的初值确实是 true(state.mjs),新装即默认开着;
    ② 关掉之后 observe({all:true}) 与 sessions() 确实照样被调 —— 开关当时只在 buildStatusSummary() 里挡住了「不写进提示词」,没挡住「采集」。

    改了什么(1.9.0 → 1.10.0)

    • 默认关:petAware 初值改成 false,且只有明确传 true 才开(undefined 与其它值一律按「关」处理)。已经装过的用户保留他自己上次的值。
    • 关时真的不采集:observe.mjs 里订阅(scheduleObserve)、看板轮询(scheduleBoard)、换目标重订阅(restartObserve)三处加了同一个守卫;另加 setAware():关掉时掐断订阅 + 停掉看板计时器 + 清掉已经显示出来的跨会话信息;服务端 /api/petaware 切换时调用它 —— 开关落到了采集层,不再只是挡提示词。
    • 提示词那一侧照旧:关着的时候状态摘要也不拼。
    • 重启仍然关:设置被记住,重启后不再采集。

    怎么验的(判的是装配后的行为:真起一套 server + 模拟宿主,数 API 的调用次数,不是读源码字面量):

    • 首启默认关;只有明确传 true 才开;
    • 关着时:observe 调 0 次、sessions() 调 0 次;
    • 打开后:才订阅、才列会话;
    • 关掉后:订阅被掐断(signal aborted)、看板计时器停(不再轮询 sessions())、看板里的跨会话信息被清空;
    • 用同一个 dataDir 重启后:仍然是关的,仍然 0 采集。
    • 自检 900 项 / 0 失败(新增一组 20 条,含 2 条负向注入)。
    • 证伪实验(注进真代码再还原):拆掉 observe.mjs 的守卫 ⇒ 恰好 7 条红;把默认值注回 true ⇒ 恰好 9 条红;还原后文件与备份逐字一致。

    README 与清单

    • 两份 README 写明:读的是什么(会话标题、运行状态、每轮最终回复)、这些信息怎么用(只进她自己那轮的提示词,不外发)、默认关、怎么开。
    • 最小客户端版本 3.1.5 → 3.1.6(按评审要求)。
    • 插件清单的说明同步改成「默认关闭,需手动打开」。

    第 1 条(minimax-bot-team 删会话时写失败导致消息丢失)由同一位作者的另一个 PR 处理,完成后我把链接贴到这里。

  3. antianqi commented on Nov 16, 2026

    @antianqi
    Contributor

    Both packages in this report have their fix open, in two pull requests:

    Point 1 - minimax-bot-team: chat messages are cleared even when saving state fails

    You are right, and the fix follows the minimax-bot implementation you pointed at.

    deleteChat cleared the transcript first and saved the state afterwards, so a failed
    state write lost the messages for good. The state that no longer lists the chat now
    goes to disk first, and the transcript is cleared only after that write succeeded:

    await this.enqueue(async () => {
      const sessions = { ...this.state.sessions };
      delete sessions[chatId];
      await writeJsonAtomic(this.statePath, { ...this.state, sessions });
      delete this.state.sessions[chatId];
      await this.writeMessages(chatId, []);
      this.messageCache.set(chatId, []);
    });

    A failed state write now leaves both the chat and its messages exactly as they were,
    and the caller can try again.

    The test travels with the package, so it can be run against the package itself:

    node --test plugins/antianqi/minimax-bot-team/tests/chat-delete-atomicity.test.mjs
    

    It uses the same injection as the report - state.json is replaced by a directory of
    the same name, so every write to it fails - and then checks that the messages are
    still on disk, that the live state still knows the chat, and that after the state
    file is restored and a new Store is initialized, the chat and its messages are
    still there. A second test checks that a delete that succeeds still clears the
    transcript and forgets the chat.

    I falsified the test before shipping it: with the old order put back into the package
    it fails with the messages are still on disk (1 pass, 1 fail); with the fix it
    passes 2/2.

    Package version 1.0.1. npm run validate reports 0 errors and 1 warning for this
    package (ENTRY_STDOUT in miniapp/node/memory-bridge.mjs - the helper's own output
    channel, unchanged from 1.0.0) and npm run check passes 92/92.

    Point 2 - mmx-octopus

    That one is a different package and a different pull request (#138): cross-session
    awareness is off by default, the toggle stops the subscriptions and the reads instead
    of only excluding the data from the prompt, the README documents what it reads and
    how the data is used, and the minimum client version is corrected to 3.1.6.

    Thanks for the report - it was precise. Both halves are open for another look.

  4. antianqi commented on Nov 16, 2026

    @antianqi
    Contributor

    @MyPrototypeWhat — the mmx-octopus half is ready for another look (PR #138), and the tests you asked for are now shipped inside the package.

    node --test tests/petaware-default-off.test.mjs
    

    They start a real server against a mock host and count the actual observe /
    sessions() calls, so they check the assembled behaviour rather than the source text.
    Three cases are covered: first launch, toggling the setting, and restarting.

    Two of them are negative injections — they break a copy of a production module and
    assert that the criterion catches it. With the guard removed or the default flipped back
    on, the test fails within seconds and names the broken assertions.

    Also in that PR:

    • petAware now defaults to off; only an explicit true turns it on.
    • With it off, collection genuinely stops — the observe subscription is aborted, the
      board polling timer is cleared, and the cross-session data already shown is wiped.
      Previously only the prompt injection was gated; the APIs were still called.
    • The README now discloses what is read, how it is used, that it is off by default since
      1.10.0, and that the minimum client version is 3.1.6.

    The minimax-bot-team half is handled in PR #139.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions