Skip to content

Restore shared WebRTC manager input helpers - #432

Merged
jarcherNV merged 2 commits into
dev/jarcher/inference-runtime-apifrom
dev/jarcher/webrtc-share
Aug 8, 2026
Merged

Restore shared WebRTC manager input helpers#432
jarcherNV merged 2 commits into
dev/jarcher/inference-runtime-apifrom
dev/jarcher/webrtc-share

Conversation

@jarcherNV

Copy link
Copy Markdown
Collaborator

No description provided.

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR restores shared WebRTC input canonicalization and inference-session helpers, migrates Lingbot to the shared session path, and fixes completed inference sessions so they close normally rather than entering the retry policy.

  • Adds synchronous worker dispatch and a distributed session-step signal for thread-affine inference.
  • Centralizes user-event validation, buffering, canonicalization, mapping, and skipped-window state advancement in the WebRTC manager.
  • Treats an exhausted inference session as normal completion and closes its WebRTC resources.
  • Updates Lingbot and its tests to use the shared inference-session flow.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
flashdreams/flashdreams/serving/webrtc/manager.py Restores shared input/session helpers and handles normal inference-session exhaustion through lifecycle-safe session closure.
flashdreams/flashdreams/runtime/worker.py Adds blocking dispatch onto the runtime-owned thread for synchronous inference-session calls.
integrations/lingbot/lingbot/webrtc/session.py Adapts Lingbot to shared canonicalization, input mapping, and thread-affine inference-session stepping.
flashdreams/tests/test_webrtc_manager.py Adds coverage confirming completed sessions close once without stepping or retrying.

Sequence Diagram

sequenceDiagram
    participant Client
    participant Manager as WebRTC Manager
    participant Canonicalizer
    participant Session as Inference Session
    Client->>Manager: key/text event
    Manager->>Manager: validate and buffer event
    Manager->>Canonicalizer: canonicalize events for TimeWindow
    Canonicalizer-->>Manager: canonical inputs
    Manager->>Session: next_step_request()
    alt request available
        Manager->>Session: step(mapped inputs)
        Session-->>Manager: StepResult
        Manager-->>Client: video chunk and chunk_done
    else session exhausted
        Session-->>Manager: None
        Manager->>Manager: close active session
    end
Loading

Reviews (2): Last reviewed commit: "fix(webrtc): restore session completion ..." | Re-trigger Greptile

Comment thread flashdreams/flashdreams/serving/webrtc/manager.py Outdated
Treat completed inference sessions as terminal in the shared WebRTC manager,
restore LingBot's session-branch adapter against the current model-session
core, and update affected WebRTC tests for the current result and manager APIs.
@jarcherNV
jarcherNV merged commit a7ea381 into dev/jarcher/inference-runtime-api Aug 8, 2026
6 checks passed
@jarcherNV
jarcherNV deleted the dev/jarcher/webrtc-share branch August 8, 2026 23:33
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