Skip to content

fix: enforce validation for grace values within 0-7 range - #9045

Closed
VedantMadane wants to merge 1 commit into
JhaSourav07:mainfrom
VedantMadane:fix/issue-1241
Closed

fix: enforce validation for grace values within 0-7 range#9045
VedantMadane wants to merge 1 commit into
JhaSourav07:mainfrom
VedantMadane:fix/issue-1241

Conversation

@VedantMadane

Copy link
Copy Markdown

Summary

fix: reject grace values outside 0-7 with validation error

Changes

  • Out-of-range grace was silently clamped to 7.
  • Zod now rejects with a validation error.

Fixes #1241

- Schema previously clamped grace>7 with Math.min and returned 200.
- Now add a Zod issue so out-of-range grace fails validation (400) instead of silent coercion.

Fixes JhaSourav07#1241

Signed-off-by: Vedant Madane <6527493+VedantMadane@users.noreply.github.com>
@retenta-bot

retenta-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

This pull request addresses the issue of handling out-of-range grace values by implementing a validation error instead of silent coercion. This aligns with previous decisions made to ensure consistency and adherence to the API contract. Thank you for your contribution!

@retenta-bot retenta-bot Bot changed the title fix: reject grace values outside 0-7 with validation error fix: enforce validation for grace values within 0-7 range Aug 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @VedantMadane! Thanks for your interest in contributing to CommitPulse! 🙏

Unfortunately, this PR has been automatically closed because you are not assigned to the linked issue #1241 — [Bug]: grace param accepts values above 7 silently — should return 400.

To avoid this in the future, please follow these steps:

  1. Claim the issue — Comment /claim on #1241 if you are the issue author, or ask a maintainer to /assign you.
  2. Wait for confirmation — The bot will confirm your assignment with a ✅ reply.
  3. Then open your PR — Link the issue with Fixes #1241 in your description.

💡 You can be assigned to up to 5 open issues at a time. Check your current assignments before claiming a new one.

We look forward to your contribution once you're assigned! 🚀

@github-actions github-actions Bot closed this Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: grace param accepts values above 7 silently — should return 400

1 participant