Skip to content

chore(protos): sync flipcash protobuf definitions and adapt service layer#1105

Merged
bmc08gt merged 3 commits into
code/cashfrom
chore/flipcash-proto-sync
Jul 20, 2026
Merged

chore(protos): sync flipcash protobuf definitions and adapt service layer#1105
bmc08gt merged 3 commits into
code/cashfrom
chore/flipcash-proto-sync

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Syncs the flipcash protobuf definitions from upstream and adapts the service layer to the changes. Split into three commits:

  1. chore(protos) — the raw proto definition update (no code)
  2. fix(services,persistence) — P1: resolve compile breaks from the breaking proto changes + Room migration
  3. fix(services) — P2: close runtime-correctness gaps (new moderation result + blob update events)

Proto changes of note

  • blob/v1: new Blob lifecycle (BlobStatus, Blob/BlobBatch), Media/Rendition (moved from messaging), UploadPolicy/UploadTarget/DownloadUrl, RejectionMetadata, AccessContext; BlobMetadata.download_url is now a DownloadUrl message
  • chat/v1: ChatType promoted to top-level, DMCONTACT_DM, added TIP_DM; GetDmChatFeedRequest.dm_chat_type filter
  • profile/v1: SetProfilePicture RPC, UserProfile.profile_picture, SetDisplayName FAILED_MODERATED + flagged_category
  • messaging/v1: MediaContent.items now blob.v1.Media; MediaItem removed
  • moderation/v1: FlaggedCategory + ModerationAttestation moved to model.proto
  • event/v1: Event gains BlobUpdate; intent/v1: TipDmPayment; resolver/v1: user_id

Code adaptation

breaking-change fixes + migration

  • ChatType domain enum + proto→domain mapper + direct-send DM filter (CONTACT_DM)
  • Media converters retargeted to blob.v1.Media/Rendition (both directions)
  • BlobMetadata.download_url read via .url
  • ModerationAttestation type moved to moderation.v1.Model
  • Room migration 22→23 rewrites persisted chat_type 'DM''CONTACT_DM' (data-only, no schema change)
  • Affected unit tests updated

runtime correctness

  • SetDisplayName maps FAILED_MODERATEDSetDisplayNameError.FailedModerated(category) instead of a generic error
  • Event stream now handles BLOB_UPDATE: new BlobUpdate domain model + mappers, onBlobUpdate threaded through the repository, and EventStreamingController.blobUpdates exposed as a Flow (mirrors chatUpdates)

Sync flipcash protos from upstream. Notable changes:
- blob/v1: new Blob lifecycle (BlobStatus, Blob/BlobBatch), Media/Rendition
  (moved from messaging), UploadPolicy/UploadTarget/DownloadUrl,
  RejectionMetadata, AccessContext; download_url is now a DownloadUrl message
- chat/v1: ChatType promoted to top-level, DM renamed CONTACT_DM, added TIP_DM;
  GetDmChatFeedRequest gains dm_chat_type filter
- profile/v1: SetProfilePicture RPC, UserProfile.profile_picture,
  SetDisplayName FAILED_MODERATED result + flagged_category
- messaging/v1: MediaContent.items now blob.v1.Media; MediaItem removed
- moderation/v1: FlaggedCategory and ModerationAttestation moved to model.proto
- event/v1: Event gains BlobUpdate; intent/v1: TipDmPayment; resolver/v1: user_id

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added type: chore Maintenance, config, CI/CD area: network gRPC, connectivity, API, exchange rates and removed type: chore Maintenance, config, CI/CD labels Jul 20, 2026
bmc08gt and others added 2 commits July 20, 2026 17:11
Resolve compile breaks introduced by the proto sync:
- ChatType moved to a top-level enum and DM renamed to CONTACT_DM (+ TIP_DM):
  update the domain enum, the proto->domain mapper, and the direct-send DM
  filter (CONTACT_DM keeps phone-keyed contacts intact)
- messaging MediaItem/MediaItemRendition removed in favour of blob.v1
  Media/Rendition: retarget the media converters in both directions
- BlobMetadata.download_url is now a DownloadUrl message: read its .url
- ModerationAttestation moved from ModerationService to moderation.v1.Model

Add Room migration 22->23 rewriting persisted chat_type 'DM' -> 'CONTACT_DM'
so existing chat rows keep resolving after the rename (data-only, no schema
change). Update affected unit tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Close runtime-correctness gaps from the proto sync:
- SetDisplayName: map the new FAILED_MODERATED result to a dedicated
  SetDisplayNameError.FailedModerated carrying the flagged category, instead
  of falling through to a generic error
- Event stream: handle the new BLOB_UPDATE event. Add a BlobUpdate domain
  model + mappers, thread an onBlobUpdate callback through the repository, and
  expose EventStreamingController.blobUpdates as a Flow (mirrors chatUpdates),
  ready for the upcoming media/profile-picture consumers

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bmc08gt
bmc08gt force-pushed the chore/flipcash-proto-sync branch from c7ac29d to 51a3ef6 Compare July 20, 2026 21:13
@github-actions github-actions Bot added the type: chore Maintenance, config, CI/CD label Jul 20, 2026
@bmc08gt
bmc08gt merged commit 6d126db into code/cash Jul 20, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the chore/flipcash-proto-sync branch July 20, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: network gRPC, connectivity, API, exchange rates type: chore Maintenance, config, CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant