Repository navigation
fix(mmx-octopus): cross-session awareness is off by default and really stops collecting (v1.10.0) - #138
Open
antianqi wants to merge 3 commits into
Open
fix(mmx-octopus): cross-session awareness is off by default and really stops collecting (v1.10.0)#138antianqi wants to merge 3 commits into
antianqi wants to merge 3 commits into
Conversation
…y stops collecting (v1.10.0) The marketplace review (issue MiniMax-AI#136) found two real problems, and both were ours: - petAware defaulted to true. A privacy-sensitive cross-session feature has to be off by default, so a fresh install now starts with it off and the user turns it on themselves. - Turning it off only stopped the summary from reaching the prompt; the collection kept going. observe({all:true}) and sessions() were still called. The switch now reaches the collection layer: while it is off the package does not subscribe to session events, does not list sessions, and does not put anything about other sessions into her prompt. Turning it off at runtime aborts the subscription, stops the board timer and clears what the board had already shown. A restart keeps it off. Also: the README said the package needs MiniMax Code 3.1.5; it needs 3.1.6. Version 1.9.0 -> 1.10.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What the review found
Two problems in this package, both confirmed against the code (not just read off the issue):
petAwaredefaulted totrue. The cross-session feature was on for every new install.observe({all: true})andsessions()were still called on every request.Collecting-but-not-using is not the same as not collecting.
What changed
petAwarenow defaults tofalse(miniapp/node/state.mjs).setPetAware()only turns it on for an explicittrue;undefinedcounts as off.miniapp/node/observe.mjs):the
observesubscription is aborted, the board polling timer is cleared, and thecross-session data already on screen is wiped. The same guard is used in
scheduleObserve(),scheduleBoard()andrestartObserve()— one place, so it cannot drift.README.md/README.zh-CN.mddisclose what is read, how it is used, that it isoff by default since 1.10.0, and that the minimum client version is now 3.1.6.
Tests
The scenarios live in
tests/petaware-scenarios.mjsand are shipped with the package:They start a real server against a mock host and count the actual
observe/sessions()calls — they do not grep the source. They cover the three cases thereview named: first launch, toggling the switch, and restarting.
Two of them are negative injections: they break a copy of the production module
(remove the guard / flip the default back on) and assert that the criterion catches it.
A test that cannot fail proves nothing.
The same implementation backs our own internal self-check, so the two cannot disagree.
Verified
fails within seconds and names the broken assertions (the scenario runner is a
child process with a timeout, so a broken build reports a failure instead of hanging CI).
npm test,npm run validate).