Skip to content

[REA-6846] Warn when a data channel refuses a frame - #229

Merged
douglaseel merged 2 commits into
mainfrom
douglas/rea-6846-surface-refused-data-channel-sends
Oct 5, 2026
Merged

douglaseel merged 2 commits into
mainfrom
douglas/rea-6846-surface-refused-data-channel-sends

Conversation

@douglaseel

@douglaseel douglaseel commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Why

The peer logs every data-channel send error at debug level, because a send can race teardown and that race is expected. reactor-webrtc 0.19 adds two refusals that aren't a race. One is a message larger than the client accepts. The other is a send that would pass what a chunked channel may queue. In both cases the frame is lost and the channel stays open, and an operator should be able to see that.

What Changed

DataChannelMessageTooLarge and DataChannelQueueFull are logged as warnings with the frame's size and channel. Every other send error stays at debug level. Nothing is raised, so callers of send_message / send_control and the model-author API see no change.

Unit tests cover both refusals and the quiet teardown race.

🤖 Generated with Claude Code

douglaseel commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

[codex-review] No issues found. This PR looks good.

Scope: full (238eb1e..af2c6ac).

View workflow run.

@Dere-Wah Dere-Wah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Nothing is raised, so callers see no change, and the teardown race stays at debug level. CI has the same unpublished 0.19.0 pin as #228 and must be green before merge. One optional note inline.

Comment thread src/reactor_runtime/transport/webrtc/peer.py Outdated
@douglaseel
douglaseel force-pushed the douglas/rea-6846-surface-refused-data-channel-sends branch 2 times, most recently from 1f8f017 to 224f688 Compare October 5, 2026 14:50
@douglaseel
douglaseel force-pushed the douglas/rea-6846-reactor-runtime-enable-dc-chunking branch from b55f0f0 to 20ccd70 Compare October 5, 2026 14:50
@douglaseel
douglaseel force-pushed the douglas/rea-6846-surface-refused-data-channel-sends branch from 224f688 to af4954c Compare October 5, 2026 15:59

douglaseel commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Oct 5, 4:43 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 5, 4:45 PM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 5, 4:46 PM UTC: @douglaseel merged this pull request with Graphite.

@douglaseel
douglaseel changed the base branch from douglas/rea-6846-reactor-runtime-enable-dc-chunking to graphite-base/229 October 5, 2026 16:44
@douglaseel
douglaseel changed the base branch from graphite-base/229 to main October 5, 2026 16:44
douglaseel and others added 2 commits October 5, 2026 16:44
Every send error was logged at debug level, since a send can race teardown
and that race is expected. reactor-webrtc 0.19 adds two refusals that are not
a race: a message larger than the client accepts, and one that would pass what
a chunked channel may queue. The frame is lost while the channel stays open,
so these are logged as warnings with the frame's size and channel. A send that
races teardown stays at debug level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Douglas Ferreira <douglaseel@gmail.com>
A model that oversends on every step logged a warning per frame, 30 a second
or more. The first refusal of each kind on each channel of a connection is
still a warning; repeats are logged at debug level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Douglas Ferreira <douglaseel@gmail.com>
@douglaseel
douglaseel force-pushed the douglas/rea-6846-surface-refused-data-channel-sends branch from af4954c to 2898bb7 Compare October 5, 2026 16:44
@douglaseel
douglaseel merged commit fda210a into main Oct 5, 2026
10 checks passed
@douglaseel
douglaseel deleted the douglas/rea-6846-surface-refused-data-channel-sends branch October 5, 2026 16:46
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.

2 participants