Skip to content

test(kotlin): exercise packaged JVM binding in PR CI - #495

Merged
kixelated merged 3 commits into
mainfrom
quest/a1/bindings/kotlin
Nov 8, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/a1/bindings/kotlin

Conversation

@kixelated

@kixelated kixelated commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Reuse jvmJar and jvmTest, enabling the smoke sources with -PartifactSmoke=true only 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.
  • Use the standard checksum-pinned Gradle 8.10.2 wrapper and JDK 17 via JAVA_HOME or PATH. Preserve existing Kotlin/plugin/dependency versions. Fail clearly for missing prerequisites, credentials or unsupported hosts.
  • Keep the smoke command scoped to Linux GNU x86_64/aarch64, matching the assigned goal. Other desktop/Android targets remain in the unchanged release matrix; Android emulators are outside scope. No publishing or Android SDK is needed to run this test.
  • Generate fresh loopback-only test credentials under .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.
  • Replace only the host resource and generated bindings, preserving other staged release libraries and .gitkeep. Keep an explicit Cargo host target so ambient build.target/CARGO_BUILD_TARGET cannot 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.
  • Add an independent, read-only Kotlin/JVM PR job with no path filters, covering all shared Rust/build/workflow changes. Cache Rust and Gradle, cancel superseded Kotlin runs, log full failures/JNA loading, and upload XML/HTML reports. Preserve other language jobs and all release packaging/workflows.
  • Correct local commands, remove the unused kt/justfile and 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.

  • Final just fix and just 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 from web-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.
  • Removing the native resource and rebuilding the JAR fails with Missing native resource linux-x86-64/libweb_transport_ffi.so; the complete command passes after restoring/staging the library.
  • Ordinary :web-transport:build passes 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.
  • The complete command passes with 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.
  • No Rust/library behavior changes. The focused runtime suite and full repository checks were run; the broad just test suite 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 against origin/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)

@kixelated kixelated changed the title Test the Kotlin/JVM package at runtime in CI test(kotlin): exercise packaged JVM binding in PR CI Nov 7, 2026
kixelated and others added 2 commits November 7, 2026 03:52
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@kixelated
kixelated marked this pull request as ready for review November 7, 2026 12:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-07T12:04:09.339995Z 32b35e5 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The 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: Minimal · up to 32b35

This adds a Linux Kotlin/JVM packaged-artifact smoke test and a CI job to run it. It does not touch shipped code, so merge risk is minimal.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title clearly describes the packaged Kotlin/JVM binding test in PR CI.
Description check Passed The description covers the Kotlin/JVM artifact smoke test, CI job, and related changes.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 3 files. (7 skipped: 7 unsupported.)

Finishing Touches

Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f7f3a2e4-6392-4355-b257-af25989bba1d
Commits

Reviewing files that changed from the base of the PR and between 7cc85bd and 32b35e5.

Files ignored due to path filters: 1

  • kt/gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
Files selected for processing: 13

  • .github/workflows/pr.yml
  • justfile
  • kt/.gitignore
  • kt/README.md
  • kt/gradle/wrapper/gradle-wrapper.properties
  • kt/gradlew
  • kt/gradlew.bat
  • kt/justfile
  • kt/scripts/check.sh
  • kt/web-transport/build.gradle.kts
  • kt/web-transport/src/jvmArtifactTest/kotlin/dev/moq/webtransport/ArtifactSmokeTest.kt
  • quest/a1/bindings/README.md
  • quest/a1/bindings/kotlin.md
Files with no reviewable changes: 3

  • kt/justfile
  • quest/a1/bindings/README.md
  • quest/a1/bindings/kotlin.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@kixelated

kixelated commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator Author

Merge summary: landing head 32b35e5.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit 9a19d9c into main Nov 8, 2026
16 checks passed
@kixelated
kixelated deleted the quest/a1/bindings/kotlin branch November 8, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant