Repository navigation
Preserve QQ group sender identity and passive reply context - #1201
Open
kevinwang0224 wants to merge 2 commits into
Open
kevinwang0224 wants to merge 2 commits into
kevinwang0224 wants to merge 2 commits into
Conversation
Group prompts discarded member_openid, and delayed passive replies reused the latest message in the chat. Carry the sender and original message through queued Bot replies and group member turns so later questions do not replace their reply context.
kevinwang0224
marked this pull request as ready for review
November 9, 2026 05:30
Merge upstream dev c303f1f. Keep the new sender-name, abandoned-wait and exchange-recording options together with QQ reply metadata. Cover their combined delivery path with a regression test.
Fei2411
requested changes
Nov 17, 2026
Fei2411
left a comment
Owner
There was a problem hiding this comment.
Verdict: changes requested. The fix is still needed: on dev, qq.js still replies with the chat's lastMsgId (the newest message, not the one being answered), and group messages still reach the model without member_openid. But this branch can't go in as it stands.
- Merge
dev. It is about 1000 commits behind, and the conflicts indelivery.js,groups.js,turns.js,im/index.js,qq.jsand both tests are real ones. Please usescripts/merge-dev.sh(no rebase or force-push). - Reuse dev's origin tracking. Since this branch was cut,
devrecords where each user message came from (the origin binding from e3d1e67). CarryingqqReplyas a base64 JSON blob insiderpcId, and then threading it by hand throughdeliver,roomTurn,postInRound,postToRoomandlateRoomReply, adds a second QQ-only path through shared group code. Hanging the reply anchor off the origin dev already keeps would make this much smaller and keepgroups.jsandturns.jsplatform-neutral. - Sender tag in the prompt.
[QQ group sender: member_openid=...]goes into the user text, so it also shows in the transcript and in search. Please check whether dev's group speaker/viarendering can carry the sender instead. - Ordering. Related work is in #1725, #1750 and #1768. Please rebase the idea on top of whichever of those lands first, so the QQ reply anchor and the origin fix don't fight.
The tests for the passive-reply window (qq-reply.test.js) are a good base to keep.
This was referenced Nov 19, 2026
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.
Issue
Fixes #1200
Summary
QQ group messages reached the model without
member_openid, so messages from different members looked like the same user. A delayed passive reply also used the most recently received message in the chat, even when it answered an earlier question.Carry the same context through group progress and late replies. Keep existing multi-chat broadcasting: other listeners use their own chat context rather than borrowing another conversation's message ID. Existing QQ source IDs remain readable as platform markers. Delivery retains upstream sender-name overrides and abandoned-wait/exchange-recording options alongside QQ reply metadata; a regression covers these options together.
Changelog
QQ group conversations identify each sender by member openid, and delayed replies keep the original message association when another member speaks.
Evidence
devatc303f1f0: the model input is onlymy question, and the inbound chat has no original-message reply context.im.test.js,im-qq.test.js,qq-reply.test.js,handoff-abandon.test.js, andplugin-reload.test.jspass, including overlapping questions in a DS Bot group and independent message sequences for Alice and Bob.0.2.2-rc.1, in fresh isolated profiles with matching mock settings: 51/52 steps passed on both this merge and unmodifieddevatc303f1f0. Both fail the identicalChief first group turn sees its attached MCP and skillcheck: the skill is present, but the first group turn reports no MCP tool. This is a reproduced baseline limitation in this test setup, rather than a new failure introduced by the QQ change. Real QQ integration has not been exercised.The QQ transport tests use a local fake HTTP/Gateway server; no real QQ credentials or group messages are involved. QQ's passive-reply window and quota still apply. Native quote bubbles and automatic member mentions are outside this change.
How I checked it / 怎么验证的
npm test(inds-bot/, with inherited application environment cleared)node scripts/build-client.mjs --checknpm run lintnode dev/smoke.mjs qq-merge 13096and the matching unmodified-dev baselinenode dev/smoke.mjs qq-merge-base 13097; results and the remaining limitation are detailed above. All test processes were stopped.Merge Danger
Door: two-way
The change can be reverted without a data migration. Reply metadata is optional, and older QQ request IDs keep the previous fallback behavior.
Blast Radius: QQ
The metadata also crosses shared group/delivery code. The full unit suite covers those flows; the new group regression checks that a later question cannot overwrite a running member's captured reply context. Several inputs consumed in one turn share that turn's reply association.
Checklist / 检查
client.jsare unchanged.Co-authored-by.