Skip to content

ci: gate every compile job from one change filter - #648

Draft
TarikGul wants to merge 2 commits into
mainfrom
tg/ci-change-gate
Draft

ci: gate every compile job from one change filter#648
TarikGul wants to merge 2 commits into
mainfrom
tg/ci-change-gate

Conversation

@TarikGul

@TarikGul TarikGul commented Sep 8, 2026

Copy link
Copy Markdown
Member

Warning

Do not merge while R2 is in flight. This is parked deliberately, not
waiting on review. Nothing depends on it yet: the host imports it prepares
for do not start until after the release, so merging it now buys nothing
this month and puts a CI change into a release window.

Two things must happen before it merges:

  • R2 has shipped.
  • Confirm ci-android / build and iOS change filter are not
    required status checks. This branch removes the first and renames the
    second, and a required check that no longer reports blocks every merge.
    CI Status is the check to require.

Summary

ci.yml computes every path gate in one place. A changes job publishes
sdk_swift and sdk_kotlin, and each gated job reads the output it cares
about. ci-status aggregates every job in the workflow and counts a job
skipped by its filter as a pass, which makes it the single check worth
requiring.

This is the gating spine the host imports build on: adding a host means adding
one output and one consumer, not another workflow with its own trigger.

Why the Android compile gate lives here

In its own workflow with a paths trigger it reported nothing at all on a pull
request touching other areas, so it could never satisfy a required status
check. It also had no merge_group trigger, so the Kotlin shell went
uncompiled on merge queue runs. As a gated job it reports skipped when it does
not apply, and it runs on the merge queue with everything else.

Its steps are carried over unchanged, including the codegen step that the
gitignored generated modules require.

Filter behaviour

Change sdk_swift sdk_kotlin
docs/ only false false
playground/ only false false
ios/ true false
android/ false true
js/container/ true false
rust/crates/truapi-provider/ true false
rust/crates/uniffi-bindgen-cli/ false true
rust/crates/truapi/ true true
rust/crates/truapi-server/ true true
Makefile true true
.github/workflows/ci.yml true true

The Kotlin filter names rust/crates/truapi for the same reason the Swift
filter does: neither binding set is committed, so a protocol change there
leaves no android/ diff to key on.

Both filters name this workflow, so this pull request exercises both gates.

Known cost

The Kotlin gate now also evaluates on rust/crates/truapi and Makefile
changes, and on merge queue runs. That job runs npm ci, codegen, a Rust build
and a Gradle build, so it adds merge queue latency. The old filter already
covered rust/crates/truapi-server/**, which most protocol changes touch, so
the widening is smaller than the table suggests.

rel: #636

The iOS change filter becomes a general `changes` job publishing one output
per gated area, `sdk_swift` and `sdk_kotlin`, and the Android compile gate
moves out of its own workflow into a job that reads it. That job's steps are
carried over unchanged, codegen and all.

Living in a separate workflow left the Android gate with two problems. Its
`paths` trigger meant it reported nothing at all on a pull request that
touched other areas, so it could never satisfy a required status check; as a
job in this workflow it reports skipped, which `ci-status` already counts as
a pass. It also had no `merge_group` trigger, so the Kotlin shell was never
compiled on a merge queue run.

The Kotlin filter now also names `rust/crates/truapi`, which it did not
before, for the same reason the Swift filter names it: the bindings are
generated rather than committed, so a protocol change there leaves no
`android/` diff to key on.

Both filters name this workflow, so editing a filter exercises the jobs the
filter gates.
Records where the compile gates are computed and which check is worth
requiring, now that a filtered job reports skipped rather than not reporting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant