Skip to content

server: own standalone WebRTC sweep - #926

Merged
yisding merged 1 commit into
agent/ws25-webrtc-cleanup-finalizersfrom
agent/ws25-standalone-webrtc-sweep-scope
Aug 7, 2026
Merged

server: own standalone WebRTC sweep#926
yisding merged 1 commit into
agent/ws25-webrtc-cleanup-finalizersfrom
agent/ws25-standalone-webrtc-sweep-scope

Conversation

@yisding

@yisding yisding commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Problem

Standalone WebRTC shutdown created its final forced SessionManager.stop_all() sweep with raw asyncio.create_task(). A hard timeout can intentionally return while cancellation-resistant Session teardown is still unwinding, so this is exactly the kind of survivor that requires explicit ownership.

Changes

  • create the final Session sweep through a named RuntimeTaskScope
  • preserve the existing hard deadline, timeout warning, aggregate report handling, and error precedence
  • release the standalone scope when the sweep settles within the shutdown window
  • assert the sweep executes under the stable task name easycat-standalone-webrtc-session-sweep
  • reduce the reviewed raw-task-spawn inventory from 33 to 32
  • document ownership across a hard-timeout return

Why / impact

A timed-out final sweep remains strongly owned while it reacts to cancellation instead of becoming an anonymous background task. Completed failure reports continue to retain Session ledgers and surface the same shutdown error.

Root cause

The standalone server's final sweep used the hard-timeout helper's legacy background retention but had not been migrated to the named task ownership model in WS2.5.

Checks

  • standalone shutdown/source-inventory focused tests — 12 passed across focused runs
  • full WebRTC lifecycle file outside the sandbox — 45 passed / 33 skipped
  • Ruff on changed Python files — passed
  • mypy on webrtc_routes.py — passed
  • pre-commit hooks — passed

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 24e744a7-669e-4103-a2fb-960768ea0087

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yisding
yisding marked this pull request as ready for review August 7, 2026 02:44
@yisding
yisding force-pushed the agent/ws25-standalone-webrtc-sweep-scope branch from bd19437 to 05c0b8a Compare August 7, 2026 03:07
@yisding
yisding force-pushed the agent/ws25-standalone-webrtc-sweep-scope branch from 05c0b8a to ac49f26 Compare August 7, 2026 03:48
@yisding
yisding merged commit dea751c into agent/ws25-task-scope-policy Aug 7, 2026
2 checks passed
@yisding
yisding deleted the agent/ws25-standalone-webrtc-sweep-scope branch August 7, 2026 04:12
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