Skip to content

Conversation

@meladRaouf
Copy link
Collaborator

JIRA ticket
Will be released in: 2026.1.0

Notable changes

  • Consolidate all event classes into a single package by eliminating sub-packages.
  • Refactor Event and EventPayload into sealed classes.

Testing guidance

  • Create any session and sync it to the backend

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)

Copy link

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 consolidates all event classes from sub-packages (e.g., callout, callback, face, fingerprint, subject, samples, upsync, downsync) into the single parent package com.simprints.infra.events.event.domain.models. Additionally, it refactors Event and EventPayload from abstract to sealed classes, improving type safety.

Changes:

  • Moved all event classes from sub-packages into a single package, eliminating hierarchical package organization
  • Refactored Event and EventPayload from abstract to sealed classes
  • Moved BiometricDataSource from callout sub-package to root models package

Reviewed changes

Copilot reviewed 137 out of 137 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Event.kt Changed from abstract to sealed class; made getTokenizableFields() open with default empty map; marked equals() and hashCode() as final
EventPayload.kt Changed from abstract to sealed class
BiometricDataSource.kt Moved from callout sub-package to models package; added trailing comma
Various event classes Updated package declarations from sub-packages to root models package
All test and production files Updated imports to reflect new package structure
Comments suppressed due to low confidence (2)

infra/events/src/main/java/com/simprints/infra/events/event/domain/models/Event.kt:1

  • Changing getTokenizableFields() from abstract to open with a default empty map implementation may break existing implementations that override this method. While sealed classes ensure all implementations are known at compile-time, this changes the contract. Consider verifying all subclasses still provide meaningful implementations where needed, as some may now silently fall back to the empty map default.
    infra/events/src/main/java/com/simprints/infra/events/event/domain/models/BiometricReference.kt:14
  • The fully qualified references BiometricReferenceType.Companion.FACE_REFERENCE_KEY are more verbose than necessary. Since the original code used direct imports, consider maintaining consistency by importing these constants directly instead of using fully qualified names.

…RecordDeletionEvent and EnrolmentRecordMoveEvent
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
11.5% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@meladRaouf meladRaouf merged commit 4e2a46a into main Jan 15, 2026
12 of 14 checks passed
@meladRaouf meladRaouf deleted the ks-events branch January 15, 2026 20:30
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.

4 participants