Feature/ab#2263 register config message#4
Open
flonix8 wants to merge 11 commits into
Open
Conversation
witchpou
approved these changes
Jul 1, 2026
There was a problem hiding this comment.
Pull request overview
This PR refactors saeapi from a placeholder “SAE API” stage into a stage that (1) periodically forwards the latest frame from each local video-source Valkey stream to a backend Valkey stream, and (2) publishes lifecycle startup/shutdown EventMessages to a backend Valkey stream, with corresponding config/template/docs/test updates.
Changes:
- Replace the previous
SaeApiprocessing loop withFrameForwarderpolling +EventReporterlifecycle publishing inrun_stage. - Introduce new config structure (
instance_id, separatesource_valkey/backend_valkey,frame_forwarding,event_reporting) and update settings template + README accordingly. - Add/expand smoke and unit tests for the stage, forwarding behavior (including base64/plain proto), and event reporting; update CI/container versions and the
visionapipin.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
saeapi/stage.py |
Replaces the old consumer/publisher loop with lifecycle reporting + periodic frame-forward polling thread. |
saeapi/frame_forwarder.py |
New component that scans source streams and forwards the latest frame to backend streams. |
saeapi/event_reporter.py |
New component that publishes startup/shutdown EventMessages to backend Valkey. |
saeapi/config.py |
Introduces new config models for Valkey endpoints, event reporting, and frame forwarding. |
saeapi/saeapi.py |
Removes the old placeholder SaeApi implementation. |
settings.template.yaml |
Updates template to the new config schema and stream naming. |
README.md |
Documents the new behavior, interfaces, and how to run/test. |
tests/conftest.py |
Adds a make_config factory to avoid relying on real settings. |
tests/test_stage.py |
Updates stage smoke tests to validate startup → forward → shutdown behavior. |
tests/test_frame_forwarder.py |
Adds unit tests for forwarding logic (latest frame, base64/plain fields). |
tests/test_event_reporter.py |
Adds unit tests for lifecycle event publishing. |
tests/test_imports.py |
Updates import smoke test to cover new top-level components. |
tests/test_config.py |
Updates config validation tests to match the new schema/defaults. |
pyproject.toml / poetry.lock |
Pins visionapi to a specific revision and updates lock contents. |
Dockerfile |
Updates base/build images to Python 3.14 tags. |
.github/workflows/*.yaml |
Updates container images and GitHub Actions versions used in workflows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+53
to
+54
| poll_thread = threading.Thread(target=poll_loop, name='frame-forwarder', daemon=True) | ||
| poll_thread.start() |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Motivation and Context
How has this been tested?
Screenshots (if appropriate):
Types of changes
Checklist: