Skip to content

Code reorganization to make it easier to detect and categorize on-the-wire changes #1919

Description

@ctm

Reorganize the code so that changes to the data structures that are passed between the client and server can be noticed and categorized.

I think we want to make a few marker traits that we use to tag types that are used in messaging, which roughly fall into the category of requests and messages (although some messages are responses, but currently there's no formal distinction). The idea would be to have a trait like TableMessageType and then define that (with a custom derive macro) in such a way that all the types used in the TableMessage enum must also have TableMessageType implementations (again, probably with a derive macro). We'd have to also mark all the primitive and foreign types with TableMessageType. We'd do this for lobby requests and responses, table requests and responses and the small number of other things we pass over the wire.

Then, the AI can be told to watch for breaking changes to any TableMessageType type as well as the other types that are used to pass information back and forth between the server and client. A breaking change would be anything that alters the shape or semantics that can't be recovered automatically (e.g., via serde's default attribute or through serde_de_chain).

If it will help, reorganize the source code in lib/commands.

Metadata

Metadata

Assignees

Labels

AICan probably be done correctly by AI with little guidancechoreMaintenance or other non-bug, non-featurehigh priorityShould be done fairly soon

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions