feat(POP-3811): support World ID bedrock user agents#362
Conversation
| /// Appends `{client_name}/{os_version}` to match the app client suffix convention. | ||
| #[must_use] | ||
| pub fn with_client_segment(&self, client_name: &str, os_version: &str) -> Self { | ||
| self.with_segment(client_name, os_version) | ||
| } |
There was a problem hiding this comment.
there's no difference to just calling with_segment?
There was a problem hiding this comment.
Good catch — you're right, with_client_segment was a pure passthrough to with_segment(client_name, os_version) with no transformation. Removed it and updated the test helper to call with_segment directly (0998b19).
|
/otto can you please address the comments? 🙏 Feel free to use gpt-5.5 as model |
|
I've spawned a GPT-5.5 subagent to address Dzejkop's review comment. It will:
I'll update you once it's done! 🙏 |
|
Respawned with Claude Opus 4.7 — GPT-5.5 hit a quota limit. The new agent is picking up where we left off. I'll update you once it completes! 🙏 |
Per review feedback: with_client_segment was a pure passthrough to with_segment with no transformation. Removed it and updated the test helper to call with_segment directly.
|
The review comment has been addressed! ✅ Here's what was done:
|
|
/otto looks like |
|
On it — spawning an agent to add an ignore entry for |
|
Fixed the
Verified locally with |
|
All fixed! ✅ Here's what was done:
CI should be green on the next run. |
Description
WorldAppheaders while World ID clients can sendWorldIDheaders.Changes
UserAgentandUserAgentBuilderprimitives.android-id/ios-idclient names toWorldID; keep all other client names onWorldApp.bedrock.Testing Instructions
cargo fmt --checkcargo test -p bedrock user_agent --libcargo clippy --all-targets --all-features -- -D warnings./kotlin/build_kotlin.sh./build_android_local.sh 0.2.14-SNAPSHOTcargo test -p bedrock --lib; the ERC4626 tests require localanvil, which is not installed in this environment. Non-anvil tests passed before that blocker.Note
Low Risk
New optional HTTP metadata helpers with no auth or wallet logic changes; deny.toml only suppresses a transitive unmaintained-crate advisory.
Overview
Adds UniFFI-exported
UserAgentandUserAgentBuilderprimitives so Bedrock consumers can build consistent HTTPUser-Agentheaders. The builder supports arbitraryname/versionsegments plus helpers for app version,bedrock/{crate version}, and client/OS suffixes.World ID vs World App:
with_app_segment_for_clientusesWorldID/{version}whenclient_nameisandroid-idorios-id, andWorldApp/{version}for all other clients (e.g.android,ios).UserAgent::header_value()exposes the final string for FFI.The new types are wired through
primitives::user_agentand re-exported at the crate root alongside the HTTP client types. Unit tests cover empty builds, segment ordering, and each client/product combination.Also adds a cargo-deny advisory ignore for
RUSTSEC-2026-0173(proc-macro-error2viaalloy), with no dependency upgrade in this PR.Reviewed by Cursor Bugbot for commit cc3138d. Bugbot is set up for automated code reviews on this repo. Configure here.