Skip to content

Require explicit operation IDs for prekey bundle publication#54

Merged
chgaowei merged 1 commit into
agent-network-protocol:masterfrom
smartGrey:zhuocheng/0716-fix
Jul 20, 2026
Merged

Require explicit operation IDs for prekey bundle publication#54
chgaowei merged 1 commit into
agent-network-protocol:masterfrom
smartGrey:zhuocheng/0716-fix

Conversation

@smartGrey

Copy link
Copy Markdown
Collaborator

Summary

  • require callers of the Rust prekey bundle publish helper to provide the operation_id explicitly
  • separate stable bundle_id semantics from idempotency for the complete Bundle + OPK publish payload
  • document that exact retries reuse an operation ID while a changed OPK sidecar uses a new one

Rationale

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_id therefore 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
  • 38 passed, 0 failed, 0 skipped

@chgaowei
chgaowei merged commit 6efd78f into agent-network-protocol:master Jul 20, 2026
1 check passed
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.
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.

2 participants