MS-1257 Terminology fix 2 (the hard parts)#1508
Conversation
9090de2 to
0ee3e49
Compare
| @@ -37,7 +38,7 @@ import com.simprints.fingerprint.connect.FingerprintConnectResult | |||
| import com.simprints.infra.config.store.models.FaceConfiguration | |||
There was a problem hiding this comment.
General JSON comment: have you confirmed that renaming fields is not affecting JSON deserialization (network, DB, cosync)?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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.
| Modality.FACE -> buildFingerprintReference(reference, encoder) | ||
| Modality.FINGERPRINT -> buildFaceReference(reference, encoder) |
There was a problem hiding this comment.
(small suggestion) Fingerprint and face were already flipped before, but this refactor can be an opportunity to fix that.
There was a problem hiding this comment.
Oh wow, thanks for spotting this. The flipped calls were introduced in the modality refactoring, so no production version was affected.
…dentity to BiometricReferenceCapture
…ular template class
0ee3e49 to
06abcf0
Compare
|



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->BiometricReferencewith a list ofBiometricTemplateper reference ID.Subject->EnrolmentRecordIdentity->CandidateRecordOut of scope:
All of those changes will be evaluated and proposed in a separate PR, if necessary.
Testing guidance
Additional work checklist