Skip to content

[DMP 2026] Implement Biometric Quality Through SDK During Biometric Capture - #834

Open
Mohit14036 wants to merge 25 commits into
mosip:feature/770-biometric-quality-sdkfrom
Vignesh1131321:feature/quality-orchestrator-develop
Open

Mohit14036 wants to merge 25 commits into
mosip:feature/770-biometric-quality-sdkfrom
Vignesh1131321:feature/quality-orchestrator-develop

Conversation

@Mohit14036

@Mohit14036 Mohit14036 commented Sep 11, 2026 •

Copy link
Copy Markdown

Summary

Introduces a pluggable, multi-source biometric quality evaluation system (SBI + SDK) to replace the previous single-source (SBI-only) quality check, bringing the registration client into full compliance with the Biometric Quality spec's error-handling and scoring rules.

Core orchestrator (BiometricQualityOrchestrator)

  • Runs one or more configured evaluators (SBI, SDK) per captured biometric attribute via IBiometricQualityEvaluator, each producing an independent score.
  • Combines multi-evaluator scores through a pluggable IBiometricScoreAggregator: Mean, Median, Weighted Average, Priority, Formula (SpEL-based, e.g. #scores['SDK'] * 0.6 + #scores['SBI'] * 0.4), and Max.
  • Aggregation strategy resolves through a per-attribute → per-modality → global-default config hierarchy (mosip.registration.quality.aggregation.*), and is genuinely optional — leaving it unset means no aggregate is displayed or used (the score bar and packet fall back to the raw SDK/SBI score). Internally, the orchestrator still computes a MEAN aggregate on every capture as part of its normal flow, but that value is discarded rather than surfaced unless a strategy was explicitly configured, gated via OrchestrationResult.isAggregationExplicitlyConfigured().
  • SDK evaluation runs with a real, enforced timeout (ExecutorService), configurable per evaluator.

Spec-compliant error handling

  • Enforces the Error Scenarios table's exact blocking/no-fallback semantics and error codes: Invalid SDK Score, SDK Exception, Missing SBI Score, No Quality Source, Quality Below Threshold, Partial Capture, Corrupt Data, Configuration Error, Audit Log Failure (logs a warning instead of breaking evaluation when audit persistence itself fails).
  • Unified three previously-inconsistent score-fallback gates (capture-time threshold check, screen "can continue" validation, DTO save gate) so all three now use the same precedence (aggregate > SDK > raw SBI) instead of a passing SDK/aggregate score being silently overridden by a lower raw SBI score.
  • Quality-check errors now surface as operator-facing UI alerts instead of being silently swallowed.

SDK owner metadata in CBEFF

  • Each BIR's Others map now carries the SDK's own self-reported identity (SDK_SCORE_ORGANIZATION, SDK_SCORE_ORGANIZATION_TYPE, SDK_SCORE_SDK_VERSION, SDK_SCORE_API_VERSION) alongside SDK_SCORE, mirroring the Organization already carried in the primary Quality tag's Algorithm.
  • New SdkInfoProvider resolves the real SDKInfo from whichever SDK is configured (mosip.fingerprint/iris/face.provider), since the existing BioAPIFactory/iBioProviderApi never expose it — resolved once per modality and cached.

UI

  • Biometric capture screen's pass/fail (red/green) highlighting now applies to whichever score is actually driving the threshold decision (aggregated → SDK → MDS), colors the caption label together with its value, shows the full caption text without truncation, and never changes font size.
  • Global Config Settings screen made fully editable.
  • Local-config self-healing sync fixed between spring.properties and the GLOBAL_PARAM/LOCAL_PREFERENCES DB tables for quality config keys.

Config

  • New mosip.registration.quality.* property tree: evaluator selection, per-modality/per-attribute aggregation strategy, per-attribute weights, formula expressions, and per-evaluator timeouts — all with sensible fallback defaults.

Test plan

  • Unit test suite covering Alternate Scenarios AS-01–AS-05 and the full Error Scenarios table (QualityErrorScenariosTest, BiometricQualityOrchestratorTest, MultiVendorOrchestratorTest, FullOrchestratorWithMockSdkTest, SampleSdkIntegrationTest, MockSdkRealIntegrationTest).
  • Live end-to-end verification against the mock SBI + mock SDK stack: per-modality aggregation strategies, FORMULA strategy with a custom SpEL expression, and a full real registration capture confirmed to produce the new SDK_SCORE_* fields in the actual CBEFF packet.

Vignesh1131321 and others added 8 commits September 11, 2026 12:05
Signed-off-by: vignesh1131321 <vignesh.pasupulety369@gmail.com>
Signed-off-by: vignesh1131321 <vignesh.pasupulety369@gmail.com>
Signed-off-by: vignesh1131321 <vignesh.pasupulety369@gmail.com>
Signed-off-by: vignesh1131321 <vignesh.pasupulety369@gmail.com>
Signed-off-by: vignesh1131321 <vignesh.pasupulety369@gmail.com>
- Enforce real blocking/no-fallback semantics per Error Scenarios spec
  (Invalid SDK Score, SDK Exception, Missing SBI Score, No Quality Source,
  Quality Below Threshold, Partial Capture, Corrupt Data, Configuration
  Error, Audit Log Failure) with exact spec error codes/messages
- Add real SDK evaluation timeout enforcement via ExecutorService
- Add per-evaluator audit trail (safeAudit) that logs a warning instead of
  breaking evaluation when audit persistence itself fails
- Add MAX aggregation strategy; make aggregation strategy genuinely
  toggleable (explicit config vs. unset = no aggregation) instead of
  silently defaulting to MEAN
- Fix local-config self-healing sync between spring.properties and the
  GLOBAL_PARAM/LOCAL_PREFERENCES DB tables for quality config keys
- Fix three separate score-fallback gates (capture-time threshold check,
  screen "can continue" validation, and the DTO save gate) to all use the
  same displayed score (aggregate > SDK > raw SBI) instead of only the
  raw SBI score, so a passing SDK/aggregate score is no longer silently
  overridden by a lower raw score
- Route quality-check error messages to the operator-facing UI alert
- Make Global Config Settings screen fully editable
- Add unit test suite covering Alternate Scenarios AS-01..AS-05 and the
  Error Scenarios table

Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
- BIRBuilder now embeds the SDK's self-reported owner/version details
  (SDK_SCORE_ORGANIZATION, SDK_SCORE_ORGANIZATION_TYPE,
  SDK_SCORE_SDK_VERSION, SDK_SCORE_API_VERSION) into each BIR's Others
  map alongside SDK_SCORE, mirroring the Organization already carried
  in the primary Quality tag's Algorithm.
- New SdkInfoProvider resolves the real SDKInfo from the configured
  SDK (mosip.fingerprint/iris/face.provider), since BioAPIFactory
  never exposes it, and caches it per modality.
- Fixed pass/fail (red/green) highlighting on the biometric capture
  screen to apply to whichever score actually drives the threshold
  decision (aggregated > SDK > MDS), coloring both the caption and
  value together without altering font size, and to show the full
  caption text instead of truncating it.

Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (15)
  • ^main$
  • ^master$
  • ^master-java21$
  • ^develop$
  • ^develop2$
  • ^develop/.*
  • ^release$
  • ^release/.*
  • ^release-.*
  • ^\d+.\d+.x$
  • ^\d+.\d+.\d+$
  • ^hotfix/.*
  • ^hotfix-.*
  • develop
  • release-*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 630dcbff-ebf1-41f8-a4e3-648ed3279986

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

Comment thread registration/registration-services/SCHEMA_0.5.json Outdated
Comment thread registration/registration-client/pom.xml Outdated
Comment thread registration/registration-services/pom.xml Outdated
Comment thread registration/registration-services/src/main/resources/spring.properties Outdated
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
@Mohit14036

Mohit14036 commented Sep 11, 2026 •

Copy link
Copy Markdown
Author

All review comments have been addressed. Please let us know if there are any other issues that need to be resolved.

Comment thread .gitignore Outdated
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Comment thread registration/registration-services/src/main/resources/spring.properties Outdated
Comment thread registration/registration-services/src/main/resources/spring.properties Outdated
…atible

Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
Signed-off-by: Mohit140306 <mohitjagini@gmail.com>
@Mohit14036
Mohit14036 changed the base branch from develop to feature/770-biometric-quality-sdk September 22, 2026 09:47
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.

4 participants