Skip to content

AIDA-2426: Set a default User-Agent for plugins - #2697

Merged
ravarora2 merged 3 commits into
mainfrom
rarora/AIDA-2426/plugin-user-agent
Nov 12, 2026
Merged

ravarora2 merged 3 commits into
mainfrom
rarora/AIDA-2426/plugin-user-agent

Conversation

@ravarora2

@ravarora2 ravarora2 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

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 and send_byte_upload. This covers ordinary requests, byte downloads, archive uploads and uploadBytesOnce without 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 full bin/cargo test -p Buzz --locked -- --nocapture run 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 complete agent-activity-overhaul.spec.mjs and history-loading.spec.mjs files 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

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]>
@ravarora2
ravarora2 marked this pull request as ready for review November 6, 2026 14:45
@ravarora2
ravarora2 requested a review from a team as a code owner November 6, 2026 14:45

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 One plugin upload path remains outside the new default User-Agent coverage.

Comment thread src-tauri/src/host_request.rs Resolved

@wpfleger96 wpfleger96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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 behind uploadBytesOnce, 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.

ravarora2 and others added 2 commits November 6, 2026 12:15
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]>
@ravarora2
ravarora2 merged commit 1b02fe9 into main Nov 12, 2026
42 checks passed
@ravarora2
ravarora2 deleted the rarora/AIDA-2426/plugin-user-agent branch November 12, 2026 16:33
ljknight added a commit to ljknight/buzz-app that referenced this pull request Nov 12, 2026
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)
johnmatthewtennant added a commit that referenced this pull request Nov 12, 2026
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]>
johnmatthewtennant added a commit that referenced this pull request Nov 12, 2026
…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
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.

3 participants