Skip to content

fix: single plugin envelope for Matrix/Stalwart - #21

Merged
undivisible merged 1 commit into
masterfrom
fix/plugin-envelope-and-mutations
Sep 16, 2026
Merged

undivisible merged 1 commit into
masterfrom
fix/plugin-envelope-and-mutations

Conversation

@undivisible

Copy link
Copy Markdown
Contributor

Summary

plugin_invoke already wraps { ok, data }. Matrix/Stalwart list/send were wrapping again, so Swift invokeData saw nested envelopes. Also recurse IR mutations without unsafe raw pointers, and recover a poisoned store mutex instead of panicking.

Risk

Low for mutations/store. Transport JSON shape for list/send via plugin_invoke changes from nested {ok,data:{ok,data}} to a single envelope. HyperChat’s dedicated FFI (matrix_health_json etc.) 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.

@capy-ai

capy-ai Bot commented Sep 15, 2026

Copy link
Copy Markdown

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.

Open in Capy

@mergify

mergify Bot commented Sep 15, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

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
undivisible force-pushed the fix/plugin-envelope-and-mutations branch from 8d03320 to 2f61319 Compare September 16, 2026 01:45
@undivisible
undivisible merged commit c929027 into master Sep 16, 2026
2 checks passed
@undivisible
undivisible deleted the fix/plugin-envelope-and-mutations branch September 16, 2026 01:48
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