Repository navigation
test(kotlin): exercise packaged JVM binding in PR CI - #495
Conversation
Quest-Claim: 20dd040c0ab611f5
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
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. |
|
No actionable comments were generated in the recent review. WalkthroughThe change adds a Gradle wrapper and a Kotlin/JVM check that builds and stages native artifacts on Linux GNU x86_64 and aarch64 hosts. An opt-in test checks the packaged JVM JAR and native library, then exercises a loopback client-server stream and lifecycle. A pull request CI job runs the check and uploads JVM test reports and results. The documentation is updated, and the prior Kotlin/JVM CI proposal and runtime CI entry are removed. Merge Risk:
|
|
Merge summary: landing head 32b35e5.
(Written by Claude Opus 5.5) |
Pull requests now exercise the Linux Kotlin/JVM JAR through
nix develop --command just test-kotlin. The test loads generated classes and the native resource from the built artifact, opens a loopback client/server session, exchanges a bidirectional stream, and closes sessions and endpoints.Changes and choices
jvmJarandjvmTest, enabling the smoke sources with-PartifactSmoke=trueonly in the focused command. Ordinary Gradle builds/checks need no native staging or test credentials. Remove loose main outputs from the smoke runtime classpath; assert both class/resource JAR identity and the actual UniFFI library's JNA extraction path.JAVA_HOMEorPATH. Preserve existing Kotlin/plugin/dependency versions. Fail clearly for missing prerequisites, credentials or unsupported hosts..tmp/and remove them on exit. Bind an ephemeral port, disable certificate verification only in the test client, retain Session handles through stream use, and close/dispose deterministically. Native close supplies explicit code/reason to distinguish it from UniFFI's parameterless handle destruction..gitkeep. Keep an explicit Cargo host target so ambientbuild.target/CARGO_BUILD_TARGETcannot produce a non-JVM library. This uses a separate host-target cache directory; CI caches it. Rerun only the JVM test task, preserving cached Kotlin compilation/JAR output.kt/justfileand nonexistent Android-script layout entry, and delete the completed Kotlin quest and its parent link.No public API, wire format, package version, release packaging, or publishing behavior changes.
Validation
All builds/checks used the Nix shell and installed
quest gate.just fixandjust check: passed, including native/WASM checks, feature combinations, Clippy, formatting and JavaScript checks. Quest tree/base and diff checks passed.JAVA_HOME=<JDK 17> nix develop --command just test-kotlin: passed on Linux x86_64. JUnit reports one test, zero failures/skips. JNA logs show extraction fromweb-transport-jvm-0.0.0-dev.jar, and the test checks the registered UniFFI library handle. Repeated runs preserve cached compile/JAR tasks and execute the runtime test.Missing native resource linux-x86-64/libweb_transport_ffi.so; the complete command passes after restoring/staging the library.:web-transport:buildpasses with generated bindings/native resources temporarily moved out of the project, without test credential environment variables. Opting into the smoke without credentials fails with an actionable command/variable message.CARGO_BUILD_TARGET=wasm32-unknown-unknown, still producing/loading the Linux native JAR resource. A staged foreign-platform sentinel remains byte-identical after the smoke command; it was then removed and the final artifact rebuilt.just testsuite was not rerun. Runtime execution on non-Linux platforms is outside this PR job.Review
Round 2: Claude Code,
claude-opus-5-5, medium effort, reviewed 32b35e51171d5e5905df18e4244efbb130e477a4 againstorigin/main(7cc85bd28dabca12e9a7330cddc525d884066758). No findings.Prior findings were fixed: Linux-only scope/accurate host documentation, actionable credential failures, preservation of other staged libraries, opt-in smoke sources for normal Gradle builds, test-only reruns, CI cache/cancellation, one session-close call, and removal of the duplicate Just entry point. The explicit Cargo host target was retained and the refutation accepted: the full smoke passes with an ambient WASM build target; the separate host-target cache tradeoff is recorded above. No maintainer decision remains open.
Follow-ups
Restrict Kotlin publishing/signing credentials to a protected release environment. The existing release workflow injects Maven/signing secrets job-wide into
package, including same-repository PR runs, while only its publish step is gated. This pre-existing issue was also recorded by moq-dev/web-transport#488. This PR adds no write permissions or publishing credentials.(Written by GPT-6.1 Sol with xhigh)