Repository navigation
chore(contract): sync flipcash2 protos to 35f99814 - #12
Merged
Merged
Conversation
Picks up #93-#98 on flipcash2-protobuf-api. Three fields were renamed in place at the same field numbers, so the wire format is unchanged and the break is source-level only: - messaging.v1 EmojiReaction.sequence and ReactionUpdate.sequence become version, an opaque ordering token compared the same way as chat.v1.RosterSummary.version rather than a chat event sequence - blob.v1 AccessContext.profile becomes user_profile, making room for a chat_profile scope alongside it Additive on chat.v1.Metadata: picture, roster_summary, and rules, with Rules/ListenerRules/SpeakerRules/StaffRequirement/MinimumBalanceRequirement behind them, plus a new import of blob/v1/model.proto. No field or enum was renumbered and no enum case was added or removed, so nothing shifts under iOS's positional Error*(rawValue:) mapping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Syncs to
flipcash2-protobuf-api@35f99814, six commits on from the797052ddthis was pinned at:3ff3aa91Expand chat Metadata for groups (#93)203b82baAdd chat_profile to blob AccessContext (#94)48212aa8Add RosterSummary and update EmojiReaction sequence to version to reflect usage (#95)abd0ed88Fix RosterSummary validation (#96)da3e37f5Add initial chat ruleset with minimum balance requirements (#97)35f99814Update chat rules to be a repeated with and introduce staff requirements (#98)Intended release: 0.6.0. Source-breaking, so the minor bump carries it pre-1.0. The
CHANGELOG.mdentry is in this PR, sincepublish.ymlreads the section matching the version it publishes and refuses a version with none.What changed
Three proto files. Nothing was renumbered anywhere, so the wire format is unchanged and an old client keeps decoding new messages — but three fields were renamed in place, and those names are what consumers compile against.
Renames, same field numbers
messaging/v1/model.protoEmojiReaction.sequence(5)EmojiReaction.versionmessaging/v1/model.protoReactionUpdate.sequence(6)ReactionUpdate.versionblob/v1/model.protoAccessContext.profile(2)AccessContext.user_profileThe messaging rename is a correction, not a semantic change: the value is a per-aggregate version advanced by one on every change, already documented as opaque and ordering-only, and the old name read as a position in the chat event sequence. It is neither that nor gapless. Last-writer-wins per (message, emoji), and per actor for
reacted_by_self, as before.The blob rename makes room for the new arm below. Because
scopeis a oneof, an exhaustiveswitch/whenover it breaks twice: once on the renamed case, once on the added one.Additions
blob.v1.AccessContext.scopegainschat_profile(3,common.v1.ChatId). It authorizes reading a chat's public profile picture and nothing else: the blob has to be a rendition of that chat's current picture, so renditions of a superseded picture stop resolving through it. That expiry is what separates it from the existingchatscope.chat.v1.Metadatagains three fields, all additive:picture(9,blob.v1.Media) — group chats only, optional. This is whychat/v1/model.protonow importsblob/v1/model.protofor the first time.roster_summary(10,chat.v1.RosterSummary, required) —member_countis the roster's true size, whereMetadata.membersis only a subset for large groups.versionadvances by one on every membership-record change and is opaque: compare against the value you held, refetch on a difference, keep the greater value on a stream. There is no delta to fetch, only a refetch, and a profile change never moves it.rules(11,chat.v1.Rules) — group chats only; unset means no participation requirements, so existing chats are unaffected.listenergates reading and joining,speakergates sending, each up to 32 entries and each independently optional. Speaker rules apply on top of listener rules.ListenerRulesandSpeakerRulesare separate messages with identicalkindoneofs overminimum_balanceandstaff;StaffRequirementis empty and meansUserFlags.is_staff;MinimumBalanceRequirementcarries a required fiatamountplus amintslist capped at one entry today, repeated only so more can be allowed later.No enum touched
No enum declaration or case changed anywhere in this sync, and no field was renumbered. That is the one change class whose downstream weight is invisible in a diff — iOS maps result enums positionally through
Error*(rawValue:), so an inserted case silently renumbers every case after it. Nothing here does.Consumers
Both app PRs are open and build against this checkout through the local override. They are drafts because they pin
0.6.0, which does not exist until this merges andpublish.ymlruns:scripts/toolchain.envis untouched, andSources/moved only in the three filesproto/did.