SiaoJie Cai
90d · built 2026-11-22
Performance
What SiaoJie Cai shipped in the selected window, measured in ETV, and how it compares with the 90 days before it.
Effective capacity
+57.2engineers
delivers like 58.2 (58.2x pre-AI)
Output (ETV)
33.2ETV
+1921.3% vs 1.6 prior
Features share
45.0%
+31.0 pp vs prior window
Fixes share
31.5%
−45.3 pp vs prior window
Work mix
45% Features2.6% Maintenance18.8% Tests2.1% Docs31.5% Fixes
155 commits over 90 days, ending 2026-11-22.
Daily performance
Daily ETV, stacked by Features, Maintenance, Tests, Docs and Fixes.
Repository spread
Where this developer's commits land. Concentrated work (top1 > 80%) vs polymath spread (top1 < 30%).
| Repo | Commits | ETV |
|---|---|---|
| buck2 | 154 | 33.1 |
| react-native | 1 | 0.0 |
Most impactful commits
Top 10 by ETV in the last 90 days.
- 2.4ETVEnforce Java inherited-member applicability Summary: # context Reject inherited-member references when reduced-classpath lookup cannot preserve their full-classpath binding. D130205245 supplies the shared provider fixer. # problem Invoice and PayPal inherit `Parcelable.Creator` through missing interfaces. Jasabi guesses a same-package `Creator`; the name-only comparison waiver hides the wrong descriptor. Qualified references, lexical shadows, ambiguous imports, and class headers also expose unsafe fallback paths. # fix Validate against the actual `applicabilityClasspath`, including qualified references, type parameters, import precedence, competing types, and class-header scope. Report the missing providers with sorted, comma-separated `KOSABI_JASABI_MISSING_SUPERTYPES` diagnostics. Reject unreadable jars rather than substitute boot-only availability. Preserve annotation-processing and record handling. Exempt only discarded applied SOURCE-annotation subtrees, not retained values, defaults, or annotation-typed descriptors. Retain `cart/model:model`, `paymentmethods/model:model`, and `common/hasvalue:hasvalue`. The latter repairs PayPal's enum static-import hierarchy. Keep SOABI-only missing-class recovery and the descriptive unsupported-compiler error. Preserve product sources, stubgen guessing, and the `CREATOR` waiver. ## Sample target and three-way ABI Target: `fbsource//fbandroid/java/com/facebook/payments/invoice/protocol:protocol`. Relevant source declarations follow. Unrelated members and method bodies are omitted; this product source does not change. ```java import android.os.Parcelable; public interface CartScreenConfigFetchParams extends Parcelable { String getBuyerId(); } ``` ```java import com.facebook.payments.cart.model.CartScreenConfigFetchParams; public class InvoiceCartScreenConfigFetchParams implements CartScreenConfigFetchParams { public static final Creator<InvoiceCartScreenConfigFetchParams> CREATOR = new Creator<InvoiceCartScreenConfigFetchParams>() { // createFromParcel and newArray implementations omitted from this excerpt }; } ``` `CREATOR` has these measured JVM field descriptors: ```text library jar: Landroid/os/Parcelable$Creator; class ABI: Landroid/os/Parcelable$Creator; source-only before: Lcom/facebook/payments/invoice/protocol/Creator; source-only after: Landroid/os/Parcelable$Creator; ``` The SDK supplies `Parcelable.Creator`, but the reduced classpath omits `CartScreenConfigFetchParams`. Jasabi cannot follow the inheritance path and guesses a nonexistent same-package `Creator`. The active library guard reports the missing intermediary: ```text KOSABI_JASABI_MISSING_SUPERTYPES: com.facebook.payments.cart.model.CartScreenConfigFetchParams ``` The actual fixer adds the missing provider while preserving the existing `cart:cart` entry: ```diff source_only_abi_deps = [ "//fbandroid/java/com/facebook/payments/cart:cart", + "//fbandroid/java/com/facebook/payments/cart/model:model", ] ``` The original stub alone fails the Java field-read consumer. The repaired stub and the library/class-ABI controls compile it. Library and class-ABI bytes stay unchanged. The name-only `CREATOR` comparison waiver is unchanged. Exact jars, commands and consumer proof: https://artifacts.internalmeta.com/a/1972336827537768 Reviewed By: jiawei-lyu Differential Revision: D130218101 fbshipit-source-id: 2ff1954a5986a5f823929235fe93fd3a6b7bcc97github.com-facebook-buck2 · 5ba0dcf1 · 2026-11-09
- 1.5ETVEmit the Compose applier annotations in the source-only ABI Summary: # context The Compose backend (`ComposableTargetAnnotationsTransformer`) infers each composable applier from its body and writes `ComposableTarget`, `ComposableInferredTarget` or `ComposableOpenTarget`. The checker in callers (`ComposableTargetChecker`) reads them and reports `COMPOSE_APPLIER_CALL_MISMATCH`, an error under `warnings_as_errors_k22`. abi-gen does not run that lowering, so the source-only ABI carried none of these annotations. # problem A consumer compiled against a `source_only` dependency missed applier mismatches that the class ABI reports, and lost applier annotations it would infer itself. Prod example: `MocapScanAnimation()` in `fbsource//fbandroid/java/com/instagram/creation/genai/common/ui:ui`. | artifact | `MocapScanAnimation()` annotation | | library | `ComposableTarget(applier = "androidx.compose.ui.UiComposable")` | | class ABI | `ComposableTarget(applier = "androidx.compose.ui.UiComposable")` | | source-only ABI before fix | plain `Composable`, no applier | A `VectorComposable` caller builds against the source-only ABI and fails against the class ABI. # fix - `ComposableTargetInference` runs backend inference on analysed FIR with the same node model, traversal order, call-type schemes, and timing for in-module generic callees. The engine is the Compose compiler inference package (`androidx.compose.compiler.plugins.kotlin.inference`) loaded from the toolchain Compose compiler jar; a `zip_file` rule keeps only that package so the jar does not register the Compose compiler plugin. - Fail-open by design: callees and types that do not resolve on the source-only classpath, or resolve to stubsgen stand-ins, are unknown; lambdas with unknown expected type are not attributed; parameter or open schemes are written only when no unknown code can bind them; appliers are written only when they hold with and without links through not-yet-annotated in-module generic functions. - `ComposableTargetAnnotator` writes annotations on IR declarations and as metadata-visible annotations, as the backend does. Inference exceptions are recorded in the repair log with no annotation written. - `captureUncertainLambdas()` double-runs inference for lambdas whose region holds code that does not resolve here; an annotation is written only when both runs agree. Pins the `HatchTaskConnectorPermissionsScreen` shape in `fbsource//fbandroid/java/com/meta/hatch/ui/status/upcoming:upcoming`. - Version compat lives in `compilercompat/{2.3.0,2.4.21,2.5.0}/ComposeInferenceCompat.kt`. Body skipping stays off while Compose emulation is enabled (followup to D131589206 which emptied FIR bodies before inference read them). - Prelude: adds `kotlin-compose-compiler-plugin-embeddable` to `fbcode/buck2/prelude/toolchains/android/third-party/BUCK` (OSS-synced; internally aliases the toolchain version, OSS Maven pin 2.3.21 sha1 96eb34ab9364f1c4291f35b38b1b98d0fc70170c). Needs prelude owner review. ## Evidence | claim | result | link | | applier suites | pass at this diff including all applier shapes | https://www.internalfb.com/intern/testinfra/testrun/21955048253452953 | | 3-lane emitter | green on default, 2.3.21 and next_release lanes | https://www.internalfb.com/intern/testinfra/testrun/21392098300040211 https://www.internalfb.com/intern/testinfra/testrun/2814750185745430 https://www.internalfb.com/intern/testinfra/testrun/19421773463064831 | | consumer parity | VectorComposable caller of MocapScanAnimation fails against patched stub as against class ABI | https://artifacts.internalmeta.com/a/1659247952312714 | | never stricter | zero present-only-in-stub and zero value-mismatch rows in after state | https://artifacts.internalmeta.com/a/1659247952312714 | ## Risks - Library and class-ABI jars of Compose targets change: libraries now see dependency applier annotations. Changed classes are identical apart from added applier annotations plus constant-pool growth. Annotations have class retention with no runtime reader. Needs human review. - Known residuals under rule `composable-applier-not-computable-off-reduced-classpath`: library infers appliers the reduced classpath cannot compute; each replaces a worse state on the same member. Kotlin 2.5 lane writes no applier annotations (unmodeled `ComposableInferredTargetConstraints`); tracked in T298154769. Finding reference: C_MEMBER_ANNOTATION (SEVERE) — dropped `ComposableTarget` / `ComposableInferredTarget`; category task T298154769. Full pre-compaction record: https://artifacts.internalmeta.com/a/1659247952312714 Reviewed By: jiawei-lyu Differential Revision: D131562462 fbshipit-source-id: 6f256a39e8c1a3e17de118a44a324369c2d6dfb1github.com-facebook-buck2 · 2ac356d6 · 2026-11-17
- 1.3ETVEmit the bridge methods javac generates when an override names classes off the reduced classpath Summary: # context The WhatsApp pins `wa_android//java/com/whatsapp/conversationrow/divider:divider` and `wa_android//java/com/whatsapp/nativediscovery/businessdirectory:businessdirectory` stay on class ABI partly because the Java source-only ABI lacks javac bridge methods, even with their supertype providers in `source_only_abi_deps` (T298505594). D131393242 computes bridges from the reduced classpath. D131393398 reports the bridges that cannot be computed. # problem Three bridge shapes are dropped although the reduced classpath has what they need: 1. The override's own return type, or a type argument the class passes to its supertype, is off the reduced classpath. javac's `Types.isSameType` treats that error type as equal to any type, so `BridgeMethods.isBridgeNeeded` and `ElementsExtendedImpl.binarySignaturesMatch` see equal erasures (`ConversationRowDivider.getFMessage()`, returning `FMessageSystem` over `FMessage`). 2. The overridden method comes from a class file whose descriptor names a missing class. `TreeBackedElements.hasResolvedErasure` drops the bridge, although the class file names that class. 3. The finder assumes a superclass read from a class file has the bridges javac would give it. When a dependency's source-only ABI lacks one (`conversationrow/core` `BubbleRelativeLayout.generateLayoutParams(AttributeSet)`), javac re-emits it in the subclass and the source-only ABI does not. # fix - `lang/model/ErasedTypes`: an error type equals only an error type that names the same class. `BridgeMethods` and `ElementsExtendedImpl` compare erasures with it. - `lang/model/ClassFileTypes`: a bridge to a class-file method takes its descriptor and thrown types from the binary names in the class file. - `lang/model/ClassFileBridges`: for a superclass read from a class file, the VM-owner check uses the bridges that class file declares, as javac's `TransTypes.binaryImplementation` does. The module's own Kotlin output directories keep computed bridges: `JavacStepsBuilder` passes them as `CompilerParameters.localClassDirectories`, and `Jsr199JavacInvocation` sets them on the source-only task, compared by canonical path (source-only generation reads Kotlin stubs there, the library compilation reads kotlinc's classes). - `ClassVisitorDriverFromElement` never writes a bridge with the descriptor of a method the class declares. - `xplat/buck2/platform/java/aot/BUCK`: the javacd AOT cache, retrained with `update.sh`. The bootstrapper runtime links `lang/model`, so its `lib/modules` changes with this diff. - Unchanged: a missing transitive supertype, or a source-type method that names a missing class, still gets no bridge; D131393398 reports those. # evidence | Claim | Result | Link | |---|---|---| | Prod example: `divider`, `ConversationRowDivider` bridges `getFMessage()Lcom/whatsapp/infra/fmessage/base/protocol/FMessage;` and `generateLayoutParams(Landroid/util/AttributeSet;)Landroid/view/ViewGroup$LayoutParams;` (`0x1041`) | library and class ABI: present. Source-only ABI with its 5 supertype edges: absent at the parent, present here. Strict compareAbi: mismatch (bridge-only) at the parent, pass here. Library and `[class-abi]` byte-identical to the parent | https://artifacts.internalmeta.com/a/1144464078514795 | | Flip driver on `divider` | parent: reverted on the bridge-only mismatch; here: flipped with the 5 edges, compareAbi passes on consumer and SMB, tests pass | https://www.internalfb.com/buck2/2bb8569e-5197-41b1-baa7-d52feb0504e5 , https://www.internalfb.com/intern/testinfra/testrun/30117822566548805 | | `businessdirectory` (Java bridges vs its class ABI) | `BusinessDirectorySearchQueryRequest.parseResponse`, `FilterBottomSheetDialogCategoriesAdapter.onBindViewHolder` / `onCreateViewHolder`: absent at the parent, present here; missing 13 -> 10, the rest need supertype edges. With them, `BusinessDirectoryFrequentContactedViewModel.onItemClicked` too: 1 -> 0 | https://artifacts.internalmeta.com/a/1144464078514795 | | Fleet bridge census, full universe: every Java or mixed `source_only` library in the fb4a/ig4a/wa4a/wb4a closures (18,805 targets; 11,279 / 10,354 / 3,246 / 3,443), all of `T`, `[class-abi]`, `[source-only-abi]` at the parent vs here; row identities and whole-class structural comparison | Java bridges missing 133,364 -> 133,187 (177 rows removed, 0 added or changed); bridges absent from the library: 86 -> 86, the same rows; library and class ABI: 18,761 of 18,765 byte-identical, the other 4 lose only bridge methods (12); 7,031 consumers outside the universe byte-identical; 0 unclassified | https://artifacts.internalmeta.com/a/1144464078514795 | | Strict-gate rerun: flip driver on the 43 non-applicability WhatsApp pins, at the parent and here; strict compareAbi on D131393242's targets | 1 gained (`divider`), 0 lost; 16 more flip at both (Compose). D131393242 targets: 0 lost, `widget/friendselector` loses its bridge mismatch | https://artifacts.internalmeta.com/a/1144464078514795 | # rollout risks Source-only ABI jars of Java and mixed targets gain bridges (54 of 18,765); their consumers stop re-emitting them, so consumer bytecode changes (4 library jars) and caches miss. The superclass bridge lookup also runs in the library compilation, so D131393398's report-only check sees bridges that subclasses re-emit and reports more classes (4,772 -> 10,721 on its sample). The AOT cache pin must match the bootstrapper runtime at landing; a later master change to `lang/model`, the bootstrapper or the JDK needs `update.sh` again. The change reads javac internals (`Symbol.classfile`, `Flags.BRIDGE`, `ErrorType.getOriginalType`, `flatName`); the fixtures pass on JDK 17, 21 and 25. Full report: https://artifacts.internalmeta.com/a/1144464078514795 Reviewed By: rybalkinsd Differential Revision: D132746928 fbshipit-source-id: 882a04f0b7632f84ad2497ca175146e03ec721e7github.com-facebook-buck2 · c2688644 · 2026-11-18
- 1.2ETVTrack compiler settings and classpath order across incremental kotlinc rounds Summary: # Context Local incremental Kotlin builds through kotlincd decide what to recompile from source changes and classpath snapshots; a full round is forced only when `incremental_config.json` or a watched compiler plugin jar changes. This covers every local incremental `kotlin_library`/`android_library` action (on by default); remote execution compiles in full. # Problem - Compiler settings outside the config (JVM target, language version, compiler plugins and their options, friend paths, Kosabi settings) and the content of files options name (an `Silvochka`, Compose's `stabilityConfigurationPath`) are invisible, so unchanged files keep what an earlier round compiled. - A classpath reorder with the same snapshot set reaches Kotlin as `NoChanges`, so a consumer stays bound to the duplicate class that is no longer first. # Fix - With input tracking on, `incremental_config.json` gains `compiler_settings` (11 settings from `kotlinExtraParams`; friend paths by owner label), so a change compiles in full through the existing config comparison. Classpath-like entries stay out: their paths can change with content. - `IncrementalCompilerInputs` records per round (pending; promoted only on success) a digest of the content of every compiler plugin jar (`-Xplugin=`, `-Xcompiler-plugin=`) and of every file the target's options name (action-input digest, also for a file named through a symlink whose resolved path is an action input, else EdenFS SHA-1), leaving out the round's own sources, plus the classpath in search order. A changed digest forces a full round (`COMPILER_INPUT_FILES_CHANGED`); a changed order hands Kotlin the classpath diff. - Any failure while recording, an unparseable path included, compiles the round in full and drops the records, so that no later round compares with inputs older than its outputs; recording and promotion failures are logged. - Kill switch `kotlin.incremental_input_tracking` (default on); off, the config is byte-identical to today's and nothing else runs. # Evidence | Claim | Result | Link | |---|---|---| | Without the fix, JVM target, plugin option, argument file, Compose stability and classpath order changes leave the incremental output different from the full build | five tests in D132247357 assert it on fbandroid stable | [test run](https://www.internalfb.com/intern/testinfra/testrun/11258999290262416) | | With it, both twins agree at every step: this diff flips the expectations of those five tests; each piece's removal fails its test; the kill-switch config is byte-identical | 6 negative controls | [test run](https://www.internalfb.com/intern/testinfra/testrun/32651097356085741), [verification](https://artifacts.internalmeta.com/a/40233274006318999) | | Cost with D131570058: 12–22 ms per unchanged round (0.3–0.4% of kotlinc) on 3 WhatsApp class-mode targets, no spurious full round in 15 edits | measured | [verification](https://artifacts.internalmeta.com/a/40233274006318999) | | Independent review | approved | [review](https://artifacts.internalmeta.com/a/2081420972569641) | # Rollout and risks One full round per incremental target after landing (the config gains `compiler_settings`); flipping the kill switch or a Kosabi setting rebuilds incremental targets once. Not tracked: anything named inside an argument file (the argument file's own content is). Known limitation: Kotlin's caches can advance before the action succeeds, so recovery after a later-step failure plus an input revert is outside the tested contract. Full text: https://artifacts.internalmeta.com/a/2217469389179255. Stack design and status: https://docs.google.com/document/d/1QXRj_VLue8X0XvHZK1-kwCv1VnNBAax9YpaL7nviW3c/edit (section 10). Reviewed By: jiawei-lyu Differential Revision: D131569955 fbshipit-source-id: c41cb1873b2957a092bdc63b3f367a6c9a9f5ce9github.com-facebook-buck2 · be397e9b · 2026-11-17
- 1.0ETVWrite MUST_USE for overrides whose overridden member the source-only compile cannot resolve Summary: # context Background: Kotlin's unused return value checker (https://kotlinlang.org/docs/unused-return-value-checker.html) warns when a call's result, other than `Unit` or `Nothing`, is ignored; targets built with `-Werror` fail on it. `-Xreturn-value-checker=check` reports ignored results only from marked declarations (`MustUseReturnValues` on a function, class or file, most of the Kotlin standard library, and Java `CheckReturnValue` annotations); `full` treats every function in the module as marked. A target picks its mode with `return_value_checker` (`check` or `full`). `IgnorableReturnValue` (or error-prone's `CanIgnoreReturnValue`) opts a function out, and `val _ =` silences a single call site. An override inherits the reporting rule of the declaration it overrides, including declarations from library dependencies, and cannot be must-use where that declaration is `IgnorableReturnValue`. The resulting status is stored in each declaration's Kotlin metadata, so a consumer reads it from the jar it compiles against. Under `-Xreturn-value-checker`, kotlinc gives an override the return-value status of the first member it overrides (`FirMustUseReturnValueStatusComponent`). Source-only ABI generation compiles against the reduced classpath, where a supertype off it is missing or a member-less stub, so an override of one of its members finds nothing to override, or only other, visible members. Debug builds compile consumers against source-only ABIs; release (opt) builds, and igvr even in userdebug, compile against class ABIs. The two statuses then diverge in two ways: - Laxer, debug passes and release fails: a base flips to `return_value_checker = "full"` (its members become `MUST_USE`) while the override's target stays `check` or has no checker and does not have the base on its reduced classpath. The library and class ABI inherit `MUST_USE`; the source-only ABI gets the mode's `UNSPECIFIED`. A consumer with the checker and `-Werror` that discards the result compiles at diff time and breaks the release build after landing. - Stricter, debug fails and release passes: a `full` target overrides a non-must-use member off its reduced classpath; the source-only ABI gets `full`'s `MUST_USE`, the library the member's status. {F2007842717} Every case where an override in a `source_only` target cannot read its overridden member in the source-only compile, source-only ABI against the library, today → with this diff (a target without a source-only ABI gives its consumers its class ABI in every build, so it never drifts): | overriding target's mode | base member `MUST_USE` (base target `full`) | base member `UNSPECIFIED` (base target `check` or no checker) | base member `IgnorableReturnValue` | | --- | --- | --- | --- | | `full` | equal → equal | stricter → stricter | stricter → stricter (D131628945 asks for `IgnorableReturnValue` on the override) | | `check` or no checker | **laxer** (the four landed breaks below) → equal | equal → stricter (the one-time `val _ =` cleanup) | equal for callers → stricter (D131628945) | Effect of each direction: | | Debug and diff-time builds (source-only ABIs) | Release (opt) and igvr builds (class ABIs) | Surfaces | Breaks | Fix | | --- | --- | --- | --- | --- | --- | | **Laxer**: source-only ABI weaker than the library | pass | fail | after landing | stable, for everyone, at a call site in another target | revert or fix-forward; each of the four flips below needed one | | **Stricter**: source-only ABI stronger than the library | fail | pass | at diff time, in the change's own CI | only the change under review | one `val _ =`, `IgnorableReturnValue` on the override, or the base's target in `source_only_abi_deps` | Master holds 14,730 laxer rows (public or protected non-`Unit` members), and every base flip can turn some of them into release breaks. With the overridden member readable, both compiles see it and always agree. Production examples of the laxer case: four landed flips whose release break was fixed forward or reverted. In each, the flip turned only the BASE target `full`; the override's library stayed `check` with the base off its reduced classpath; the call site's receiver is the overriding type. - D129675889 (landed 4 Nov 19:52 UTC, reverted by D129740569 at 22:08) flipped `//fbandroid/java/com/instagram/reels/interactive/intf:intf`. `ReelItem` (`//fbandroid/java/com/instagram/model/reels:reels`, `check`, no `source_only_abi_deps`) overrides `InteractiveItem.media`: https://www.internalfb.com/code/fbsource/[ccf0f2d249f6]/fbandroid/java/com/instagram/model/reels/ReelItem.kt?lines=1650-1652 ``` Deprecated("Use getMediaAsFragment()") override val media: Media? get() = _media ``` `StoryStickerPositioningUseCase` discards it: `item.media ?: return StoryStickerPositioningUiState.Disabled` (https://www.internalfb.com/code/fbsource/[ccf0f2d249f6]/fbandroid/java/instagram/features/stories/mvvm/feature/stickermanager/domain/StoryStickerPositioningUseCase.kt?lines=39). - D130385079 (fixed forward by D130400946 and D130414895): `VideoStickerDrawable.decodeAndDraw` (`assetpicker/drawable`), `CutoutStickerCreationController.handleBackPressInMode` (`assetpicker/cutout`). - D130420653 (D130440089): `StickerReplaceUtil.replaceCaptionSticker` (`quickcapture/stickers/util`). - D130436541 (D130448270): `TimedStickerDrawable.baseDrawable` (`sundial/timedstickers`). | `ReelItem.getMedia()Lcom/instagram/feed/media/Media;` at e8e7507e8678 (descriptor identical in all three; before https://www.internalfb.com/buck2/5607878b-a844-4ba5-adde-ededd2feafe9, after https://www.internalfb.com/buck2/da107338-fb91-45f4-ab37-bf310d770324) | library | class ABI | source-only ABI | | --- | --- | --- | --- | | before | MUST_USE | MUST_USE | UNSPECIFIED | | after | MUST_USE | MUST_USE | MUST_USE | Consumers: - Kotlin caller built with the checker and `-Werror` that discards the result: before, its debug build passes and its opt build fails with `unused return value of 'media'`; after, its debug build fails the same way already before the flip lands (a one-time cleanup with `val _ =`), and at the flip debug and opt agree. Builds in the test plan. - Kotlin overrider: inherits the status into its own metadata. - Java callers, overriders and field readers, annotation processors and the runtime: unaffected; descriptors, flags and signatures are identical, and none of them reads the Kotlin return-value status. Reviewed By: rybalkinsd Differential Revision: D131516721 fbshipit-source-id: f07e0c3d677f4716ff40c6b96121940d1047eaafgithub.com-facebook-buck2 · 70185b0a · 2026-11-17
- 0.9ETVForce a full kotlincd round when Kosabi applicability inputs change Summary: # Context Kosabi applicability runs in the library kotlinc action of every `source_only` target, where incremental kotlinc is off today (`kotlin_library.bzl`). A blocked round fails and is rolled back, so committed incremental state only comes from READY rounds; an incremental verdict is complete when every input that can change it recompiles the affected files or forces a full round. # Problem Two such inputs are invisible to the incremental compiler: the applicability plugin (it reaches kotlinc through `kosabiPluginOptions`, which `IncrementalCompilationValidator` does not watch) and the reduced (source-only ABI) classpath it indexes (a jar entering or leaving it, or a class moving byte for byte across its boundary, changes no source and no compile-classpath snapshot). # Fix - `KotlincModeFactory` watches the applicability plugin jar like any compiler plugin when the action verifies source-only ABI constraints (`KOTLIN_COMPILER_PLUGIN_CHANGED`); a plugin without an action-metadata digest also forces a full round. - `ApplicabilityClasspathState` fingerprints what `SourceOnlyAbiClasspathScanner` reads (top-level class entry names; Kotlin metadata of classes that can declare top-level members, typed and length-prefixed); a changed fingerprint forces a full round with the new `APPLICABILITY_CLASSPATH_CHANGED`. Unchanged jar digests skip reading. - The state is written pending in `incremental_state/` (stale pending deleted first, temporary file plus atomic rename) and promoted from `KotlinCDCommand.postExecute()` only on success; an unreadable committed state counts as changed; a failed recording deletes both states and fails the round. # Evidence | Claim | Result | Link | |---|---|---| | The fingerprint catches added classes, jars leaving and facade metadata changes, and ignores moves between reduced jars, member-only and nested-class changes | new `ApplicabilityClasspathStateTest` cases pass | test plan | | Without this diff a byte-for-byte class move or a rule change gives incremental READY where the full build is BLOCKED | differential scenarios | D131481910 test plan | # Rollout and risks No action runs applicability incrementally until the flag in D131481910. Since D131579831 the plugin's classpath holds availability jars, which carry exactly what the scanner reads, so the fingerprint follows them; a member-only ABI change in a reduced-classpath dependency does not force a full round. Full text: https://artifacts.internalmeta.com/a/1167141738985440. Stack design and status: https://docs.google.com/document/d/1QXRj_VLue8X0XvHZK1-kwCv1VnNBAax9YpaL7nviW3c/edit (section 10). Reviewed By: AlexeySoshin Differential Revision: D131481907 fbshipit-source-id: b0e22c1cf5ed90634252fb3def2e6d2f4fc6d6ddgithub.com-facebook-buck2 · a98840b5 · 2026-11-17
- 0.9ETVKeep suppressed-exposure supertypes and signature types in so-ABI Summary: # context Suppressed-exposure supertypes and signature types must be kept in the so-ABI, with IR class retention plus a FIR metadata mirror. Builds on D130543366; the Any-method materialization stop in the same diff closes the earlier `equals`/`hashCode`/`toString` phantoms. # problem Fixture (`private open class PBase { fun base(): Int }`, `Suppress("EXPOSED_SUPER_CLASS") open class Pub : PBase()`): the keep-set dropped the suppressed supertype, so the so-ABI `Pub` named a superclass that was absent (`PBase.class`/`PArg.class` absent pre-fix — the failing-first record). Consumers calling an inherited member (`p.base()`) against the so-ABI failed: the member's owner was unresolvable. A second, subtler half: IR class retention alone leaves `Pub extends PBase` in bytecode but drops the link from Kotlin metadata (metadata is FIR-written), so the fix mirrors the retention into FIR metadata. Interfaces stay strip+materialize by decision (class-kind supertypes only). The metadata half was hidden because bytecode-level checks (javap superclass) pass while Kotlin-level resolution (metadata supertypes) still fails. # fix The keep-set retains suppressed-exposure supertypes and signature types (class-kind only); the stripper retains the IR classes and mirrors them into FIR metadata; the Any-method materialization stop ends the `equals`/`hashCode`/`toString` phantoms (private-interface fixture goes SEVERE=3 → SEVERE=0 with no other change); kept-interface members are abstracted. The signature scan runs in the same declaration walk as the annotation scan from D130543366, so surviving top-level functions, properties and accessors are covered too. It reads return, parameter, extension-receiver, field and type-parameter-bound types. Only a supertype itself is filtered to class kind; its type arguments are references and keep every kind. Scope: keep-set + retention + metadata mirror. Interface supertypes stay stripped-and-materialized; unreferenced subtrees stay dropped. ## Sample target and three-way ABI Fixture fallback: kosabi.py's fleet scan surfaced no suppressed-exposure supertype loss on any fleet target. Fixture (`suppressed-exposure superclass is kept and retained`; companion case `suppressed-exposure signature types are kept`). Failing-first record: `PBase.class`/`PArg.class` absent from the so-ABI pre-fix. ```kotlin package ib private open class PBase { fun base(): Int = 1 } Suppress("EXPOSED_SUPER_CLASS") open class Pub : PBase() ``` consumer: ```kotlin package ib fun use(p: Pub): Int = p.base() ``` `PBase` measured presence (threeway kit + committed presence assertion + consumer, parent `88702b7674d5` vs diff `6159214bf264`; class-ABI row re-measured with production jvm-abi-gen (swfx `pub` target: `PBase` + `Pub` both kept, production-grounded): ```text library jar: PBase present class ABI: PBase present (production keeps the suppressed-exposure supertype) source-only before: PBase ABSENT ( consumer p.base() unresolvable — the owner's class is missing) source-only after: PBase present, superclass link retained in bytecode and metadata (consumer OK) ``` Before row: `PBase.class`/`PArg.class` absent from both so-ABI jars while `Pub` names the superclass; the Any-method phantoms on the private-interface fixture (harness-triplet SEVERE=3) are the same run's control for the materialization stop (SEVERE=0 after, harness-triplet `3/1/1` at `6159214bf264` measured). Scoping note: against production jvm-abi-gen the private-interface fixture reads `2/2/1 SEVERE=6` before and `2/2/1 SEVERE=3` after — the Any phantoms close, while `C_MISSING_CLASS PI` + `C_INTERFACES Impl` (interface strip+materialize decision) and `R_PHANTOM_METHOD Impl :: d` (buck `-Xjvm-default=all` shape) remain, all out of scope for this diff. Consumer proof: the `use(p)` consumer (inherited-member call) fails against the before so-ABI and compiles against the after so-ABI and the class ABI: ```text assertThat(consumerAgainstSo.exitCode) .describedAs("SOABI consumer: " + consumerAgainstSo.messages) .isEqualTo(KotlinCompilation.ExitCode.OK) ``` Library and class-ABI bytes unchanged. Exact jars, commands and consumer proof: https://artifacts.internalmeta.com/a/1666562561672147 landed-with-radar-review Reviewed By: jiawei-lyu Differential Revision: D130543927 fbshipit-source-id: ffa3ebe532bdc667b573ba7abd969611f3d20ea4github.com-facebook-buck2 · ba6c9ba5 · 2026-11-10
- 0.8ETVDo not emit bridges to overloads javac does not resolve as the implementation Summary: # context D132746928 made Jasabi emit the bridges javac generates when an override names classes off the reduced classpath. Its fleet census found 86 bridges in source-only ABIs that the library does not have (T299082908): 8 in Java classes, 78 in Kotlin classes. A consumer compiled against such an ABI sees a method that the library lacks. # problem `ElementsExtendedImpl.getImplementation` picks a method that javac's `TransTypes` does not pick: 1. A parameter names a missing class. `Elements.overrides` treats the error type as equal to any type, so `set(int, TriState)` seems to override `set(int, boolean)` (`GatekeeperStoreImpl$Editor`, 3 bridges; `SecureWebView.setWebChromeClient`). 2. The return type is ignored: Jasabi took the Kotlin builder `setContentTransformMatrix(FloatArray): MutableVideoFrame` over the setter (`VideoInputFrame`). # fix - A parameter that names a missing class matches only the same missing class: the qualified name comes from the class file, else from the import or package of the source that wrote it. A type variable erases to its first bound (own bound, or the type argument the source ancestor wrote). Different simple names differ. - A candidate decided to match beats one left undecided by an unknown name; an undecided candidate is taken only when none is decided, so the bridge is kept and never replaced by another overload's. When no visible candidate matches, the implementation javac's member closure hid is looked up along the class-file superclasses. - A `void`/value or primitive return mismatch rejects a candidate; a dropped overriding overload is read from its attributed tree. - The module's Kotlin stubs do not keep kotlinc's member order, so a getter/override pair that differs only in return type keeps its bridge (the 3 WhatsApp `AttachedBanner` rows stay). - Out of scope: the 78 Kotlin rows come from the Kotlin source-only ABI (Kosabi). `lang/model` does not change, so the javacd AOT pin does not change. # example (`javap -p -s`, census jars) `fbandroid/java/com/facebook/gk/store:store` (pure Java), `GatekeeperStoreImpl$Editor`: ``` library, class ABI commit()V commit(Z)V gatekeeperByName(Ljava/lang/String;)I no bridges source-only, parent + bridge set(IZ)Lcom/facebook/gk/store/GatekeeperWriter$Editor; + bridge set(Ljava/lang/String;Z)Lcom/facebook/gk/store/GatekeeperWriter$Editor; + bridge override(Ljava/lang/String;Z)Lcom/facebook/gk/store/GatekeeperWriter$Editor; source-only, here no bridges ``` Kept: `wa_android//java/com/whatsapp/conversationrow/divider:divider` (mixed), `ConversationRowDivider`: library, class ABI and source-only ABI all have `0x1041 getFMessage()Lcom/whatsapp/infra/fmessage/base/protocol/FMessage;` and `generateLayoutParams(Landroid/util/AttributeSet;)Landroid/view/ViewGroup$LayoutParams;`; the source-only jar is byte-identical at the parent and here. # fleet, by path (18,710 Java or mixed `source_only` libraries of fb4a/ig4a/wa4a/wb4a) | Path | Targets built | Rows added or changed | Library / class ABI identical | Source-only jars changed | |---|---|---|---|---| | Jasabi (pure Java) | 4,342 | 0 (5 spurious removed) | 4,342 / 4,342 | 3: `gk/store`, `iab/securewebview`, `filterlib/input`; bridge removals only | | Kosabi (mixed Kotlin/Java) | 14,328 | 0 | 14,328 / 14,328 | 0 (14,328 byte-identical) | The consumers of the 3 changed jars outside the universe (164 Kotlin-only `source_only`, 8 class mode) are byte-identical, `T` and `T[class-abi]` (1 more has no output). Report: https://artifacts.internalmeta.com/a/29264165393193612 Reviewed By: jiawei-lyu Differential Revision: D133055627 fbshipit-source-id: d8c78cdd1fac5543c92583e087c167da4e1dd318github.com-facebook-buck2 · 2d80168e · 2026-11-19
- 0.8ETVCheck an incremental round again in full when Kosabi applicability does not pass it Summary: # Context An incremental round runs Kosabi applicability only on the files it recompiles, with unchanged files loaded from the previous outputs. A READY incremental verdict is sound (its inputs are tracked or force full rounds); a verdict that is not READY is not final. # Problem A finding in an unchanged file that depends on a changed one is not reported (the report is narrower than a full build's), and checks that need facts only source carries see unchanged files conservatively, so a round can block where a full build passes. # Fix - When an incremental round of an action that verifies source-only ABI constraints fails on an applicability verdict alone (report marker present, no other compiler error), kotlincd compiles it again in full in the same action (`APPLICABILITY_CHECKED_IN_FULL`) and reports that round instead. - Only rounds whose compile actually ran incrementally qualify: not forced full, shrunk snapshot present, no input-tracking reason, no compiler fallback (`Kotlinc.lastCompilationWasIncremental()`). - `IncrementalStateCopy` copies the working directory and class outputs before the full compile; they are put back if it fails too (so the next round stays incremental) and dropped if it passes; failing to put them back or drop them never changes the result. - `CapturingPrintStream.reset()` drops the first compile's output. # Evidence | Claim | Result | Link | |---|---|---| | Re-check, restore and drop behave as described, including failures around the copy | new `KotlincStepTest` and `IncrementalStateCopyTest` cases pass; each fails without its piece | test plan | | Every BLOCKED incremental round is followed by its full round, and reports equal the full build's | differential e2e | D131481910 test plan | # Rollout and risks A BLOCKED round costs an incremental plus a full compile and a state copy; the READY edit loop is unchanged. No action runs applicability incrementally until D131481910. Full text: https://artifacts.internalmeta.com/a/4609349642676200. Stack design and status: https://docs.google.com/document/d/1QXRj_VLue8X0XvHZK1-kwCv1VnNBAax9YpaL7nviW3c/edit (section 10). Reviewed By: jiawei-lyu Differential Revision: D131571202 fbshipit-source-id: fad39272d5657aee8d30218004ec24a8b0e9e5e8github.com-facebook-buck2 · a11aa1f9 · 2026-11-17
- 0.7ETVStrip members of private nested classes, keep shells Summary: # context D124427007: a `public val` in a `private companion object` survived into source-only ABI with an inferred type unresolvable on the reduced classpath, emitting `getTransportExecutor()Lerror/NonExistentClass;` and breaking fb4a/Messenger builds. T292318429 3-way showed class-ABI keeps it too: both generators strip by member flags only, ignoring the enclosing chain. # problem A public member of a private nested class is unreachable by every consumer: Kotlin resolves the metadata-private owner, Java sees a non-public nested class. Per binary-compatibility-validator effective-visibility (member in another class must be contained in the effectively public class: https://github.com/kotlin/binary-compatibility-validator#what-constitutes-the-public-api), these members are not API. Keeping them costs real build breaks (above) for zero consumers. ```kotlin open class A { private companion object { val helper: String = "x" // DROPPED: unreachable plain member fun compute(): Int = 42 // DROPPED: unreachable plain member JvmStatic fun probe(): Boolean = true // KEPT: outer static copy is reachable JvmStatic val staticProp: String = "s" // KEPT (+ its $annotations carrier) fun getStaticProp(x: Int): Int = x // DROPPED: unrelated overload, wrong arity } private class Helper { fun run(): String = "y" // DROPPED: unreachable plain member } JvmInline private value class State(val x: Int) // KEPT whole: lowerings read members private enum class Mode { ON, OFF } // KEPT whole: same fun publicMethod(): String = "hello" // KEPT: effectively-public owner } ``` `A$Companion` / `A$Helper` stubs keep only constructors (shells); the outer keeps the `JvmStatic` static copies. # fix Class-ABI half: `KotlinMetadataReader.isPrivateNestedClass` detects member classes with private Kotlin visibility; `shouldStripNestedMembers` limits stripping to plain classes/interfaces/objects (value, enum, enum-entry and annotation owners keep the old behavior, matching D124453208 whose backend lowerings read their members). `StubJarClassEntry` threads it to `AbiFilteringClassVisitor.stripAllMembers`, which drops all fields and non-constructor methods. Constructors flow through the normal filter (matches what source-only-abi keeps). `JvmStatic`/`JvmField` members are kept, detected from bytecode annotations (Kotlin metadata omits them; a synthetic `$annotations` carrier keeps its accessor too, matched by accessor JVM shape so unrelated overloads still drop), since their outer-class static copies are genuinely reachable. Class shells are kept: InnerClasses/constant-pool/`Metadata` references require the files. `kotlin.Metadata` is aligned with the stripped bytecode: functions/properties whose JVM members were dropped are removed from d1/d2 (kind/version/extras preserved; constructors untouched), so the stub no longer advertises absent members. Keep rules mirror the IR side: `JvmStatic` matches by member key, `JvmField`/const (outer-resident, field-only in metadata) kept when non-private, private members strip first. Strict-parse only with fail-closed to pass-through; when nothing would drop, original bytes are kept. NOTE: `java.bzl` wires `class_abi_generator` to the `:api-stubber` prebuilt; `#class-abi` outputs reflect this only after the prebuilt is rebuilt + re-uploaded (D124458159). Reviewed By: AlexeySoshin Differential Revision: D124453207 fbshipit-source-id: 6ead690af8d3d5d4dc04eb2448f319e30d11a3f1github.com-facebook-buck2 · dc34aac4 · 2026-10-19