fix(reasoning-tags): strip MiniMax mm: tags on silent-reply and streaming paths missed by #93767#93806
Conversation
|
ClawSweeper review: did not complete due to Codex infrastructure failure. Reviewed June 16, 2026, 8:18 PM ET / 00:18 UTC. Summary PR surface: Source 0. Total 0 across 2 files. Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path. Review metrics: none identified. Merge readiness This is a ClawSweeper/Codex infrastructure failure, not a PR readiness or patch-quality verdict. Risk before merge
Maintainer options:
Next step before merge
Review detailsBest possible solution: Retry the Codex review after fixing the execution failure. Do we have a high-confidence way to reproduce the issue? Unclear. The review failed before ClawSweeper could establish a reproduction path. Is this the best way to solve the issue? Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction. AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 7c97c6da9bfa. Evidence reviewedPR surface: Source 0. Total 0 across 2 files. View PR surface stats
What I checked:
Likely related people:
How this review workflow works
|
c27b26d to
b7de462
Compare
…d stream gates PR openclaw#93767 added MiniMax `mm:`-namespaced reasoning-tag support across the shared sanitizer and Telegram lane coordinator, but two production reasoning-tag recognizers were missed and still only matched the `antml:` namespace: - src/auto-reply/tokens.ts: `taggedReasoningPrefixRe` / `openReasoningPrefixRe` drive `stripLeadingReasoningBlocks` and `isSilentReplyPayloadText`, which 14+ call sites use to detect NO_REPLY silent payloads. A `<mm:think>…</mm:think>NO_REPLY` reply was not recognized as silent, leaking the wrapper into delivery. - src/agents/embedded-agent-subscribe.handlers.messages.ts: `REASONING_TAG_RE` gates `shouldRecomputeFullStream`. A `<mm:think>` streaming chunk failed the test, so the visible stream was not recomputed and the hidden reasoning leaked. Add the `mm:` alternative alongside `antml:` in all three regexes, matching the exact `(?:antml:|mm:)?` form used by openclaw#93767. Identification-only change, no other regex logic touched.
b7de462 to
94dd15d
Compare
|
Maintainer repair and verification complete. Added focused regressions for MiniMax Verification:
|
|
Thanks for the quick reviews and merges across this recent batch of fixes, @vincentkoc — much appreciated! 🙏 |
…ming paths missed by openclaw#93767 (openclaw#93806) * fix(reasoning-tags): accept MiniMax mm: prefix in silent-detection and stream gates PR openclaw#93767 added MiniMax `mm:`-namespaced reasoning-tag support across the shared sanitizer and Telegram lane coordinator, but two production reasoning-tag recognizers were missed and still only matched the `antml:` namespace: - src/auto-reply/tokens.ts: `taggedReasoningPrefixRe` / `openReasoningPrefixRe` drive `stripLeadingReasoningBlocks` and `isSilentReplyPayloadText`, which 14+ call sites use to detect NO_REPLY silent payloads. A `<mm:think>…</mm:think>NO_REPLY` reply was not recognized as silent, leaking the wrapper into delivery. - src/agents/embedded-agent-subscribe.handlers.messages.ts: `REASONING_TAG_RE` gates `shouldRecomputeFullStream`. A `<mm:think>` streaming chunk failed the test, so the visible stream was not recomputed and the hidden reasoning leaked. Add the `mm:` alternative alongside `antml:` in all three regexes, matching the exact `(?:antml:|mm:)?` form used by openclaw#93767. Identification-only change, no other regex logic touched. * test(agents): cover MiniMax reasoning regressions --------- Co-authored-by: Vincent Koc <[email protected]>
…ming paths missed by openclaw#93767 (openclaw#93806) * fix(reasoning-tags): accept MiniMax mm: prefix in silent-detection and stream gates PR openclaw#93767 added MiniMax `mm:`-namespaced reasoning-tag support across the shared sanitizer and Telegram lane coordinator, but two production reasoning-tag recognizers were missed and still only matched the `antml:` namespace: - src/auto-reply/tokens.ts: `taggedReasoningPrefixRe` / `openReasoningPrefixRe` drive `stripLeadingReasoningBlocks` and `isSilentReplyPayloadText`, which 14+ call sites use to detect NO_REPLY silent payloads. A `<mm:think>…</mm:think>NO_REPLY` reply was not recognized as silent, leaking the wrapper into delivery. - src/agents/embedded-agent-subscribe.handlers.messages.ts: `REASONING_TAG_RE` gates `shouldRecomputeFullStream`. A `<mm:think>` streaming chunk failed the test, so the visible stream was not recomputed and the hidden reasoning leaked. Add the `mm:` alternative alongside `antml:` in all three regexes, matching the exact `(?:antml:|mm:)?` form used by openclaw#93767. Identification-only change, no other regex logic touched. * test(agents): cover MiniMax reasoning regressions --------- Co-authored-by: Vincent Koc <[email protected]>
…eplies The THINKING_TAG_RE and THINKING_BLOCK_RE regex patterns in the Matrix monitor replies module were missing the mm: namespace prefix for detecting MiniMax reasoning tags. This caused mm:think/mm:thought reasoning content to leak into Matrix room messages. Add (?:antml:|mm:)? prefix to think(?:ing)?|thought alternatives in both regexes, consistent with the pattern already applied in reasoning-tags.ts and other channel modules (see openclaw#93767, openclaw#93806, openclaw#93820). Fixes openclaw#99412
…eplies The THINKING_TAG_RE and THINKING_BLOCK_RE regex patterns in the Matrix monitor replies module were missing the mm: namespace prefix for detecting MiniMax reasoning tags. This caused mm:think/mm:thought reasoning content to leak into Matrix room messages. Add (?:antml:|mm:)? prefix to think(?:ing)?|thought alternatives in both regexes, consistent with the pattern already applied in reasoning-tags.ts and other channel modules (see openclaw#93767, openclaw#93806, openclaw#93820). Fixes openclaw#99412
Summary
#93767 added MiniMax
mm:namespace support to reasoning-tag handling across 9 files (so<mm:think>etc. are treated like the existingantml:/bare reasoning tags). Two production-path reasoning-tag regexes were missed and still only matchantml:/bare tags:src/auto-reply/tokens.ts:88-91—taggedReasoningPrefixRe/openReasoningPrefixRe, which feedstripLeadingReasoningBlocksandisReasoningPrefixedSilentReplyText→ the exportedisSilentReplyPayloadText(used at 14+ production call sites: normalize-reply, reply-directives, pending-final-delivery, replay-history, subagent-announce-delivery, qqbot, …).src/agents/embedded-agent-subscribe.handlers.messages.ts:216—REASONING_TAG_RE, the gate at line 737 that decides whether a streaming chunk is recomputed to strip thinking.Result: a MiniMax model's
<mm:think>…</mm:think>reasoning leaks past silent-reply detection and into the visible stream, the exact thing #93767 set out to prevent.Changes
(?:antml:)?→(?:antml:|mm:)?, character-for-character matching fix(reasoning-tags): strip MiniMaxmm:namespaced reasoning tags #93767's pattern (commit 4f860bfab0). +3/-3 across 2 files; pure recognition addition, no other regex/logic change.Real behavior proof
Behavior addressed: MiniMax
mm:-namespaced reasoning tags are now stripped/detected on both the silent-reply path and the streaming-recompute path, matchingantml:behavior.Real environment: local, Node v22,
node --import tsx, driving the real exportedisSilentReplyPayloadTextandhandleMessageUpdate(+ the real mm-aware stream sanitizer) — no mocks.Evidence (real functions):
Negative controls (pre-#93767 antml-only regex, real):
<mm:think>block survives.replace(leaks); stream gate.test("<mm:think>…") === false(not stripped → leaks).What was not tested: no live MiniMax provider call; the change is in the deterministic reasoning-tag recognition path, driven via the real exported functions.
Tests and validation
tokens.test.ts+reasoning-tags.test.ts+reasoning-tag-text-partitioner.test.ts+embedded-agent-subscribe.handlers.messages.test.ts: 199 pass.oxlint+oxfmt --checkclean on both files.