Repository navigation
ci: report Java to Kotlin migration progress on pull requests - #850
nickolas-dimitrakas wants to merge 1 commit into
Conversation
Kotlin migration progressNo change to the Java left to convert.
Conversion progress: 0.0% (16,608 of 16,550 baseline Java LOC left to convert). 132 Java files and 36 Kotlin files in scope. |
📦 SDK Size Impact ReportWhat the SDK adds to a minified release APK. Measured against an empty baseline app. Unlike the Rokt kit, android-core ships no Compose and no resources, so there is nothing here that a host app would already provide. mParticle Core SDK
➡️ SDK size impact change is minimal. Raw measurementsTarget branch: {"baseline_dex_bytes": 0, "baseline_download_bytes": 2510, "baseline_install_bytes": 7526, "core_dex_bytes": 218884, "core_download_bytes": 122935, "core_install_bytes": 130188}This PR: {"baseline_dex_bytes": 0, "baseline_download_bytes": 2515, "baseline_install_bytes": 7531, "core_dex_bytes": 218884, "core_download_bytes": 122935, "core_install_bytes": 130188} |
PR SummaryLow Risk Overview Introduces Adds the Kotlin Migration Progress GitHub Actions workflow job to Reviewed by Cursor Bugbot for commit 76c157c. Bugbot is set up for automated code reviews on this repo. Configure here. |
2caa271 to
6ade310
Compare
| headline=":warning: This pull request **adds ${delta_java} lines** of Java to the published modules." | ||
| else | ||
| headline="No change to the Java left to convert." | ||
| fi |
There was a problem hiding this comment.
Headline hides warning when ratchet will fire
Low Severity
The headline branches on delta_left (non-facade Java) first, but the ratchet checks delta_java (all Java including facades). When delta_left < 0 and delta_java > 0 — e.g., a PR converts some non-facade Java while also growing a facade file — the headline cheerfully says "converts N lines" while the ratchet step fails the job. The PR comment gives no hint that the ratchet will fire, creating a confusing disconnect between the sticky comment and the red CI status.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6ade310. Configure here.
6ade310 to
e31d469
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e31d469. Configure here.
| headline=":warning: This pull request **adds ${delta_java} lines** of Java to the published modules." | ||
| else | ||
| headline="No change to the Java left to convert." | ||
| fi |
There was a problem hiding this comment.
Headline misreports when Java-left increases silently
Low Severity
The headline logic has a gap: when delta_left > 0 (Java left to convert increased) but delta_java <= 0 (total Java didn't grow), the else branch fires and reports "No change to the Java left to convert," which is factually wrong. The ratchet also doesn't catch this because it only checks delta_java > 0. A realistic trigger is extracting code from a facade file into a new non-facade internal class — total Java stays flat, but convertible Java rises. Neither the headline nor the ratchet flags the regression.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit e31d469. Configure here.
72ce820 to
01f50f5
Compare
Adds scripts/kotlin_migration_progress.py, which measures android-core and android-kit-base main sources and reports Java left to convert, the Kotlin share and conversion progress against the baseline, with the public-facade files that stay Java listed in scripts/kotlin-migration-facades.txt. A new Kotlin Migration Progress job posts the numbers on every pull request, measuring the base branch with the head's facade list, and fails when a pull request adds Java to the published modules without the allow-new-java label. The tracker gains the expected numbers at each checkpoint. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
01f50f5 to
76c157c
Compare


Summary
Implements the progress report and the "no new Java" ratchet that the migration playbook describes.
scripts/kotlin_migration_progress.pymeasuresandroid-core/src/mainandandroid-kit-base/src/mainand reports, per module and in total: Kotlin LOC, Java LOC, Java that stays by design, Java left to convert, Kotlin share, and conversion progress against the 16,550-line baseline measured at4ee3ba4c. Line counts matchwc -l, so the numbers agree with the tracker.scripts/kotlin-migration-facades.txtlists the 65 Java files that stay Java (the public API customers and kit authors compile against, per the playbook's Scope section, plus everypackage-info.java). Atmainthey total 11,287 LOC.allow-new-javalabel. It is not in the required-check set.scripts/test_kotlin_migration_progress.pycovers the counting, the facade exclusion, the renderers and the clamping; CI runs it first.TRACKER.mdgains the 0.8 row and a "Checkpoints and expected numbers" table with the Java-left, conversion-progress and estimated Kotlin-share values expected at each stack and checkpoint;PLAYBOOK.mdandAGENTS.mdmention the job.Verification
main(4ee3ba4c): Java left 16,550, facade 11,287, Kotlin share 12.0%, conversion progress 0.0%.maincheckout as the base; on this stack it correctly reports the seams added by test: expose explicit test seams for package-private core internals #845 as new Java, which is the expected ratchet signal for that change.Follow-up
The
allow-new-javalabel does not exist yet and needs creating in the repository settings, alongsideapi-change-approvedfrom #843.🤖 Generated with Claude Code