Skip to content

fix(config): allow historyLimit: 0 in GroupChatSchema - #94073

Closed
zhanxingxin1998 wants to merge 1 commit into
openclaw:mainfrom
zhanxingxin1998:fix/fix-config-allow-historylimit-0-in-groupchatschema
Closed

zhanxingxin1998 wants to merge 1 commit into
openclaw:mainfrom
zhanxingxin1998:fix/fix-config-allow-historylimit-0-in-groupchatschema

Conversation

@zhanxingxin1998

@zhanxingxin1998 zhanxingxin1998 commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Closing per ClawSweeper review: duplicate of canonical PR #65359. The upstream PR already owns review and proof for this fix.

@clawsweeper — closing as requested.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 17, 2026
GroupChatSchema used .positive() which rejects 0, while all other
historyLimit schemas use .min(0). This caused a silent config reload
failure when setting messages.groupChat.historyLimit to 0.

Change .positive() to .min(0) and add test coverage.

Fixes openclaw#65305
@zhanxingxin1998
zhanxingxin1998 force-pushed the fix/fix-config-allow-historylimit-0-in-groupchatschema branch from 31826a2 to 4aca1ba Compare June 18, 2026 01:45
@openclaw-barnacle openclaw-barnacle Bot added triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 18, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close: this PR is a duplicate of #65359; that older open PR carries the same patch, links the canonical bug, and has stronger live Gateway proof, while current main and the latest release still need the fix.

Root-cause cluster
Relationship: duplicate
Canonical: #65359
Summary: This PR duplicates the active proof-positive fix path for the GroupChatSchema.historyLimit: 0 validation mismatch; the linked issue should remain open until the canonical PR or an equivalent patch lands.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Canonical path: #65359 is open, mergeable, uses closing syntax for #65305, touches the same three files, and includes live Gateway output showing schema minimum: 0, config.patch accepting 0, and readback returning 0.

So I’m closing this here and keeping the remaining discussion on #65359 and #65305.

Review details

Best possible solution:

Close this duplicate branch and keep review and landing focused on #65359 or an equivalent narrow .min(0) fix with live Gateway proof.

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

Yes, at source level. Current main validates messages.groupChat.historyLimit through GroupChatSchema, which still uses .positive() even though docs and sibling schemas define 0 as valid.

Is this the best way to solve the issue?

No, this is not the best branch to land even though the patch shape is correct. The best path is the older canonical PR with the same stable patch, the linked issue, and live Gateway proof.

Security review:

Security review cleared: Security review cleared: the diff changes config validation source and tests only, with no dependency, workflow, package, secret, or code-execution surface change.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • maxreith: Opened the canonical issue and the older proof-positive PR with the same validator change, schema tests, Gateway config-patch coverage, and live Gateway proof; this PR also cherry-picks that authored fix commit. (role: canonical reporter and active fix author; confidence: high; commits: a4f99c4cd2c0, 4aca1ba253ad; files: src/config/zod-schema.core.ts, src/config/zod-schema.core.test.ts, src/gateway/server.config-patch.test.ts)
  • patrick-slimelab: Recent merged work touched GroupChatSchema and message config types while adding channel-scoped group mention pattern policy. (role: adjacent group-chat schema contributor; confidence: medium; commits: 9c1adf4e51a9; files: src/config/zod-schema.core.ts, src/config/types.messages.ts, docs/channels/groups.md)
  • ScientificProgrammer: Recent config schema generation work changed public JSON Schema output to derive from accepted input shapes, relevant to the JSON-schema concern in the related issue discussion. (role: schema generation contributor; confidence: medium; commits: 678a0ee9440b; files: src/config/schema-base.ts, src/config/schema.base.generated.test.ts)
  • joshavant: Recent merged work substantially changed config.patch behavior and the same Gateway regression test file this PR extends. (role: adjacent Gateway config.patch contributor; confidence: medium; commits: 9f48254f099a; files: src/gateway/server-methods/config.ts, src/gateway/server.config-patch.test.ts)
  • vincentkoc: Recent merged work moved Gateway config handlers to import validation directly, touching the runtime path this PR tests. (role: recent Gateway config handler contributor; confidence: medium; commits: deea78da72c5, 55467f0b9435; files: src/gateway/server-methods/config.ts, src/config/zod-schema.core.ts)

Codex review notes: model internal, reasoning high; reviewed against d1b917120a47.

@zhanxingxin1998
zhanxingxin1998 deleted the fix/fix-config-allow-historylimit-0-in-groupchatschema branch June 30, 2026 02:34
@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: mock-only-proof Candidate: PR proof only shows tests, mocks, snapshots, lint, typecheck, or CI. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants