Repository navigation
Add a serde tag to ParsedItem - #2546
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| #[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] | ||
| #[serde(tag = "type", rename_all = "snake_case")] | ||
| pub enum ParsedCommand { |
There was a problem hiding this comment.
[P1] Change ParsedCommand serialization format without versioning
Adding #[serde(tag="type", rename_all="snake_case")] in parse_command.rs (lines 4‑6) switches the enum from externally tagged to internally tagged. Any clients or stored logs expecting the old shape such as { "Read": {...} } will now fail to parse { "type": "read", ... }. No versioning or migration exists to manage this protocol break.
Useful? React with 👍 / 👎.
bolinfest
left a comment
There was a problem hiding this comment.
Not that it seems to matter much in this case, but I think we should move to camelCase where it makes sense?
Yeah, we should talk through conventions. In this case, I think snake case makes sense for a type tag in a discriminated union but we should strive for consistency (even if the convention is camelCase sometimes and snake_case sometimes) as long as the rules are clear |
No description provided.