Repository navigation
refactor(ffi): share web-transport-quinn's Android verifier initializer - #522
Conversation
Quest-Claim: 25bc4fde17e45175
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughThe Quinn crate now exposes its Android platform verifier initializer through a public, documentation-hidden module. The FFI client calls the initializer during JNI loading and retries it for each verifier request. A failed request initialization logs a warning and falls back to bundled Mozilla roots. The FFI client’s local Android application lookup functions were removed. The noq module documentation and the Android verifier initialization proposal document were also updated or removed. Merge Risk:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
android::init_platform_verifierinstead of having its own copy of theActivityThread.currentApplication()lookup. Each crate keeps its own policy: the FFI still falls back to bundled webpki roots and retries on each client, and quinn still returns an error.JNI_OnLoadregisters the VM singleton withJavaVM::from_rawand then calls the shared initializer. quinn caches a success, so the FFI's ownINITIALIZEDflag is gone.androidmodule is now#[doc(hidden)] puband Android-only, so only the FFI uses it.web-transport-proto,web-transport-trait) have no rustls or JNI. A new crate just for 40 lines did not seem worth it. A module comment now says so.quest/a1/android-verifier-init.md.Choices made without asking
attach_current_thread_for_scope(quinn's) instead ofattach_current_thread. InJNI_OnLoadthe thread is already attached. On a retry from a native thread, it now detaches afterwards instead of staying attached, which is the safer behavior.Public API
web-transport-quinn gains a
#[doc(hidden)]android::init_platform_verifieron Android only. It is not a supported API. No other API or wire changes.Caused by
No single PR caused this. moq-dev/web-transport#511 and moq-dev/web-transport#512 landed separate copies on purpose and planned this follow-up.
Checks
just check: passes.cargo clippy --target aarch64-linux-android -- -D warningsfor web-transport-quinn and web-transport-ffi, using a rust-overlay toolchain with Android std: passes.Follow-ups
None.
Models
Size: S
Implementer: Claude Code, Opus 5.5, low effort
(Written by Claude Opus 5.5 with low)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.01a1ccca-6eda-7be0-87d6-9d7cc6dfd45b, round 1The shared initializer preserves Android initialization retries, exception handling, and bundled-root fallback behavior, with no actionable defects found by code inspection; builds and tests were not run as instructed.