Skip to content

PoC: Delegation of delayed disconnect event#139

Closed
fkwp wants to merge 118 commits intomainfrom
fkwp/delegation_of_delayed_events
Closed

PoC: Delegation of delayed disconnect event#139
fkwp wants to merge 118 commits intomainfrom
fkwp/delegation_of_delayed_events

Conversation

@fkwp
Copy link
Copy Markdown
Contributor

@fkwp fkwp commented Dec 16, 2025

This PR implements "Delegated MatrixRTC Membership Lifecycle Tracking using Cancellable Delayed Events"

Once a client hands over delay_id, delay_timeout and delay_cs_api_url a DelayedEventJob is started monitoring the LiveKit WebRTC lifecycle of that participant. The DelayedEventJob are organized per room and tracked by a LiveKitRoomMonitor

The flow is:

  • the clients SFURequest is processed by the handler (processSFURequest)
  • A LiveKitRoomMonitor is acquired which gets the DelayedEventJob handed over
  • A webhook from the LiveKit SFU is dispatched by the handler and passes participant LiveKit WebRTC lifecycle updates to the corresponding LiveKitRoomMonitor -> DelayedEventJob

fkwp added 13 commits April 2, 2026 15:54
…new tests for ExecuteDelayedEventAction, and improve error handling.
- Consolidated test cases for missing parameters in POST requests.
- Added tests for method not allowed and invalid JSON responses.
- Enhanced LiveKitRoomMonitor tests to ensure proper job handling and cleanup.
- Introduced new tests for Handler's loop and delayed event job processing.
…sts for /membership_leave_delegation endpoint
…icipant is still connected): Add SFUParticipantGone signal handling and sanity check interval configuration

- Introduced SFUParticipantGone signal to manage missed disconnect webhooks.
- Implemented sanity check interval for participant presence verification on SFU.
- Updated related tests to ensure correct handling of the new signal and configuration.
@fkwp fkwp force-pushed the fkwp/delegation_of_delayed_events branch from 9fd45d7 to 135a98d Compare April 8, 2026 11:36
@fkwp fkwp force-pushed the fkwp/delegation_of_delayed_events branch from b9f4409 to 1b1fb87 Compare April 8, 2026 11:47
@fkwp fkwp removed the docker build label Apr 8, 2026
@fkwp fkwp force-pushed the fkwp/delegation_of_delayed_events branch from 7bd47b2 to 7977544 Compare April 8, 2026 13:13
@fkwp fkwp force-pushed the fkwp/delegation_of_delayed_events branch from 5ea998a to 1268c59 Compare April 8, 2026 15:00
@fkwp
Copy link
Copy Markdown
Contributor Author

fkwp commented Apr 9, 2026

closing in favor of #171

@fkwp fkwp closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants