Skip to content

Feature/ab#2263 register config message#4

Open
flonix8 wants to merge 11 commits into
mainfrom
feature/AB#2263-register-config-message
Open

Feature/ab#2263 register config message#4
flonix8 wants to merge 11 commits into
mainfrom
feature/AB#2263-register-config-message

Conversation

@flonix8

@flonix8 flonix8 commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Description

  • Add frame forwarding feature (sends single frame from all video sources to configurable valkey output stream at a specified interval)
  • Output startup and shutdown events on a configurable valkey output stream (component level, but we assume that it will eventually converge with SAE state as a whole)

Motivation and Context

How has this been tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@flonix8 flonix8 requested a review from witchpou June 26, 2026 12:19

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.

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 SaeApi processing loop with FrameForwarder polling + EventReporter lifecycle publishing in run_stage.
  • Introduce new config structure (instance_id, separate source_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 visionapi pin.

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 thread saeapi/stage.py
Comment thread saeapi/stage.py
Comment on lines +53 to +54
poll_thread = threading.Thread(target=poll_loop, name='frame-forwarder', daemon=True)
poll_thread.start()
Comment thread saeapi/frame_forwarder.py
Comment thread saeapi/frame_forwarder.py
Comment thread saeapi/config.py Outdated
Comment thread saeapi/config.py Outdated
flonix8 and others added 2 commits July 2, 2026 17:29
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>
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.

3 participants