Skip to content

Refactor MType into a string enum - #1251

Merged
JulienVig merged 1 commit into
mainfrom
refactor-mtype
Oct 13, 2026
Merged

JulienVig merged 1 commit into
mainfrom
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 force-pushed the refactor-mtype branch 2 times, most recently from 3224f40 to 15d2ea9 Compare October 9, 2026 14:57
@JulienVig
JulienVig added this pull request to stack #1252 October 9, 2026 15:46
Base automatically changed from unit-tests-federated-controller to main October 13, 2026 11:41
@JulienVig
JulienVig marked this pull request as ready for review October 13, 2026 14:41
@JulienVig
JulienVig merged commit 7fec22b into main Oct 13, 2026
20 checks passed
@JulienVig
JulienVig deleted the refactor-mtype branch October 13, 2026 15:05
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