Skip to content

fix(doctor): persist group visible reply default#76513

Merged
scoootscooob merged 1 commit into
openclaw:mainfrom
scoootscooob:codex/doctor-group-visible-replies-default
May 3, 2026
Merged

fix(doctor): persist group visible reply default#76513
scoootscooob merged 1 commit into
openclaw:mainfrom
scoootscooob:codex/doctor-group-visible-replies-default

Conversation

@scoootscooob

Copy link
Copy Markdown
Member

Summary

  • Add a doctor compatibility migration that writes messages.groupChat.visibleReplies: "message_tool" for configs with configured channels and no explicit visible-reply policy.
  • Preserve explicit messages.visibleReplies and messages.groupChat.visibleReplies settings, and leave configs without channels untouched.
  • Update group-reply docs, doctor migration docs, config help baseline, and changelog.

Why

Upgrades from 2026.4.26 can have configured channel/group chat setups that predate messages.groupChat.visibleReplies. Persisting the new default through doctor keeps the intended tool-only group/channel reply policy visible in config without adding a startup/load-time core migration.

Verification

  • pnpm test src/commands/doctor-legacy-config.migrations.test.ts src/config/defaults.test.ts src/commands/setup.test.ts
  • pnpm config:docs:check
  • pnpm check:changed
  • git diff --check

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime commands Command implementations size: S maintainer Maintainer-authored PR labels May 3, 2026
@clawsweeper

clawsweeper Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

Summary
The PR adds a doctor compatibility normalizer that persists messages.groupChat.visibleReplies: "message_tool" for configured-channel configs without an explicit visible-reply policy, with tests, docs, generated schema/help text, baseline hash metadata, and changelog updates.

Reproducibility: yes. Source inspection shows current main defaults group/channel delivery to message-tool-only, while the current doctor compatibility chain has no path that persists messages.groupChat.visibleReplies for older configured-channel configs.

Next step before merge
A small automated repair can address the reserved channel metadata edge on this PR branch; protected-label merge and closure decisions remain with maintainers.

Security
Cleared: The diff is limited to doctor/config code, tests, docs, changelog, generated schema text, and generated hash metadata, with no dependency, workflow, secret, or package-execution changes.

Review findings

  • [P3] Ignore channel metadata when detecting configured channels — src/commands/doctor/shared/legacy-config-core-normalizers.ts:24
Review details

Best possible solution:

Keep the doctor-only compatibility repair, align configured-channel detection with reserved channel metadata keys, then continue maintainer review with exact-head validation.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection shows current main defaults group/channel delivery to message-tool-only, while the current doctor compatibility chain has no path that persists messages.groupChat.visibleReplies for older configured-channel configs.

Is this the best way to solve the issue?

No, not quite. The doctor-only migration is the right maintainable surface, but the configured-channel check should ignore channels.modelByChannel so doctor does not mutate configs without real channel sections.

Full review comments:

  • [P3] Ignore channel metadata when detecting configured channels — src/commands/doctor/shared/legacy-config-core-normalizers.ts:24
    channels.modelByChannel is reserved channel metadata, not a configured channel block. With only that mapping present, this helper still adds messages.groupChat.visibleReplies, contradicting the no-channel case and causing doctor to churn channel-model-only configs; please exclude modelByChannel and cover it in the no-channel regression test.
    Confidence: 0.78

Overall correctness: patch is correct
Overall confidence: 0.82

Acceptance criteria:

  • pnpm test src/commands/doctor-legacy-config.migrations.test.ts src/config/defaults.test.ts src/commands/setup.test.ts
  • pnpm config:schema:check
  • pnpm config:docs:check
  • git diff --check
  • pnpm check:changed

What I checked:

Likely related people:

  • scoootscooob: The related merged group/channel visible-reply behavior is credited to this contributor in fix(discord): make always-on auto replies more robust #73046, and local history contains commit 3c636208b0a0 for keeping group replies tool-only by default. (role: introduced behavior / domain contributor; confidence: high; commits: d8dc4eb180e6, 3c636208b0a0; files: src/auto-reply/reply/source-reply-delivery-mode.ts, src/config/types.messages.ts, docs/channels/groups.md)

Remaining risk / open question:

  • Exact PR-head checks were not rerun in this read-only review; merge should still be gated on CI or the listed validation commands after the metadata edge is fixed.

Codex review notes: model gpt-5.5, reasoning high; reviewed against e02377f52281.

@scoootscooob
scoootscooob force-pushed the codex/doctor-group-visible-replies-default branch 2 times, most recently from 1691249 to 00d9384 Compare May 3, 2026 09:18
@scoootscooob
scoootscooob force-pushed the codex/doctor-group-visible-replies-default branch from 00d9384 to d171bf1 Compare May 3, 2026 09:28
@scoootscooob
scoootscooob merged commit 85e4ec1 into openclaw:main May 3, 2026
101 checks passed
@scoootscooob

Copy link
Copy Markdown
Member Author

Landed in 85e4ec1 from source d171bf1.

Verification before merge:

  • pnpm config:schema:check
  • pnpm config:docs:check
  • pnpm test src/commands/doctor-legacy-config.migrations.test.ts src/auto-reply/reply/source-reply-delivery-mode.test.ts src/auto-reply/reply/dispatch-from-config.test.ts src/cli/plugins-location-bridges.test.ts
  • git diff --check && pnpm check:changed
  • GitHub CI on d171bf15d1d299083a01efe80127823b3e93ac5f: all checks passed or were intentionally skipped, including doctor, auto-reply, config-boundary, docs, lint, types, build, and core runtime infra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant