fix: count genuinely claimable BenIDs, not just non-provisioned ones - #197
fix: count genuinely claimable BenIDs, not just non-provisioned ones#197vishwab1 wants to merge 1 commit into
Conversation
checkBenIDAvailabilityLocal() previously counted Provisioned=false rows only, which overstates what's actually available - it also counts rows claimed (Reserved=true) by an in-flight registration that was later abandoned or crashed before completing. Those rows are stuck (the claim query requires Reserved=false) and were never really available. Adds countByProvisionedAndReserved and switches the check to exclude Reserved=true rows, so callers (including MMU-API's new BenID pool auto top-up scheduler) get an accurate count. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|



checkBenIDAvailabilityLocal() previously counted Provisioned=false rows only, which overstates what's actually available - it also counts rows claimed (Reserved=true) by an in-flight registration that was later abandoned or crashed before completing. Those rows are stuck (the claim query requires Reserved=false) and were never really available.
Adds countByProvisionedAndReserved and switches the check to exclude Reserved=true rows, so callers (including MMU-API's new BenID pool auto top-up scheduler) get an accurate count.
📋 Description
JIRA ID:
Please provide a summary of the change and the motivation behind it. Include relevant context and details.
✅ Type of Change
ℹ️ Additional Information
Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.