Repository navigation
feat: send a User-Agent on relay WebSocket upgrades - #9246
Conversation
buzz-acp, buzz-cli, buzz-ws-client, buzz-pairing-cli, buzz-audio-client and the mobile app now name themselves and their version on every relay WebSocket upgrade. buzz-ws-client and buzz-audio-client default to their own name and keep a User-Agent the caller supplies. Signed-off-by: Will Pfleger <wpfleger@block.xyz> Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>
🔐 Codex Security Review
Review SummaryOverall Risk: NONE
FindingsNo concrete security, correctness, or reliability findings were identified. Notes
Generated by Codex Security Review | |
…en; run ws-client and pairing tests in test-unit Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Co-authored-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz> Signed-off-by: Will Pfleger <wpfleger@block.xyz>
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 LGTM. One nit: in crates/buzz-acp/src/relay.rs the new do_connect_sends_user_agent test was inserted between do_connect_wrong_scheme_is_terminal and its doc comment, so that doc block now sits on top of the new test. Moving it back is optional.
…ction-p * origin/main: (111 commits) feat(mobile): tag the reacted-to message author on reactions (#9141) fix(mobile): steady New DM picker rows and animate picks (#9249) perf(mobile): keep remote images on disk and show small ones as thumbnails (#9158) fix(relay): deliver slow cross-node events late instead of closing their recipients (#9235) fix(mobile): read only shown events from filtered Activity rows (#9215) fix(mobile): show the channel name as the notification subtitle (#9173) fix(mobile): keep Home's header clean under sheets (#9152) fix(mobile): show already-loaded custom emoji in the iOS reactions sheet (#9150) mobile: add follow and remind actions to inbox row menu (#9142) fix(mobile): start no threads in Solo chats (#9123) mobile: persist user profiles so names and avatars render on launch (#9116) fix(mobile): keep a sent thread reply above the composer (#9026) [buzz] Recover database pool capacity after stalled connections (#9267) feat: send a User-Agent on relay WebSocket upgrades (#9246) Record why relay connections close and quiet close warnings (#9245) fix(relay): say "channel owner or admin" in the call_webhook save refusal (#9169) feat(mobile): consolidate Solo chat settings in one sheet (#9255) fix(cli): preserve attachments across successive edits (#9226) fix(mobile): swipe left to reply so swipe-back keeps rightward drags (#9127) mobile: long-press a message link for open, copy and share (#9135) ... Signed-off-by: Matthew Boston <mboston@squareup.com>
Renumbers the fork-only waker kinds out of upstream's 3017x/3018x run: KIND_WAKER_LAUNCH_BUNDLE 30180 -> 31180 (upstream block#8783 took 30180 for KIND_EMOJI_ENTRY) and KIND_WAKER_START_REQUEST 30181 -> 31181 (the next upstream slot). Both are payload labels only; every bundle and start request travels as a kind:1059 envelope, so nothing stored or in flight uses either number and no migration is needed. Also adapts the fork's two desktop publish_event callers to upstream block#9246's headers argument, and drops a needless borrow clippy flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Junchao Yan <yjc801@gmail.com>
Relay WebSocket clients in this repo now send a
User-Agentof the form<name>/<version>on the upgrade request. The version comes from the build.buzz-acpbuzz-acp/<crate version>buzz-clibuzz-cli/<crate version>buzz-ws-client(default)buzz-ws-client/<crate version>buzz-pairing-clibuzz-pairing-cli/<crate version>buzz-audio-client(default)buzz-audio-client/<crate version>Buzz-Mobile/<app version>buzz-ws-client: every connect path sends the default. AUser-Agentin the caller'sconnect_with_headersheaders replaces it, so other consumers can identify themselves without any new API.buzz-cliuses this to send its own name.buzz-audio-client: keeps aUser-Agentalready on the host-supplied request, and adds its default otherwise.openRelayWebSocketsets the HTTP client'suserAgent, which also covers the huddle transport. Startup waits up to 500 ms for the app version frompackage_info_plusbefore the app runs, so the first socket carries it; if the lookup fails or times out, the value isBuzz-Mobile.Each client has a test asserting the header on the upgrade request.