chore(xmtp_proto): canonicalize generated protos to sorted input order - #3849
Conversation
|
Claude finished @tylerhawkes's task —— View job Code Review Complete ✓Review Date: 2026-07-13 21:36 UTC Tasks
Review SummaryThis PR accomplishes what it claims: a pure canonicalization of generated protobuf code to match sorted input order, plus a proto_version correction. The changes are mechanical and low-risk. Findings✅ Proto Version Correction (proto_version)The update from Location: ✅ Pure Module Reordering (xmtp.xmtpv4.message_api.rs)The changes are exactly as described: reordering of server module implementations to match sorted input order. The diff shows:
Location: ✅ Binary Descriptor Update (proto_descriptor.bin)The descriptor blob changed from 386,348 → 385,679 bytes (~669 byte reduction), consistent with the file order change. This is expected when protobuf file ordering changes. Location: Code Quality Assessment
RecommendationLGTM - This is a clean-up PR that makes the generated code match the new canonical ordering. The proto_version correction is particularly valuable as it prevents future confusion about which proto definitions are actually in use. No action items identified. |
ApprovabilityVerdict: Approved Build infrastructure change that adds sorting to proto file processing for deterministic code generation. The large diff is auto-generated proto code reordered by the new sorting. Author owns all changed files. You can customize Macroscope's approvability policy. Learn more. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## tyler/proto-gen-sort #3849 +/- ##
========================================================
- Coverage 85.24% 85.21% -0.04%
========================================================
Files 413 413
Lines 64733 64733
========================================================
- Hits 55183 55161 -22
- Misses 9550 9572 +22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Dismissing prior approval to re-evaluate ba60fc1
ba60fc1 to
3096f13
Compare
Summary
One-time canonicalization of the checked-in generated protos to the sorted input order introduced by the parent PR, plus a
proto_versioncorrection. Stacked ontyler/proto-gen-sort.Two things worth knowing:
proto_versionwas stale. The checked-in gen files already contain the add TaskRunner scheduling protos: PullInDeadline, KpRotation, KpDeletion proto#339 TaskRunner messages (PullInDeadline,KpRotation,KpDeletion— used byworker/tasks.rsand friends), but the pin still pointed atf04e01a9, which predates them. A pin-faithful regen would have deleted types the workspace uses. This PR moves the pin tob51de7f3(Group members listing #339), the rev the files actually correspond to.xmtp.xmtpv4.message_api.rswas sitting in non-canonical order (plus the descriptor blob, which records file order). Old and new files hash identically after line-sorting — pure reordering, zero semantic change. Everything else was already canonical.Verified: regen run twice produces no further changes;
cargo check -p xmtp_proto -p xmtp_mlsgreen.🤖 Generated with Claude Code
https://claude.ai/code/session_017AVuJ7VAgen2fFhtJQ6zid
Note
Canonicalize generated protos in
xmtp_prototo sorted input orderRegenerates protobuf output in xmtp.xmtpv4.message_api.rs and the binary descriptor after updating the proto commit hash to
b51de7f3f89cb872ea4044544ad0c12c9373b00f. The only changes are reordering of emitted server module blocks (NotificationApiServer,PublishApiServer,MisbehaviorApiServer) to match sorted input order; service names, method paths, and request/response types are unchanged.Macroscope summarized 3096f13.