fix(messages): keep group visible replies automatic by default#83498
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. by source inspection and focused tests: current main resolves unset group/channel visible replies to PR rating Rank-up moves:
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. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the default reversal only if maintainers accept the talkative-by-default upgrade behavior, while preserving explicit Do we have a high-confidence way to reproduce the issue? Yes by source inspection and focused tests: current main resolves unset group/channel visible replies to Is this the best way to solve the issue? Yes, if maintainers accept the default reversal: the PR changes the central resolver, doctor behavior, docs, and regression tests instead of adding a duplicate fallback. The remaining question is product/upgrade safety for rooms that intentionally relied on the previous quiet default. Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 5a7d31108ee3. |
Mantis Telegram Desktop ProofSummary: Mantis did not generate before/after GIFs because this PR does not have a clean Telegram-visible before/after proof in the standard Mantis run.
Raw QA files: https://artifacts.openclaw.ai/mantis/telegram-desktop/pr-83498/run-26020584197-1/index.json |
e8bb182 to
fa33ace
Compare
|
Verification before merge: Behavior addressed: normal group/channel source replies default to automatic final delivery again; explicit |
|
Verification update: final pushed head is c440ec9. The last fix only corrected the slash-command guard predicate type; local proof after that fix:
Maintainer accepts source-level proof for this default/routing fix; |
|
Verification update: final pushed head is 0213df0. The last commit only narrows reused test fixtures with
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f52b2aa697
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| (params.replyOptions?.sourceReplyDeliveryMode === undefined && | ||
| !isExplicitSourceReplyCommand(ctx) && | ||
| (chatType === "group" || chatType === "channel" | ||
| ? effectiveVisibleReplies !== "automatic" | ||
| : effectiveVisibleReplies === "message_tool")); | ||
| effectiveVisibleReplies === "message_tool"); |
There was a problem hiding this comment.
Include unauthorized slash turns in tool-only allowlist
This condition no longer treats unauthorized text-slash turns as message-tool delivery, even though resolveSourceReplyDeliveryMode now forces those turns to "message_tool_only" in groups/channels. In configs with restrictive tool profiles (for example tools.profile: "coding"), runtimeProfileAlsoAllow stays empty here, messageToolAvailable resolves false, and the later fallback switches those unauthorized slash turns back to automatic visible delivery, exposing command output in-room instead of keeping it private. Please include the unauthorized text-slash path when computing prefersMessageToolDelivery so these turns keep the runtime message allow-grant.
Useful? React with 👍 / 👎.
|
Final head proof for Behavior addressed: group/channel visible replies now resolve to automatic delivery by default; explicit message_tool remains opt-in; room_event remains tool-only; unauthorized text slash turns remain tool-only.
|
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
…law#83498) * fix(messages): keep group visible replies automatic by default * fix(messages): keep unauthorized slash turns quiet * fix(messages): return boolean from slash guard * test(messages): narrow visible reply fixtures * test(messages): align completion delivery default
Summary
message_toolas explicit opt-in for shared/ambient group rooms; room events still requiremessage(action=send)for visible output.message_toolfor group rooms on latest-generation, tool-reliable models such as GPT 5.5.Discussion
#83443 fixed a Discord progress-preview final-drop path. This PR handles the broader complaint cluster: making every normal group/channel request default to
message_toolmade silent rooms too easy when a model returned final text but did not callmessage(action=send). The safer default is the old automatic visible final-reply path; users who want lurk-mode semantics can opt in withmessages.groupChat.visibleReplies: "message_tool"and, for always-on rooms, pair it withmessages.groupChat.unmentionedInbound: "room_event".Room events remain strict. They still keep final text private unless the model calls the message tool, so ambient context stays quiet by construction. That is the mode we should recommend for shared group rooms with strong tool-calling models, not impose on every group/channel request.
Refs #83393.
Refs #78066.
Refs #77149.
Refs #76996.
Follows #83443.
Verification
Behavior addressed: Normal group/channel source replies default to automatic final delivery again, while explicit
message_tooland ambientroom_eventturns remain message-tool-only.Real environment tested: Local focused Vitest/docs checks in the OpenClaw checkout; #83443 was landed first with PR Real behavior proof.
Exact steps or command run after this patch:
pnpm test src/auto-reply/reply/source-reply-delivery-mode.test.ts src/auto-reply/reply/dispatch-from-config.test.ts src/commands/doctor-legacy-config.migrations.test.ts src/commands/doctor/shared/preview-warnings.test.ts src/config/schema.help.quality.test.ts;pnpm format:docs:check;git diff --check;codex --dangerously-bypass-approvals-and-sandbox --sandbox danger-full-access review --uncommittedEvidence after fix: Focused tests passed 4 Vitest shards; docs formatting clean; diff check clean; Codex review reported no actionable correctness issues.
Observed result after fix: Unset group/channel config resolves to
automatic; explicitmessage_tooland room-event paths still resolve tomessage_tool_only; doctor no longer writes the old group default.What was not tested: No live Discord/Slack/Telegram roundtrip for this config-default PR.