Skip to content

feat(conversation-recorder): add webhook support and enhance storage handling#2171

Open
Roei-Bracha wants to merge 3 commits into
TEN-framework:mainfrom
Roei-Bracha:conversation-recorder
Open

feat(conversation-recorder): add webhook support and enhance storage handling#2171
Roei-Bracha wants to merge 3 commits into
TEN-framework:mainfrom
Roei-Bracha:conversation-recorder

Conversation

@Roei-Bracha
Copy link
Copy Markdown
Contributor

@Roei-Bracha Roei-Bracha commented May 26, 2026

Description

This PR introduces webhook support for upload notifications, fixes prefix path issues for GCS and S3 upload destinations, ensures local recordings are preserved if uploads fail, and resolves a critical race condition.

Important

Critical Bug Fix: Fixes a race condition during initialization. If start_recording was invoked before on_start() completed, the event loop (self.loop) remained uninitialized, leading to a failure that could crash/fail the entire conversation pipeline.

Changes

  • conversation-recorder extension:
    • Race Condition Fix: Lazy-initialize the asyncio event loop in start_recording if it is not already set.
    • Add webhook configuration parameters in manifest.json.
    • Trigger webhook URL notification after successful upload in GCS or S3.
    • Correctly structure the object key prefix when uploading to GCS and S3 buckets.
    • Modify storage cleanup logic to preserve local file when upload raises an exception.
  • tests:
    • Add comprehensive unit tests for storage upload failure recovery and prefix path handling.
    • Add unit tests for event loop lazy-initialization logic.
    • Fix PYTHONPATH in test start script to correctly resolve the extension package.

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