Repository navigation
AIDA-2426: Set a default User-Agent for plugins - #2697
Conversation
Use the existing Buzz identifier for both shared native clients so GitHub accepts plugin requests. Preserve explicit request headers. Co-authored-by: BuzzPRReviewAssistant1 <a581a7e8115222acdc32ffb14bfce55d48c24478d98e155f8eba126b69b83c7b@buzz.block.builderlab.xyz> Signed-off-by: Ravneet Arora <[email protected]>
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 One plugin upload path remains outside the new default User-Agent coverage.
wpfleger96
left a comment
There was a problem hiding this comment.
🤖 Automated review of ef2c0447: no blocking findings.
The default User-Agent is set on the two shared clients in client(), and an explicit plugin value still wins. reqwest only fills a client default into a header the request doesn't already have, so a plugin's User-Agent replaces Buzz/<version> in any letter case, or when empty, and no second header is sent. The value is the same generic Buzz/<version> the relay client already sends. Redirect, retry and pooling settings on both clients are unchanged.
Verified at this head on macOS: the host_request tests pass (33/33), and the two new tests passed five repeated runs. A localhost probe through the production clients, with the version set as at startup, saw exactly one User-Agent: Buzz/0.7.0 on ordinary, protected and byte-download requests, and exactly one plugin-supplied value for the normal-case, mixed-case and empty overrides.
Nonblocking:
send_byte_upload(host_request.rs:403-408), the client behinduploadBytesOnce, builds its own client and still sends no User-Agent. The description excludes it, and nothing bundled calls it today, but a GitHub-backed plugin uploading through it would hit the same Forbidden response. Adding the same.user_agent(crate::relay::user_agent())there would cover every plugin HTTP path.
Apply the existing Buzz User-Agent to the dedicated byte-upload client. Exercise its multipart POST and assert exactly one identifying header. Co-authored-by: BuzzPRReviewAssistant1 <a581a7e8115222acdc32ffb14bfce55d48c24478d98e155f8eba126b69b83c7b@buzz.block.builderlab.xyz> Signed-off-by: Ravneet Arora <[email protected]>
Co-authored-by: BuzzPRReviewAssistant1 <a581a7e8115222acdc32ffb14bfce55d48c24478d98e155f8eba126b69b83c7b@buzz.block.builderlab.xyz> * origin/main: (71 commits) test(activity): scope preview assertions to the request row (#2843) perf(search): fold people names once across palette keystrokes (#2570) fix(github): keep PR watches running when localStorage is full (#2699) Make drafts and sent part of Messages (#2728) fix(canvas): render every Canvas within the save limit (#2839) test(messages): wait for the row measurement frame before thread catch-up dwell (#2837) Keep agent coordination history readable after work finishes (#2454) test(mentions): serve the mentions fixture as a build so cold loads fit (#2776) test(browser): let a late publication land after its page closed (#2565) test(relay): wait for the verified owner before a guest edits an agent (#2413) test: wait for the companion default width measurement (#2750) test(browser): preserve conversation scroll while revealing actions (#2715) test(browser): wait for link hit-testing after thread close (#2792) perf(messages): skip micromark for plain prose bodies (#2780) perf(inbox): load the emoji name table on first use (#2774) perf(messages): cut main-thread work while a busy channel is open (#2729) Refine agent Attention cards, watch details, and status controls (#2717) fix(bestie): remove a Bestie from its agent card on any device (#2720) feat(agents): preview Builderlab agent card links with Add to Buzz (#2719) Restore macOS Cmd-W window closing when no tab handles it (#2443) ... Signed-off-by: Ravneet Arora <[email protected]>
Signed-off-by: Laura Knight <[email protected]> * origin/main: fix(goose): propagate ACP work cancellation to plugin tools (block#3351) Keep Solo source selection when opening a channel (block#3356) fix(desktop): sign a channel-less deletion of one reaction (block#3288) AIDA-2426: Set a default User-Agent for plugins (block#2697) fix(plugins): explain Git import refs (block#3314) fix(codex): allow the runtime CLI credential provider (block#3375) [buzz-app] Allow reviewed Git-to-URL plugin updates (block#3355)
Co-authored-by: Simone <0828be588d5c9c4d092c5b1cf01761d5aef63d6b104807fd8e8284d517dd1a99@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> * origin/main: (260 commits) feat(markdown): share one Markdown renderer across messages and documents (#3319) fix(solo): reload workspaces by themselves after a relay pause (#3262) fix(agents): apply prompt and core memory changes at each conversation's next turn (#3170) Bind plugin operations to active native agent calls (#3303) Reopen recently closed threads without the loading mark (#3204) [buzz-app] Restore the last selected thread tab on Back and Forward (#3350) fix(notifications): keep alert sounds out of media controls (#3298) feat(shell): find on screen with Cmd/Ctrl+Shift+F (#2550) Bump block/buzz to pick up messages search --before (#3362) fix(media): save relay images from the native Download Image menu on macOS (#3337) feat(plugins): let plugins lift a message image's subject (#2470) feat(decisions): guide TypeSafe setup and align API key controls (#3365) Fix live sidebar updates after CLI moves (#3213) End desktop Huddles when the creator is the last human (#3328) Skip unchanged artifact row and index writes (#3364) fix(goose): propagate ACP work cancellation to plugin tools (#3351) Keep Solo source selection when opening a channel (#3356) fix(desktop): sign a channel-less deletion of one reaction (#3288) AIDA-2426: Set a default User-Agent for plugins (#2697) fix(plugins): explain Git import refs (#3314) ... Signed-off-by: John Tennant <[email protected]>
…o jtennant/martha/activity-step-previews * origin/chung/feat-enriced-activity: (121 commits) feat(markdown): share one Markdown renderer across messages and documents (#3319) fix(solo): reload workspaces by themselves after a relay pause (#3262) fix(agents): apply prompt and core memory changes at each conversation's next turn (#3170) Bind plugin operations to active native agent calls (#3303) Reopen recently closed threads without the loading mark (#3204) [buzz-app] Restore the last selected thread tab on Back and Forward (#3350) fix(notifications): keep alert sounds out of media controls (#3298) feat(shell): find on screen with Cmd/Ctrl+Shift+F (#2550) Bump block/buzz to pick up messages search --before (#3362) fix(media): save relay images from the native Download Image menu on macOS (#3337) feat(plugins): let plugins lift a message image's subject (#2470) feat(decisions): guide TypeSafe setup and align API key controls (#3365) Fix live sidebar updates after CLI moves (#3213) End desktop Huddles when the creator is the last human (#3328) Skip unchanged artifact row and index writes (#3364) fix(goose): propagate ACP work cancellation to plugin tools (#3351) Keep Solo source selection when opening a channel (#3356) fix(desktop): sign a channel-less deletion of one reaction (#3288) AIDA-2426: Set a default User-Agent for plugins (#2697) fix(plugins): explain Git import refs (#3314) ... Signed-off-by: John Tennant <[email protected]> # Conflicts: # src/features/messages/TypingIndicator.test.tsx
Why
GitHub rejects HTTP requests without a User-Agent. Buzz's native plugin clients omit that header, so GitHub-backed plugins can receive Forbidden for otherwise valid reads.
Fixes AIDA-2426.
What
Set the existing Buzz/version identifier as the default User-Agent for both shared native HTTP clients and the dedicated one-shot byte-upload client. Keep explicit plugin values, including mixed-case headers and empty values.
How
Reuse
crate::relay::user_agent()in the shared client builder andsend_byte_upload. This covers ordinary requests, byte downloads, archive uploads anduploadBytesOncewithout changing plugin APIs or adding GitHub-specific behavior.Risk
The default applies to shared native clients, including federated-identity uploads. Origin checks, authentication, redirects, timeouts, protected-request retry rules and pooling rules stay unchanged.
Testing
Regression proof on macOS: all three transport tests failed before their respective client defaults were added and passed afterward. They inspect headers received by a local server through the production clients. Coverage includes ordinary/protected requests, explicit overrides, byte downloads and the one-shot multipart byte-upload path.
On
062aa53ce, the fullbin/cargo test -p Buzz --locked -- --nocapturerun recorded 989 passing tests, including all three User-Agent regressions, before the native test process exited with SIGSEGV. The unchanged original base,fe3dd1947181de66dc6e4fd8ca5d3b61573c0ca2, previously reproduced the same native crash. The full local macOS package suite is not green.The branch now includes main's merged activity-test repair (#2843). On
062aa53ce, both completeagent-activity-overhaul.spec.mjsandhistory-loading.spec.mjsfiles passed all 48 Chromium/WebKit cases locally, without retries. No browser cases or assertions were removed or relaxed in this PR. Current hosted CI.Pending native workflow: launch the changed native build, open a previously failing GitHub-backed file in the Markdown reader, and confirm its content loads. Installed-plugin and human acceptance testing remain outstanding. The PR is currently marked ready for review; that status does not establish native-workflow or human acceptance.
Generated with Codex