Allow null steps in AchievementUpdateRequest#1145
Conversation
Jackson 3 (brought in by Spring Boot 4) defaults FAIL_ON_NULL_FOR_PRIMITIVES to true and treats absent JSON properties as null for primitive record components. The producer omits steps for REVEAL/UNLOCK operations, which Jackson 2 silently coerced to 0 but Jackson 3 now rejects, turning every such message into a poison pill that blocks the achievement queue. Switch steps to Integer and document via @Schema that it is only required for INCREMENT and SET_STEPS_AT_LEAST. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 57 minutes and 14 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesAchievementUpdateRequest steps nullability
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Without this, a malformed payload would NPE on auto-unboxing inside the switch and produce a confusing stack trace. Throwing explicitly points straight at the contract violation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
request.achievement.updatemessages with nostepsfield (sent forREVEAL/UNLOCKoperations) are rejected asMismatchedInputException: Cannot map null into type int, turning them into poison messages that block the queue.FAIL_ON_NULL_FOR_PRIMITIVEStotrueby default and treats absent JSON properties asnullfor primitive record components. Jackson 2 silently coerced these to0, masking the latent contract gap.stepstoIntegerand annotate it with@Schema(nullable = true, description = ...)to document that it is only required forINCREMENTandSET_STEPS_AT_LEAST. The controller only unboxessteps()on those two paths, so no NPE risk.Test plan
REVEAL/UNLOCKmessage (nostepsfield) and confirm it is consumed withoutMessageConversionException.INCREMENT/SET_STEPS_AT_LEASTmessage and confirm the steps value is applied as before.🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
API Changes
stepsparameter in achievement update requests is now properly marked as optional for REVEAL and UNLOCK operations, and required for INCREMENT and SET_STEPS_AT_LEAST operations.