Skip to content

fix(config): include maximum in ceiling validation errors#83916

Closed
leno23 wants to merge 1 commit into
openclaw:mainfrom
leno23:fix/config-max-error-message
Closed

fix(config): include maximum in ceiling validation errors#83916
leno23 wants to merge 1 commit into
openclaw:mainfrom
leno23:fix/config-max-error-message

Conversation

@leno23

@leno23 leno23 commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Include Zod ceiling metadata in config validation issue messages for too_big schema failures.
  • Add regression coverage for session.agentToAgent.maxPingPongTurns showing the maximum allowed value in the operator-facing error.

Tests

  • node --no-maglev node_modules/vitest/vitest.mjs run src/config/validation.allowed-values.test.ts -t "includes maximum values" (RED before implementation)
  • node --no-maglev node_modules/vitest/vitest.mjs run src/config/validation.allowed-values.test.ts
  • node_modules/.bin/oxfmt --check src/config/validation.ts src/config/validation.allowed-values.test.ts
  • node scripts/run-oxlint.mjs src/config/validation.ts src/config/validation.allowed-values.test.ts
  • git diff --check

Verification

Behavior addressed: Config schema ceiling rejections now append the concrete maximum value exposed by Zod too_big issues.
Real environment tested: Local macOS checkout on branch fix/config-max-error-message.
Exact steps or command run after this patch: node --no-maglev node_modules/vitest/vitest.mjs run src/config/validation.allowed-values.test.ts; node_modules/.bin/oxfmt --check src/config/validation.ts src/config/validation.allowed-values.test.ts; node scripts/run-oxlint.mjs src/config/validation.ts src/config/validation.allowed-values.test.ts; git diff --check.
Evidence after fix: src/config/validation.allowed-values.test.ts passed 8/8 tests; oxfmt and oxlint exited 0; git diff --check exited 0.
Observed result after fix: The validation issue for session.agentToAgent.maxPingPongTurns: 21 is Too big: expected number to be <=20 (maximum: 20).
What was not tested: Full pnpm check:changed; local pnpm dependency reconciliation attempted installs and timed out on registry optional package downloads.

Closes #52500

@openclaw-barnacle openclaw-barnacle Bot added size: XS r: too-many-prs Auto-close: author has more than twenty active PRs. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 19, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing this PR because the author has more than 20 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit.

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

Labels

r: too-many-prs Auto-close: author has more than twenty active PRs. size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: config schema ceiling rejections should explicitly state the maximum allowed value

1 participant