Skip to content

fix: make custom runtime control messages clone-safe#41

Merged
mrcrgl merged 1 commit into
mainfrom
fix/27-custom-control-message-clone-safety
Apr 7, 2026
Merged

fix: make custom runtime control messages clone-safe#41
mrcrgl merged 1 commit into
mainfrom
fix/27-custom-control-message-clone-safety

Conversation

@mrcrgl

@mrcrgl mrcrgl commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • change RuntimeControlMessage::Custom payload from Box<dyn Any + Send + Sync> to Arc<dyn Any + Send + Sync>
  • derive Clone for RuntimeControlMessage and remove panic-based manual clone implementation
  • update runtime custom-message helpers to construct Arc payloads
  • add regression test ensuring cloning custom control messages is safe
  • update changelog under Unreleased -> Fixed

Why

Issue #27 reports that cloning RuntimeControlMessage::Custom panics. This breaks expected clone semantics and can cause runtime surprises in generic code paths.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-features -- -D warnings
  • cargo test --all
  • cargo test --no-default-features

Closes #27

@mrcrgl mrcrgl marked this pull request as ready for review April 7, 2026 12:03
@mrcrgl mrcrgl merged commit 052fa38 into main Apr 7, 2026
3 checks passed
@mrcrgl mrcrgl deleted the fix/27-custom-control-message-clone-safety branch April 7, 2026 12:03
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.

RuntimeControlMessage::Custom panics when cloned

1 participant