Skip to content

ci: run the provider Kotlin gate on pull requests - #818

Merged
TarikGul merged 2 commits into
mainfrom
tg/provider-android-gate
Sep 16, 2026
Merged

TarikGul merged 2 commits into
mainfrom
tg/provider-android-gate

Conversation

@TarikGul

@TarikGul TarikGul commented Sep 16, 2026

Copy link
Copy Markdown
Member

Part of #463.

provider-android-check already exists in the Makefile and nothing runs it. android-check covers :truapi-host only, so a change that breaks the provider Kotlin bindings reaches a release with no gate in between. Same shape as the CLI packaging path before #800.

The provider compiles without codegen output, so this job skips the npm and nightly steps the host gate needs, and it moves on a narrower change gate: the provider crate, the two crates it depends on, the bindings generator and the Gradle wiring.

make provider-android-check generates the bindings first and refuses an empty source set, which is what stops the gate passing without compiling anything, then assembles the AAR so the Gradle wiring this exists to cover is exercised rather than only the Kotlin.

`provider-android-check` has been in the Makefile with no workflow invoking it,
so the gate was built and never armed: `android-check` covers `:truapi-host`
only, and a change that breaks the provider bindings reaches a release
unnoticed. Same shape as the CLI packaging path before #800.

The provider compiles without codegen output and depends only on
truapi-platform, so the job skips the npm and nightly steps the host gate needs
and moves on a narrower change gate. `make provider-android-check` generates
the bindings first and refuses an empty source set, which is what stops this
passing without compiling anything.
@TarikGul
TarikGul requested a review from a team September 16, 2026 16:28
@github-actions github-actions Bot added the github_actions Pull requests that update GitHub Actions code label Sep 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown

CI Status: 19 required jobs green, 18 passed and 1 skipped by path filter.

All job results
job result
android-bindings success
changes success
changeset-guard success
cli-package success
codegen success
e2e skipped
explorer success
ios-bindings success
ios-swift success
licenses success
playground success
provider-android-bindings success
release-guard success
rust success
ts-client success
ts-debugger success
ts-host success
wasm-provider success
workflow-lint success

Commit ae7af969 · run log

@TarikGul

Copy link
Copy Markdown
Member Author

@lore-bot-app review

@lore-bot-app

lore-bot-app Bot commented Sep 16, 2026

Copy link
Copy Markdown

Reading the diff and checking what the record says. Back in a few minutes.

@lore-bot-app lore-bot-app Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR
Arms the existing make provider-android-check target as a path-filtered CI job and adds it to ci-status. 0 blocking, 3 minor.

Summary
The changes job gains a third output, sdk_provider_kotlin, computed from a filter covering the provider crate, truapi-platform, the bindings generator, the Makefile, the workspace manifest and lockfile, the root Gradle files, and ci.yml. A new provider-android-bindings job reads it, sets up stable Rust, JDK 17 and Gradle 8.9, and runs make provider-android-check, which builds the provider cdylib in the codegen profile, generates the Kotlin bindings, refuses an empty source set, and runs :truapi-provider:compileReleaseKotlin. The job is added to the ci-status needs list and its REQUIRED string. One commit, one file.

What the record says

  • The PR is already merged and its job ran green on pull requests, per PR #818. This comment is for the follow-up.
  • The "gate built but never armed" failure this fixes has a direct precedent. PR #800 moved CLI packaging onto pull requests after issue #777 recorded a release that published no binaries because the packaging path only ever ran at release time. The commit message cites #800 as the model, and the shape matches.
  • The filter design rule this PR extends comes from PR #648: each gate's list must name every input its job actually reads, because the bindings are not committed and a protocol change leaves no android/ diff. Concern 1 below is a consistency check against that rule.
  • Issue #463 tracks the provider's UniFFI boundary gaps, including the missing Android integrity check for a stale .so. Lore links #818 to #463. This gate proves the generated Kotlin compiles. It does not touch the checksum guard, so #463 stays open on that item.
  • The module files arrived with PR #703 (f0eea388), and the module README has said since then that it was never built on CI. The record has no discussion of what the provider gate should cover beyond what #818 itself says.

Concerns

  1. Filter includes truapi-platform but not truapi (.github/workflows/ci.yml:286). The provider crate depends on both, per rust/crates/truapi-provider/Cargo.toml, and its uniffi feature enables neither crate's uniffi feature. So neither crate can change the generated Kotlin, and a compile break from either is caught by the ungated rust job's clippy step at ci.yml:75. Under the #648 rule, both crates are compile inputs or neither is a surface input. Pick one: add rust/crates/truapi/ or drop rust/crates/truapi-platform/. The commit message's "depends only on truapi-platform" is also inaccurate.

  2. Docs now say the opposite of what CI does. android/truapi-provider/README.md:5 states the module has not been built on CI and calls the Gradle wiring unverified. CLAUDE.md:126-128 and .claude/skills/truapi-definition-of-done/SKILL.md:74-77 describe two compile gates and list the changes outputs without the new one. The repo CLAUDE.md requires README and CLAUDE.md updates with the code change.

  3. compileReleaseKotlin verifies less than the host gate. The Makefile target at Makefile:318 compiles Kotlin only. The host gate at ci.yml:455 runs assembleRelease, which also merges the manifest and packages the AAR. Since the README's stated gap is the Gradle wiring, assembleRelease would cover it. verifyJniLibs in the provider's build.gradle.kts is attached to publish tasks only, so assembleRelease does not need the .so.

No instructions addressed to a reviewer were found in the diff.

Questions for the author

  • Is truapi-platform in the filter meant as a compile input or a binding-surface input? That decides whether truapi joins the list or truapi-platform leaves it.

Separately, outside this diff: the verifyJniLibs error in android/truapi-provider/build.gradle.kts names make android-jni-provider, but the target is provider-android-jni. Want that fixed in the same follow-up?

Next: open .github/workflows/ci.yml:286 and decide on the truapi / truapi-platform question.


🤖 Reviewed by Lore (Parity knowledge base) · 41 agent turns · 256.9s · knowledge as of 2026-09-16

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
…ble it

The provider depends on truapi as well as truapi-platform, and its uniffi
feature enables neither crate's, so neither can change the generated Kotlin.
Both are compile inputs, and naming one without the other left a change that
can break this build outside the gate meant to catch it.

The check assembles the AAR rather than compiling Kotlin. The gap this exists
to cover is the Gradle wiring, which manifest merge and packaging exercise and
Kotlin compilation does not. verifyJniLibs is attached to publish tasks only,
so assembling still needs no cdylib. The guard against an empty generated
source set stays, since that is what stops the gate passing without compiling
anything.
@TarikGul

Copy link
Copy Markdown
Member Author

Both fixed in ae7af96.

The filter. Confirmed: rust/crates/truapi-provider/Cargo.toml depends on
truapi at line 70 and truapi-platform at line 71, and the uniffi feature is
["smoldot", "networks", "dep:async-trait", "dep:uniffi"], which enables neither
crate's. So both are compile inputs and neither is a surface input. Added
rust/crates/truapi/ rather than dropping the other, since a change that can
break this build belongs inside the gate meant to catch it. The description said
"depends only on truapi-platform", which was wrong; corrected.

The check verifying less. Taken, with one change to the fix.
provider-android-check now runs assembleRelease, so the Gradle wiring this
exists to cover is exercised rather than only the Kotlin.

It stays a Makefile target rather than the job calling gradle directly, because
the target also refuses an empty generated source set, and that guard is what
stops the gate passing without compiling anything. Calling assembleRelease
from the job would have kept your point and lost that.

Confirmed verifyJniLibs is attached at build.gradle.kts:95 to tasks starting
with publish, so assembling still needs no cdylib.

One thing worth recording since it is the usual omission: the job is already in
both ci-status's needs and the REQUIRED list.

@TarikGul TarikGul added the no-changeset No published artifact changes; changeset not required label Sep 16, 2026
@TarikGul

Copy link
Copy Markdown
Member Author

Changeset guard went red on the push: Makefile$ is in the needs_changeset
gate, and my change to provider-android-check was the first thing on this
branch to touch it.

Added the no-changeset label rather than a changeset. The branch touches
ci.yml and the Makefile and nothing else, and provider-android-check is a
build target CI and developers run, so nothing reaches a published artifact. A
changeset here would bump a package version for a change that ships nothing,
which is what the label exists for.

Say the word if you would rather it carried a changeset.

@TarikGul
TarikGul added this pull request to the merge queue Sep 16, 2026
Merged via the queue into main with commit 38c78b5 Sep 16, 2026
51 of 53 checks passed
@TarikGul
TarikGul deleted the tg/provider-android-gate branch September 16, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code no-changeset No published artifact changes; changeset not required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants