Skip to content

Feature/async signal index - #957

Merged
wakonig merged 3 commits into
mainfrom
feature/async_signal_index
Jun 26, 2026
Merged

Feature/async signal index#957
wakonig merged 3 commits into
mainfrom
feature/async_signal_index

Conversation

@wakonig

@wakonig wakonig commented Jun 15, 2026

Copy link
Copy Markdown
Member

Description

This PR introduces async signal indices for keeping track of individual updates of async signal events. This will become useful once we have the data api and try to match async and monitored signals.

Related Issues

closes #755

Type of Change

  • new endpoint device_async_signal_index
  • new message type DeviceAsyncSignalIndexMessage
  • bec message handler calculates the index and pushes the data to a list in redis

How to test

  • Run unit tests
  • Check redis for the new endpoint

@wakonig
wakonig force-pushed the feature/async_signal_index branch from 09f3570 to 3a38824 Compare June 15, 2026 11:04
@wakonig wakonig self-assigned this Jun 15, 2026
@wakonig
wakonig force-pushed the feature/async_signal_index branch 2 times, most recently from 016ed85 to c29d540 Compare June 15, 2026 11:25
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...er/bec_server/device_server/bec_message_handler.py 96.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@wakonig
wakonig force-pushed the feature/async_signal_index branch from c29d540 to b2a6124 Compare June 15, 2026 12:05
@wakonig
wakonig marked this pull request as ready for review June 15, 2026 12:06
Copilot AI review requested due to automatic review settings June 15, 2026 12:06

Copilot AI left a comment

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.

Pull request overview

This PR adds a companion “async signal index” channel to persist per-update indexing (+ shape metadata) for async device signal updates, enabling downstream services to correlate async updates even after the async stream data has expired.

Changes:

  • Add DeviceAsyncSignalIndexMessage and a new Redis LIST endpoint device_async_signal_index.
  • Extend the device-server async signal handler to compute per-signal update indices and publish them alongside async signal updates.
  • Update tests/mocks to serialize the new message and supply required async metadata in affected tests.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
bec_server/bec_server/device_server/bec_message_handler.py Computes async indices and publishes index+shape companion messages to a Redis list.
bec_lib/bec_lib/messages.py Introduces DeviceAsyncSignalIndexMessage message type.
bec_lib/bec_lib/endpoints.py Adds device_async_signal_index endpoint (LIST op).
bec_lib/tests/test_bec_messages.py Adds serialization roundtrip test for the new message type.
bec_lib/bec_lib/tests/utils.py Updates ConnectorMock.rpush to accept expire (and should align better with real connector).
bec_server/tests/tests_device_server/test_device_manager_ds.py Adjusts fixture and async message test inputs to include async_update metadata.

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

Comment thread bec_server/bec_server/device_server/bec_message_handler.py
Comment thread bec_server/bec_server/device_server/bec_message_handler.py
Comment thread bec_lib/bec_lib/tests/utils.py
@wakonig
wakonig requested a review from a team June 15, 2026 12:36
Comment thread bec_lib/bec_lib/messages.py
@wakonig
wakonig force-pushed the feature/async_signal_index branch 3 times, most recently from bd94492 to 0456324 Compare June 26, 2026 10:47
@wakonig
wakonig force-pushed the feature/async_signal_index branch from 0456324 to 761d3fb Compare June 26, 2026 11:19
@wakonig
wakonig merged commit 55eb602 into main Jun 26, 2026
37 checks passed
@wakonig
wakonig deleted the feature/async_signal_index branch June 26, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: AsyncSignal should push shape information on data to additional Endpoint

3 participants