Skip to content

Add extension event transport planning and migration hooks#800

Open
Kane610 wants to merge 18 commits into
masterfrom
feat/extensions-first-event-capability
Open

Add extension event transport planning and migration hooks#800
Kane610 wants to merge 18 commits into
masterfrom
feat/extensions-first-event-capability

Conversation

@Kane610

@Kane610 Kane610 commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

Add the extension-first event capability surface for transport filter planning and rollout-safe topic normalization, then organize the new event code under dedicated events subpackages.

What changed

  • add transport capability and desired-subscription contracts
  • add topic normalization helpers and unique ID migration utilities
  • extend event instances with supported-topic descriptors and transport payload builders
  • add local event allow-list support and MQTT/WebSocket filter hook integration
  • add explicit Vapix planning/apply APIs plus unique-ID migration helper methods
  • add hardening tests for apply flags and unsupported MQTT behavior
  • move new interface event modules to axis/interfaces/events/
  • move core event model modules to axis/models/events/
  • keep compatibility shims at axis/models/event.py and axis/models/event_instance.py so existing imports continue to work

Validation

  • uv run ruff check axis tests
  • uv run ruff format --check axis tests
  • uv run mypy axis
  • uv run pytest

All checks passed with 445 tests passing and total coverage at 98.01%.

Kane610 added 18 commits May 14, 2026 15:45
- Add axis/models/events/topic_filter.py with EventTopicFilter:
  frozen dataclass with explicit None wildcard sentinel, from_topics()
  classmethod (raises on empty), is_wildcard/canonical_topics/
  mqtt_topic_filters properties, and from_desired_subscriptions()
  compat helper
- Export EventTopicFilter from axis/models/events/__init__.py
- Replace StreamManager._event_filter_list with _event_subscription:
  EventTopicFilter; add set_event_subscription(); keep deprecated
  set_event_filter_list() bridge shim; project wire-format dicts in
  _build_stream() (transport layer, not model)
- Simplify apply_event_transport_filters() to return None; build
  EventTopicFilter directly instead of raw dict payloads
- Deprecate DesiredEventSubscription with docstring
- Add tests/test_event_topic_filter.py (100% coverage of new class)
- Update test_stream_manager.py and test_vapix.py
Move SegmentFormat, to_canonical, to_mqtt, to_topic_filter, detect_format
and helpers into topic_filter.py — they are all part of the same topic-
format domain that EventTopicFilter owns.

- Delete axis/models/events/topic_normalizer.py
- Update three interface importers (event_instances, event_manager, mqtt)
- Update tests/test_topic_normalizer.py to import from topic_filter
- Export new symbols from axis/models/events/__init__.py

No behaviour change; all 463 tests pass, coverage 98.01%.
- remove DesiredEventSubscription compatibility model
- remove from_desired_subscriptions and set_event_filter_list bridges
- move EventTransport into transport_capabilities
- delete subscription_contracts.py
- update vapix/event_instances APIs and tests to use EventTopicFilter directly
- expand module docs and add focused coverage tests
- add EventTransportManager in interfaces/events/transport_manager.py
- remove event transport capability/descriptor/apply methods from Vapix
- expose event_transport manager on AxisDevice
- update tests to call new ownership path
- add coverage test for default filter resolution branch
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.

1 participant