Skip to content

chore(xmtp_proto): regenerate protos for the metadata update guard - #4018

Merged
tylerhawkes merged 1 commit into
mainfrom
tyler/appdata-cb-proto
Aug 19, 2026
Merged

chore(xmtp_proto): regenerate protos for the metadata update guard#4018
tylerhawkes merged 1 commit into
mainfrom
tyler/appdata-cb-proto

Conversation

@tylerhawkes

@tylerhawkes tylerhawkes commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Stack

Merge bottom-up — each PR is based on its parent below.


Regenerates the Rust protos to pick up xmtp/proto#343, which adds expected_field_value to UpdateMetadataData.V1 — the compare-and-swap guard the metadata-update intent needs.

UpdateMetadataData lives in the xmtp.mls.database package: it is the payload libxmtp stores for a queued intent, never sent on the wire. Nothing about the MLS commit format changes.

Unrelated fallout worth flagging

Regenerating from main also picks up xmtp/proto#342 (KpLiveness Task variant), which merged before #343 — there is no way to take one without the other. That variant makes an exhaustive match in worker/tasks.rs non-exhaustive, so this PR adds an arm for it.

Nothing in this crate schedules a KpLiveness task, so a row can only appear from a newer client sharing the database. The arm logs and deletes rather than retrying forever; the owning feature should replace it with real handling.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AdY7WKkNbJmdzpmUWvW1my

Note

Regenerate protos to add expected_field_value field and KpLiveness task type

  • Regenerates proto definitions: UpdateMetadataData.V1 gains an optional expected_field_value field (tag 3), and Task gains a new KpLiveness variant (tag 8).
  • Updates intents.rs to set expected_field_value: None when encoding UpdateMetadataIntentData.
  • Adds a match arm in tasks.rs for Task::KpLiveness that logs a warning and deletes the task instead of retrying it.
  • Updates the pinned proto commit hash in proto_version to dedb872.

Macroscope summarized c5f2ef2.

@tylerhawkes
tylerhawkes requested a review from a team as a code owner August 19, 2026 18:51
@claude

claude Bot commented Aug 19, 2026

Copy link
Copy Markdown

Claude finished @tylerhawkes's task —— View job


Code Review — 2026-08-19 19:17 UTC

Summary

This PR cleanly regenerates Rust protos to add the expected_field_value field for metadata update compare-and-swap. The handling of the unrelated KpLiveness task variant is appropriate. No issues found.

Review Notes

Proto Changes (xmtp.mls.database.rs:300-305)

  • expected_field_value field correctly added as optional to UpdateMetadataData.V1
  • Documentation is clear about the compare-and-swap semantics
  • Backward compatible (optional field with last-writer-wins when absent)

Intent Handling (intents.rs:263-265)

  • Correct: hardcoded None maintains existing last-writer-wins behavior
  • Comment accurately explains future usage

Task Handling (tasks.rs:445-455)

  • Appropriate strategy: log-and-delete rather than retry forever
  • Clear warning message explains the version skew scenario
  • Explicit task deletion prevents infinite retry loops
  • Good defensive handling for forward compatibility

Generated Code

  • All serde implementations for KpLiveness are machine-generated and correct
  • Proto descriptor binary updated as expected
  • Version hash updated correctly

Observations

  • No test coverage for the new expected_field_value field, but this is expected since the field is populated as None and usage comes in a follow-up PR
  • The KpLiveness handling aligns with the pattern used elsewhere (e.g., malformed group_id deletion in lines 485-492)

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 19, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at c5f2ef2

Macroscope's review found this PR approvable — Proto regeneration adding new structures with minimal defensive code. The hand-written changes explicitly preserve existing behavior (new optional field set to None, unknown task type simply deleted). Author owns all changed files.

You can add or adjust custom eligibility rules. Learn more.

@tylerhawkes
tylerhawkes force-pushed the tyler/appdata-cb-proto branch from 1503a79 to c5f2ef2 Compare August 19, 2026 19:16
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 19, 2026 19:16

Dismissing prior approval to re-evaluate c5f2ef2

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.93%. Comparing base (da3e3c5) to head (c5f2ef2).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/xmtp_mls/src/worker/tasks.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4018      +/-   ##
==========================================
- Coverage   86.00%   85.93%   -0.07%     
==========================================
  Files         417      417              
  Lines       68165    68170       +5     
==========================================
- Hits        58622    58579      -43     
- Misses       9543     9591      +48     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tylerhawkes
tylerhawkes merged commit e3f9c62 into main Aug 19, 2026
45 of 47 checks passed
@tylerhawkes
tylerhawkes deleted the tyler/appdata-cb-proto branch August 19, 2026 19:45
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