Require explicit operation IDs for prekey bundle publication#54
Merged
chgaowei merged 1 commit intoJul 20, 2026
Merged
Conversation
chgaowei
added a commit
that referenced
this pull request
Jul 20, 2026
…cs (#55) Go derives the publish operation ID from the complete payload: the stable bundle ID plus a digest of the sorted OPK sidecar key IDs, so exact retries reuse the ID while a replenished OPK sidecar produces a new one instead of tripping the server idempotency check. Python now requires an explicit operation_id in PrekeyManager.publish_prekey_bundle, mirroring the Rust helper change in #54; internal callers pass op-publish-<bundle_id>, which identifies the bundle-only payload.
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.
Summary
operation_idexplicitlybundle_idsemantics from idempotency for the complete Bundle + OPK publish payloadRationale
A signed prekey Bundle remains stable while its top-level one-time-prekey sidecar may be replenished. Deriving the publish operation ID only from
bundle_idtherefore reuses one idempotency key for different request bodies and causes a valid replenishment to conflict.Compatibility
This intentionally changes the Rust helper signature. Product callers must provide an operation ID that identifies the complete publish payload. The wire protocol fields do not change.
Validation
cargo test --manifest-path rust/Cargo.toml direct_e2ee --lib