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.

Comment on lines +6 to +9
enum class BiometricDataSource {
SIMPRINTS,
COMMCARE,
;
Copy link

Copilot AI Jan 15, 2026

Choose a reason for hiding this comment

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

Adding a trailing semicolon after the last enum value (COMMCARE) with no additional members is unnecessary. While syntactically valid in Kotlin, this deviates from Kotlin conventions where trailing semicolons are only needed when enum has additional members or functions.

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

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