Skip to content

feat(audio-client): accept a client request in connect - #8497

Merged
wpfleger96 merged 2 commits into
mainfrom
duncan/audio-client-request
Oct 20, 2026
Merged

wpfleger96 merged 2 commits into
mainfrom
duncan/audio-client-request

Conversation

@wpfleger96

@wpfleger96 wpfleger96 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Related: block/buzz-app#1424 (native federated sessions; attaches the assertion on Huddle audio once this lands)

buzz_audio_client::connection::connect took the audio URL as &str, so a host had no way to add headers to the WebSocket upgrade. buzz-app needs to send its NIP-FI user assertion (Nostr-Federated-Identity: Bearer <jwt>) on the Huddle audio socket. The relay checks NIP-FI when the audio connection upgrades (audio/handler.rs → check_nip_fi_at_upgrade).

This PR widens the parameter to impl IntoClientRequest + Unpin, the same bound connect_async_tls_with_config already takes. Nothing else changes: TLS, timeouts and the NIP-42 handshake work as before. Existing &str/&String callers, including desktop/src-tauri/src/huddle/relay_api.rs, compile unchanged.

@wpfleger96
wpfleger96 requested a review from a team as a code owner October 20, 2026 20:38
@wpfleger96
wpfleger96 deployed to codex-review October 20, 2026 20:38 — with GitHub Actions Active
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: 93114b4279a619613a6df8ef740472216e1d4cfb...d66383d2b261bb84cb73b78fbd6b07a59d992aaa
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete security, correctness, or reliability issues found in the authorized PR range. The request-header support preserves existing admission validation and remains compatible with the desktop caller.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review used read-only source inspection. Builds and tests were not run, as requested.

Generated by Codex Security Review |
Requested by: @wpfleger96 |
Workflow run

@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 20, 2026
@wpfleger96
wpfleger96 deployed to codex-review October 20, 2026 20:54 — with GitHub Actions Active
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 20, 2026
wpfleger96 and others added 2 commits October 20, 2026 18:20
Widen connect's URL parameter to any IntoClientRequest so hosts can
attach upgrade headers, such as a NIP-FI assertion, to the audio
WebSocket. Existing &str and &String callers compile unchanged.

Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
Co-authored-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
@wpfleger96
wpfleger96 force-pushed the duncan/audio-client-request branch from 23a4d5c to d66383d Compare October 20, 2026 22:21
@github-actions github-actions Bot removed the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 20, 2026
@wpfleger96
wpfleger96 deployed to codex-review October 20, 2026 22:21 — with GitHub Actions Active
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 20, 2026

@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.

🤖 LGTM. Bound matches connect_async_tls_with_config; existing &String caller compiles unchanged; header test proves upgrade headers reach the server. cargo test -p buzz-audio-client and clippy -D warnings pass at d66383d.

@wpfleger96
wpfleger96 enabled auto-merge (squash) October 20, 2026 22:30
@wpfleger96
wpfleger96 merged commit 7e64612 into main Oct 20, 2026
84 checks passed
@wpfleger96
wpfleger96 deleted the duncan/audio-client-request branch October 20, 2026 22:58
wpfleger96 added a commit to block/buzz-app that referenced this pull request Oct 20, 2026
Bumps buzz-audio-client to block/buzz#8497's merge so the upgrade can carry a request; the assertion is issued for the community origin and the call runs inside during_authorization, so a retirement mid-connect cancels it.

Co-authored-by: Will Pfleger <wpfleger@block.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
ngoodger-block added a commit to ngoodger-block/buzz that referenced this pull request Oct 21, 2026
* origin/main:
  feat(audio-client): accept a client request in connect (block#8497)
  fix(mobile): lazily lay out new-DM recipients (block#8435)
  fix(mobile): lazily lay out channel member groups (block#8437)
  perf(mobile): retain preference crypto across reconnects (block#8442)
  fix(deps): bump webpki crates for RUSTSEC-2026-0381/0382/0383 (block#8499)
  fix(mobile): simplify and refine the quick actions menu (block#8491)
  fix(sdk): reject malformed mention pubkeys before signing p tags (block#6372)
  fix(mobile): resolve DM display labels once per sort (block#8488)
  docs(db): database target architecture and schema-change rules (block#8273)
  fix(mobile): restore channel icons and align chat colors with desktop (block#8478)
  test(desktop): read only the open effort menu in effort-picker e2e (block#8476)
  fix(relay): advance the partition catch-all by default (block#8464)
  feat(relay): write the NIP-43 member list in the membership transaction (block#8482)
  fix(relay): delete the startup NIP-33 d_tag backfill (block#8468)
  fix(mobile): restore Solo chats from channel labels (block#8466)
  fix(relay): show only legacy channel types to reads that name no channel (block#8469)
  fix(relay): take NIP-43 snapshot reconcile off the startup path (block#8467)
  test(buzz-db): fix two PostgreSQL-lane timing flakes (block#8472)

Signed-off-by: Nikolaj Goodger <ngoodger@squareup.com>
ngoodger-block added a commit to ngoodger-block/buzz that referenced this pull request Oct 21, 2026
* feat/media-shares:
  feat(audio-client): accept a client request in connect (block#8497)
  fix(mobile): lazily lay out new-DM recipients (block#8435)
  fix(mobile): lazily lay out channel member groups (block#8437)
  perf(mobile): retain preference crypto across reconnects (block#8442)
  fix(deps): bump webpki crates for RUSTSEC-2026-0381/0382/0383 (block#8499)
  fix(mobile): simplify and refine the quick actions menu (block#8491)
  fix(sdk): reject malformed mention pubkeys before signing p tags (block#6372)
  fix(mobile): resolve DM display labels once per sort (block#8488)
  docs(db): database target architecture and schema-change rules (block#8273)
  fix(mobile): restore channel icons and align chat colors with desktop (block#8478)
  test(desktop): read only the open effort menu in effort-picker e2e (block#8476)
  fix(relay): advance the partition catch-all by default (block#8464)
  feat(relay): write the NIP-43 member list in the membership transaction (block#8482)
  fix(relay): delete the startup NIP-33 d_tag backfill (block#8468)
  fix(mobile): restore Solo chats from channel labels (block#8466)
  fix(relay): show only legacy channel types to reads that name no channel (block#8469)
  fix(relay): take NIP-43 snapshot reconcile off the startup path (block#8467)

Signed-off-by: Nikolaj Goodger <ngoodger@squareup.com>

This branch was successfully deployed

1 active deployment
codex-review — d66383d2 Deployed Oct 20, 2026 by wpfleger96 via Run Codex Security Review #9287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants