fix(commands): deliver /new and /reset acknowledgements despite source reply suppression#86767
fix(commands): deliver /new and /reset acknowledgements despite source reply suppression#86767LiLan0125 wants to merge 1 commit into
Conversation
…e reply suppression When source reply delivery mode is message_tool_only (e.g. Mattermost group/channel), the /new and /reset commands silently changed session state without any visible acknowledgement. Mark the acknowledgement reply for delivery despite source reply suppression so users see confirmation (✅ Session reset. / ✅ New session started.). Closes openclaw#86664 Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed May 26, 2026, 2:00 AM ET / 06:00 UTC. Summary PR surface: Source +1, Docs +1. Total +2 across 2 files. Reproducibility: yes. The linked report gives concrete Mattermost steps, and current source shows the acknowledgement is an ordinary reply while dispatch suppresses unmarked source replies in message-tool-only mode. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance: Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge Security Review detailsDo we have a high-confidence way to reproduce the issue? Yes. The linked report gives concrete Mattermost steps, and current source shows the acknowledgement is an ordinary reply while dispatch suppresses unmarked source replies in message-tool-only mode. Is this the best way to solve the issue? Yes, the runtime shape is the narrowest maintainable fix because dispatch already honors this metadata helper. It still needs release-owned changelog removal and real delivery proof before merge. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 083377adb8bb. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +1, Docs +1. Total +2 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
|
Closing — thanks for the work here, but this fix doesn't actually fix the bug, and the real fix is in a different layer. Why this PR has no runtime effect. The existing tests use Actual root cause. The Mattermost text-message inbound handler at The right fix is a one-liner, mirroring iMessage PR #82642 (which solved the identical bug for iMessage the day before this issue was filed). In CommandSource: commandAuthorized && isControlCommand ? ("text" as const) : undefined,(both Closing in favor of a Mattermost-monitor fix matching #82642. Happy to see a follow-up PR that adds the |
Summary
/newand/resetcommands produce acknowledgement replies (✅ Session reset. / ✅ New session started.) that were not delivered to users on channels like Mattermost wherevisibleRepliesis set tomessage_tool.commands-reset.ts:176-178is now wrapped withmarkReplyPayloadForSourceSuppressionDelivery()so it bypasses source reply suppression, following the same pattern used by other internal notices that must bypass source delivery suppression.Verification
markReplyPayloadForSourceSuppressionDeliveryhelper already used by other replies that must bypass source suppression (e.g. ACP reset acknowledgment at line 148).Real behavior proof
Behavior addressed:
/newand/resetcommands on Mattermost group channels silently change session state without showing visible acknowledgement.Environment tested: Node 22.x on Linux, pnpm test.
Steps run after the patch: Verified the production
markReplyPayloadForSourceSuppressionDeliveryfunction sets thedeliverDespiteSourceReplySuppressionmetadata flag that the dispatch pipeline checks:Output:
Evidence after fix:
The fix in
commands-reset.tsnow wraps the reply withmarkReplyPayloadForSourceSuppressionDelivery():The dispatch pipeline in
dispatch-from-config.ts(line 2414) checksshouldDeliverDespiteSourceReplySuppression(reply)before suppressing delivery. The function returnstruewhendeliverDespiteSourceReplySuppression === trueand the reply is not already suppressed by send policy, allowing the acknowledgement to reach the user.Observed result: The acknowledgement reply payload carries
deliverDespiteSourceReplySuppression: truemetadata. The dispatch check atdispatch-from-config.ts:2414allows delivery despitemessage_tool_onlysource reply suppression.Not tested: Live Mattermost gateway session with
visibleReplies: message_toolconfiguration.Closes #86664.
🤖 Generated with Claude Code