fix: single plugin envelope for Matrix/Stalwart - #21
Merged
Merged
Conversation
|
Capy couldn't review this pull request because Max's workspace is out of credits, add credits or enable auto-reload to resume automatic reviews. |
|
Tick the box to add this pull request to the merge queue (same as
|
Matrix and Stalwart list/send already went through plugin_invoke's
{ok,data} wrapper, so nested ok/data broke invokeData. Recurse IR
mutations without raw pointers and recover a poisoned store lock.
Amp-Thread-ID: https://ampcode.com/threads/T-01a0a632-0bd5-7371-8f63-23825bae184c
Co-authored-by: Max Carter <undivisible@vk.com>
undivisible
force-pushed
the
fix/plugin-envelope-and-mutations
branch
from
September 16, 2026 01:45
8d03320 to
2f61319
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plugin_invokealready wraps{ ok, data }. Matrix/Stalwartlist/sendwere wrapping again, so SwiftinvokeDatasaw nested envelopes. Also recurse IR mutations withoutunsaferaw pointers, and recover a poisoned store mutex instead of panicking.Risk
Low for mutations/store. Transport JSON shape for
list/sendviaplugin_invokechanges from nested{ok,data:{ok,data}}to a single envelope. HyperChat’s dedicated FFI (matrix_health_jsonetc.) is unchanged.Tests
Adds envelope-shape tests and nested mutation coverage. Workspace tests pass locally.
Not auto-merged: transport JSON is a caller-visible contract.