Skip to content

MS-1537 device status updates - #1863

Merged
luhmirin-s merged 5 commits into
feature/MS-1537-hearthbeat-requestfrom
feature/MS-1537-device-status-updates
Oct 19, 2026
Merged

luhmirin-s merged 5 commits into
feature/MS-1537-hearthbeat-requestfrom
feature/MS-1537-device-status-updates

Conversation

@luhmirin-s

@luhmirin-s luhmirin-s commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

JIRA ticket
Will be released in: 2027.1.0

Notable changes

  • Added an endpoint to upload device data state
  • Added a worker that uses the new endpoint
    • Scheduled with the rest of sync endpoints, but on small initial delay
    • Interval is controlled by custom configuration (rescheduled when config changes)

Testing guidance

  • Set configuration flag to 1 hour
  • Run couple sessions
  • Wait until the worker triggers and check mnemosyne_raw_events.DeviceDataState_v1 contents

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)

@luhmirin-s
luhmirin-s added this pull request to stack #1864 October 15, 2026 09:55
@cla-bot cla-bot Bot added the ... label Oct 15, 2026
@luhmirin-s luhmirin-s changed the title Feature/ms 1537 device status updates MS-1537 device status updates Oct 15, 2026
@luhmirin-s
luhmirin-s requested a balanced review from Copilot October 15, 2026 09:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Missing timestamp imports in ApiFaceCaptureAttemptPayload.kt prevent event-sync compilation.

0 open findings

What changed in this PR

Adds periodic device-data reporting to the existing sync infrastructure, with configurable scheduling and shared API timestamp models.

Changes:

  • Adds the status endpoint, snapshot mapping, and reporting worker.
  • Integrates configurable scheduling, cancellation, and tests.
  • Moves API timestamps into core for reuse.
File Description
infra/​sync/​src/​test/​java/​com/​simprints/​infra/​sync/​SyncOrchestratorCommandExecutionTest.kt Tests status scheduling and cancellation.
infra/​sync/​src/​test/​java/​com/​simprints/​infra/​sync/​ScheduleSyncCommandTest.kt Tests status commands.
infra/​sync/​src/​test/​java/​com/​simprints/​infra/​sync/​devicestate/​worker/​DeviceStatusReportWorkerTest.kt Tests worker outcomes.
infra/​sync/​src/​test/​java/​com/​simprints/​infra/​sync/​devicestate/​ReportDeviceDataStateUseCaseTest.kt Tests snapshot submission.
infra/​sync/​src/​test/​java/​com/​simprints/​infra/​sync/​devicestate/​remote/​ApiDeviceDataStateTest.kt Tests mapping and serialization.
infra/​sync/​src/​test/​java/​com/​simprints/​infra/​sync/​config/​usecase/​RescheduleWorkersIfConfigChangedUseCaseTest.kt Tests interval-change handling.
infra/​sync/​src/​main/​java/​com/​simprints/​infra/​sync/​SyncOrchestratorImpl.kt Integrates status scheduling.
infra/​sync/​src/​main/​java/​com/​simprints/​infra/​sync/​SyncConstants.kt Defines work name and delay.
infra/​sync/​src/​main/​java/​com/​simprints/​infra/​sync/​ScheduleSyncCommand.kt Adds status scheduling commands.
infra/​sync/​src/​main/​java/​com/​simprints/​infra/​sync/​devicestate/​worker/​DeviceStatusReportWorker.kt Adds periodic reporting worker.
infra/​sync/​src/​main/​java/​com/​simprints/​infra/​sync/​devicestate/​ReportDeviceDataStateUseCase.kt Submits current device state.
infra/​sync/​src/​main/​java/​com/​simprints/​infra/​sync/​devicestate/​remote/​DeviceStatusRemoteInterface.kt Defines status POST endpoint.
infra/​sync/​src/​main/​java/​com/​simprints/​infra/​sync/​devicestate/​remote/​ApiDeviceDataState.kt Defines request models and mapping.
infra/​sync/​src/​main/​java/​com/​simprints/​infra/​sync/​config/​usecase/​RescheduleWorkersIfConfigChangedUseCase.kt Reschedules on interval changes.
infra/​sync/​build.gradle.kts Enables serialization and backend plugins.
infra/​event-sync/​src/​test/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​session/​ApiEventScopeTest.kt Uses shared timestamp import.
infra/​event-sync/​src/​test/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​face/​ApiFaceCapturePayloadTest.kt Uses shared timestamp import.
infra/​event-sync/​src/​test/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiOneToManyMatchPayloadTest.kt Uses shared timestamp import.
infra/​event-sync/​src/​test/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiFingerprintCapturePayloadTest.kt Uses shared timestamp import.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​usecases/​MapDomainEventScopeToApiUseCase.kt Imports shared timestamp mapper.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​session/​ApiLocation.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​session/​ApiEventScope.kt Uses shared timestamp type.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiVero2InfoSnapshotPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiSuspiciousIntentPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiScannerFirmwareUpdatePayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiScannerConnectionPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiRefusalPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiPersonCreationPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiOneToOneMatchPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiOneToManyMatchPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiLicenseCheckEventPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiInvalidIntentPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiIntentParsingPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiGuidSelectionPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiFingerprintCapturePayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiFingerprintCaptureBiometricsPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiFaceOnboardingCompletePayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiFaceFallbackCapturePayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiFaceCapturePayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiFaceCaptureConfirmationPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiFaceCaptureBiometricsPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiExternalCredentialSelectionPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiExternalCredentialSearchPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiExternalCredentialConfirmationPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiExternalCredentialCaptureValuePayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiExternalCredentialCapturePayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiEventUpSyncRequestPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiEventSampleUpSyncRequestPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiEventPayload.kt Uses shared timestamp type.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiEventDownSyncRequestPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiEnrolmentUpdatePayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiEnrolmentPayloadV4.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiEnrolmentPayloadV2.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiDeviceConfigurationUpdatedPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiConsentPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiConnectivitySnapshotPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiCompletionCheckPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiCandidateReadPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiCalloutPayloadV3.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiCalloutPayloadV2.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiCallbackPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiBiometricReferenceCreationPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiAuthorizationPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiAuthenticationPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiAlertScreenPayload.kt Uses shared timestamp utilities.
infra/​event-sync/​src/​main/​java/​com/​simprints/​infra/​eventsync/​event/​remote/​models/​ApiAgeGroupSelectionPayload.kt Uses shared timestamp utilities.
infra/​core/​src/​main/​java/​com/​simprints/​core/​api/​ApiTimestamp.kt Exposes shared timestamp model and mapper.
infra/​config-store/​src/​test/​java/​com/​simprints/​infra/​config/​store/​models/​ExperimentalProjectConfigurationTest.kt Tests reporting interval parsing.
infra/​config-store/​src/​main/​java/​com/​simprints/​infra/​config/​store/​models/​ExperimentalProjectConfiguration.kt Adds configurable reporting interval.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@luhmirin-s
luhmirin-s force-pushed the feature/MS-1537-device-status-updates branch from 410c5c9 to 26b56ac Compare October 15, 2026 11:42
@luhmirin-s
luhmirin-s requested review from a team, BurningAXE, TristramN, alex-vt, alexandr-simprints, meladRaouf and ybourgery and a balanced review from Copilot and removed request for a team October 15, 2026 11:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approved

No blocking issues were identified in the reporting flow, scheduling integration, or shared timestamp changes.

1 open finding

🧠 Review effort: Balanced

@luhmirin-s
luhmirin-s force-pushed the feature/MS-1537-device-status-updates branch from 26b56ac to c8dd664 Compare October 15, 2026 13:20
@luhmirin-s
luhmirin-s force-pushed the feature/MS-1537-device-status-updates branch from c8dd664 to fc74401 Compare October 15, 2026 14:10
@sonarqubecloud

Copy link
Copy Markdown

@luhmirin-s
luhmirin-s merged commit 94e2a23 into main Oct 19, 2026
14 checks passed
@luhmirin-s
luhmirin-s deleted the feature/MS-1537-device-status-updates branch October 19, 2026 12:11
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.

3 participants