Skip to content

MS-1257 Terminology fix 2 (the hard parts)#1508

Merged
luhmirin-s merged 10 commits into
mainfrom
feature/MS-1257-terminology-fix-2
Dec 17, 2025
Merged

MS-1257 Terminology fix 2 (the hard parts)#1508
luhmirin-s merged 10 commits into
mainfrom
feature/MS-1257-terminology-fix-2

Conversation

@luhmirin-s
Copy link
Copy Markdown
Contributor

JIRA ticket
Will be released in: 2026.1.0

To keep everyone's sanity, I have decided to split the terminology fix into smaller parts. This second PR focuses on correcting the primary issue in SID terminology.

Renamed data classes are fundamental for what SID does; therefore, there are way more lines of changes.

Notable changes

  • Sample -> BiometricReference with a list of BiometricTemplate per reference ID.
  • Subject -> EnrolmentRecord
  • Identity -> CandidateRecord

Out of scope:

  • No business logic, besides some minor mapping, has changed.
  • No persistent data entities/models were changed.
  • No modules were renamed.
  • Data classes have not been moved across modules.

All of those changes will be evaluated and proposed in a separate PR, if necessary.

Testing guidance

  • App should work exactly as before during all of the regular regression tests

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date (or ticket created)
  • Other teams notified about the changes (if applicable)

@cla-bot cla-bot Bot added the ... label Dec 16, 2025
@luhmirin-s luhmirin-s requested review from a team, BurningAXE, TristramN, alex-vt, alexandr-simprints, meladRaouf and ybourgery and removed request for a team December 16, 2025 13:46
@luhmirin-s luhmirin-s marked this pull request as ready for review December 16, 2025 13:46
@luhmirin-s luhmirin-s force-pushed the feature/MS-1257-terminology-fix-2 branch 2 times, most recently from 9090de2 to 0ee3e49 Compare December 16, 2025 14:47
@@ -37,7 +38,7 @@ import com.simprints.fingerprint.connect.FingerprintConnectResult
import com.simprints.infra.config.store.models.FaceConfiguration
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

General JSON comment: have you confirmed that renaming fields is not affecting JSON deserialization (network, DB, cosync)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it is affected, JsonSubTypes.Type has names attribute where the arrayOf("<old name>") value can be provided for deserialization for a transitional period, with a ticket for a future cleanup. This may help but needs checking.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The changes should only affect the internal "domain" models:

  • API models were already using the correct structure and names
  • CoSync models were also correct
  • Persisted DB models were not changed - only the mapping to/from domain models
  • Events were not affected (afaik)
  • The step params/results are fine to change since we are purging the cache on update

@BurningAXE BurningAXE requested a review from Copilot December 16, 2025 17:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates terminology across the SID codebase by renaming core domain classes to better reflect their purpose. The changes replace Sample with BiometricReference containing BiometricTemplate, Subject with EnrolmentRecord, and Identity with CandidateRecord. These terminology updates span test files, implementation classes, and domain models.

Reviewed changes

Copilot reviewed 208 out of 208 changed files in this pull request and generated no comments.

Show a summary per file
File Description
InsertEnrollmentRecordsUseCaseTest.kt Updated test assertions to use new BiometricReference and EnrolmentRecord terminology
InsertEnrollmentRecordsUseCase.kt Refactored generation methods to create BiometricReference with nested templates instead of flat samples
SaveMatchEventUseCaseTest.kt Updated test fixtures to use BiometricReferenceCapture and ComparisonResult
MatchResultSetTest.kt Changed comparison result property access from confidence to comparisonScore
FingerprintMatcherUseCaseTest.kt Updated matcher use case tests to use new reference and candidate record terminology
FaceMatcherUseCaseTest.kt Updated face matcher tests with renamed data structures
SaveMatchEventUseCase.kt Changed match event creation to use comparisonScore property and new query types
MatcherUseCase.kt Updated interface to return ComparisonResult instead of MatchComparisonResult
MatchResultSet.kt Updated internal comparator to use comparisonScore property
FingerprintMatcherUseCase.kt Removed empty probe validation and updated to use BiometricReferenceCapture
FaceMatcherUseCase.kt Removed empty probe validation and updated matcher creation to accept references
MatchResult.kt Updated data class to use ComparisonResult
MatchParams.kt Changed from separate probe fields to single BiometricReferenceCapture
Various test files Updated imports, method calls, and assertions throughout event sync and enrolment records modules
EnrolmentRecordFactory.kt Refactored factory methods to build BiometricReference with nested templates
Domain model files Renamed SubjectQuery to EnrolmentRecordQuery and related action types
Remote/local data sources Updated to work with renamed domain models throughout the persistence layer

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -37,7 +38,7 @@ import com.simprints.fingerprint.connect.FingerprintConnectResult
import com.simprints.infra.config.store.models.FaceConfiguration
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it is affected, JsonSubTypes.Type has names attribute where the arrayOf("<old name>") value can be provided for deserialization for a transitional period, with a ticket for a future cleanup. This may help but needs checking.

Comment on lines +54 to +55
Modality.FACE -> buildFingerprintReference(reference, encoder)
Modality.FINGERPRINT -> buildFaceReference(reference, encoder)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(small suggestion) Fingerprint and face were already flipped before, but this refactor can be an opportunity to fix that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh wow, thanks for spotting this. The flipped calls were introduced in the modality refactoring, so no production version was affected.

@luhmirin-s luhmirin-s force-pushed the feature/MS-1257-terminology-fix-2 branch from 0ee3e49 to 06abcf0 Compare December 17, 2025 08:30
@sonarqubecloud
Copy link
Copy Markdown

@luhmirin-s luhmirin-s merged commit 257fa82 into main Dec 17, 2025
13 checks passed
@luhmirin-s luhmirin-s deleted the feature/MS-1257-terminology-fix-2 branch December 17, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants