Skip to content

Add fallthrough logic fix#787

Open
Hendrixx-RE wants to merge 1 commit into
mosip:masterfrom
Hendrixx-RE:fix(#783)-Add-EXCEPTION_PHOTO
Open

Add fallthrough logic fix#787
Hendrixx-RE wants to merge 1 commit into
mosip:masterfrom
Hendrixx-RE:fix(#783)-Add-EXCEPTION_PHOTO

Conversation

@Hendrixx-RE
Copy link
Copy Markdown

@Hendrixx-RE Hendrixx-RE commented May 10, 2026

#783

Summary by CodeRabbit

  • Bug Fixes
    • Exception photos in biometric registration now correctly use the same quality threshold as standard face photos, ensuring consistent validation standards across all photo types.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

Warning

Rate limit exceeded

@Hendrixx-RE has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 28 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e10e798c-9192-45e3-8739-fcbf2d5ab945

📥 Commits

Reviewing files that changed from the base of the PR and between ad60554 and 1052130.

📒 Files selected for processing (1)
  • registration/registration-services/src/main/java/io/mosip/registration/service/bio/impl/BioServiceImpl.java

Walkthrough

The change adds a single case EXCEPTION_PHOTO: label to the modality switch in BioServiceImpl#getMDMQualityThreshold, positioned immediately before the existing FACE case. The new case has no break statement, allowing control flow to fall through to the FACE threshold assignment, mapping exception photo modality to use the face quality threshold.

Changes

Bio Modality Threshold Mapping

Layer / File(s) Summary
Modality Switch Case Addition
registration/registration-services/src/main/java/io/mosip/registration/service/bio/impl/BioServiceImpl.java
Added case EXCEPTION_PHOTO: label in getMDMQualityThreshold switch, positioned before FACE case for fallthrough to FACE_THRESHOLD assignment.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A photo came forth, exception bound,
No threshold rule did it require,
So FACE's threshold said, "Come round,"
And guided it where faces aspire.
One case, one fall, the logic's found! 📸✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The PR title 'Add fallthrough logic fix' is vague and generic, using non-descriptive terms that don't clearly convey the specific change being made. Revise the title to be more specific about the actual change, such as 'Add EXCEPTION_PHOTO case to BioServiceImpl modality switch' or 'Fix EXCEPTION_PHOTO fallthrough in quality threshold logic'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Hendrixx-RE <athukuttan2004@gmail.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
registration/registration-services/src/main/java/io/mosip/registration/service/bio/impl/BioServiceImpl.java (1)

215-239: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add EXCEPTION_PHOTO case to getSupportedBioAttributes for consistency.

The Modality enum defines EXCEPTION_PHOTO(RegistrationConstants.exceptionPhotoAttributes), and other methods in BioServiceImpl (getMDMQualityThreshold and getRetryCount) handle this modality. However, getSupportedBioAttributes omits it, creating an inconsistency. When EXCEPTION_PHOTO is passed to this method, it will not match any case and return null for that modality. Add:

case RegistrationConstants.EXCEPTION_PHOTO:
    configuredAttributes.put(modality, RegistrationConstants.exceptionPhotoAttributes);
    break;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@registration/registration-services/src/main/java/io/mosip/registration/service/bio/impl/BioServiceImpl.java`
around lines 215 - 239, getSupportedBioAttributes currently omits handling for
the EXCEPTION_PHOTO modality so callers get no attributes for that key; update
the switch inside BioServiceImpl.getSupportedBioAttributes to add a case for
RegistrationConstants.EXCEPTION_PHOTO and put the corresponding list from
RegistrationConstants.exceptionPhotoAttributes into configuredAttributes (use
the same pattern as the other cases and include a break).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@registration/registration-services/src/main/java/io/mosip/registration/service/bio/impl/BioServiceImpl.java`:
- Around line 215-239: getSupportedBioAttributes currently omits handling for
the EXCEPTION_PHOTO modality so callers get no attributes for that key; update
the switch inside BioServiceImpl.getSupportedBioAttributes to add a case for
RegistrationConstants.EXCEPTION_PHOTO and put the corresponding list from
RegistrationConstants.exceptionPhotoAttributes into configuredAttributes (use
the same pattern as the other cases and include a break).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2deb05bc-890e-478a-99d0-3994c78f9d13

📥 Commits

Reviewing files that changed from the base of the PR and between 22fe01f and ad60554.

📒 Files selected for processing (1)
  • registration/registration-services/src/main/java/io/mosip/registration/service/bio/impl/BioServiceImpl.java

@Hendrixx-RE Hendrixx-RE force-pushed the fix(#783)-Add-EXCEPTION_PHOTO branch from ad60554 to 1052130 Compare May 10, 2026 07:37
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.

1 participant