Skip to content

Refactor MType into a string enum - #1251

Draft
JulienVig wants to merge 1 commit into
unit-tests-federated-controllerfrom
refactor-mtype
Draft

JulienVig wants to merge 1 commit into
unit-tests-federated-controllerfrom
refactor-mtype

Conversation

@JulienVig

Copy link
Copy Markdown
Collaborator

The current MType enum implicitly assigns an integer value to each message type. This means that inserting a new message, reorder messages, deleting messages, etc. change the implicit value of other messages. These values are what actually identify the message type. Differing message values between a client and a server or between peers can lead to unexpected errors and can be hard to troubleshoot.

I refactored the MType enum to use explicit string values such that changes the value of one message type doesn't impact the others.

@JulienVig
JulienVig added this pull request to stack #1252 October 9, 2026 15:46

This branch has not been deployed

No deployments
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.

1 participant