Skip to content

Plugin IPC: allow messages up to 1 GiB - #3477

Merged
HakanSeven12 merged 1 commit into
HakanSeven12:mainfrom
D-Fed11:pr/plugin-ipc-message-limit
Nov 23, 2026
Merged

HakanSeven12 merged 1 commit into
HakanSeven12:mainfrom
D-Fed11:pr/plugin-ipc-message-limit

Conversation

@D-Fed11

@D-Fed11 D-Fed11 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Summary

The plugin IPC transport and proxy refuse messages larger than 64 MiB. A full document snapshot of a large drawing (about 90 MB, tens of thousands of entities) exceeds that, so on such a drawing every command of an out-of-process plugin fails with message too large and the plugin stops responding.

The limit is raised to 1 GiB in both places. It still protects host and runner against a runaway or malicious peer.

Changes

  • ipc/transport.rs, ipc/proxy.rs: MAX_MESSAGE_SIZE = 1 GiB, doc comment updated.
  • ipc/mod.rs: the oversized-message test now writes a frame header announcing 1 GiB + 1 MiB and checks that recv refuses it before allocating, so the test does not need a 1 GiB buffer on the CI runners.

Testing

  • cargo test -p ocs_plugin_api --features host --lib ipc:: (57 passed).
  • An out-of-process plugin working on a ~90 MB drawing: commands work again.

🤖 Generated with Claude Code

A full document snapshot of a large drawing (about 90 MB) exceeded the
64 MiB message limit, so every command of an out-of-process plugin failed
with 'message too large' on such a drawing and the plugin stopped
responding.
@HakanSeven12
HakanSeven12 merged commit 22731a9 into HakanSeven12:main Nov 23, 2026
8 checks passed
HakanSeven12 pushed a commit that referenced this pull request Nov 23, 2026
With the 1 GiB cap (#3477) a frame header alone allocated the whole
frame before any payload came. The receive paths now read into a buffer
that grows by at most 16 MiB ahead of the data, and the texts that still
said 64 MiB are updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013CaxngxnsGEAQ4V12YE1DP
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