ci: fail Android PRs on ktlint formatting drift#101275
Conversation
6cd756a to
83ba328
Compare
|
Codex review: needs changes before merge. Reviewed July 6, 2026, 10:52 PM ET / 02:52 UTC. Summary PR surface: Config +5, Other -4. Total +1 across 3 files. Reproducibility: yes. Current main's Android matrix omits ktlint while Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land the ktlint lane after adding Do we have a high-confidence way to reproduce the issue? Yes. Current main's Android matrix omits ktlint while Is this the best way to solve the issue? Yes, with one completion gap. Reusing the existing Android CI job is the best owner-boundary fix because it already has the SDK/JDK setup; docs and a guard assertion should be added to make it durable. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 084cf2a43ddf. Label changesLabel justifications:
Evidence reviewedPR surface: Config +5, Other -4. Total +1 across 3 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (1 earlier review cycle)
|
Formatting drift landed via #101161; :app:ktlintCheck fails on main without this. Generated with ./gradlew :app:ktlintFormat.
Android formatting drift kept landing on main because CI never ran ktlintCheck (see the #100304 manual sweep). Adds an android-ktlint matrix lane mirroring pnpm android:lint.
The ktlint format fix shifted line numbers tracked in apps/.i18n/native-source.json; regenerated via pnpm native:i18n:sync.
…eyTest Import-order/blank-line drift landed via the hardware-Enter changes (#101321 and follow-up) while this PR was open — the exact recurrence the new android-ktlint lane prevents. Generated with ktlintFormat; native i18n inventory resynced for the shifted line numbers.
83ba328 to
e3d17f2
Compare
|
Merged via squash.
|
* style(android): fix ktlint drift in ShellScreen.kt Formatting drift landed via openclaw#101161; :app:ktlintCheck fails on main without this. Generated with ./gradlew :app:ktlintFormat. * ci(android): add ktlint lane to the Android CI job Android formatting drift kept landing on main because CI never ran ktlintCheck (see the openclaw#100304 manual sweep). Adds an android-ktlint matrix lane mirroring pnpm android:lint. * chore(i18n): sync native inventory after ShellScreen.kt format The ktlint format fix shifted line numbers tracked in apps/.i18n/native-source.json; regenerated via pnpm native:i18n:sync. * style(android): fix new ktlint drift in NodeRuntime and ChatHardwareKeyTest Import-order/blank-line drift landed via the hardware-Enter changes (openclaw#101321 and follow-up) while this PR was open — the exact recurrence the new android-ktlint lane prevents. Generated with ktlintFormat; native i18n inventory resynced for the shifted line numbers.
* style(android): fix ktlint drift in ShellScreen.kt Formatting drift landed via openclaw#101161; :app:ktlintCheck fails on main without this. Generated with ./gradlew :app:ktlintFormat. * ci(android): add ktlint lane to the Android CI job Android formatting drift kept landing on main because CI never ran ktlintCheck (see the openclaw#100304 manual sweep). Adds an android-ktlint matrix lane mirroring pnpm android:lint. * chore(i18n): sync native inventory after ShellScreen.kt format The ktlint format fix shifted line numbers tracked in apps/.i18n/native-source.json; regenerated via pnpm native:i18n:sync. * style(android): fix new ktlint drift in NodeRuntime and ChatHardwareKeyTest Import-order/blank-line drift landed via the hardware-Enter changes (openclaw#101321 and follow-up) while this PR was open — the exact recurrence the new android-ktlint lane prevents. Generated with ktlintFormat; native i18n inventory resynced for the shifted line numbers.
* style(android): fix ktlint drift in ShellScreen.kt Formatting drift landed via openclaw#101161; :app:ktlintCheck fails on main without this. Generated with ./gradlew :app:ktlintFormat. * ci(android): add ktlint lane to the Android CI job Android formatting drift kept landing on main because CI never ran ktlintCheck (see the openclaw#100304 manual sweep). Adds an android-ktlint matrix lane mirroring pnpm android:lint. * chore(i18n): sync native inventory after ShellScreen.kt format The ktlint format fix shifted line numbers tracked in apps/.i18n/native-source.json; regenerated via pnpm native:i18n:sync. * style(android): fix new ktlint drift in NodeRuntime and ChatHardwareKeyTest Import-order/blank-line drift landed via the hardware-Enter changes (openclaw#101321 and follow-up) while this PR was open — the exact recurrence the new android-ktlint lane prevents. Generated with ktlintFormat; native i18n inventory resynced for the shifted line numbers.
What Problem This Solves
Android ktlint formatting drift keeps landing on
mainbecause CI never runsktlintCheck: theandroidCI job only coverstest-play,test-third-party, andbuild-play. This forced a manual sweep commit (#100304, "style(android): apply ktlint to landed changes"), and more unformatted Android PRs landed the same day. While preparing this PR,mainhad already drifted again: #101161 landed 4 ktlint violations inShellScreen.kt.Why This Change Was Made
Adds an
android-ktlintlane to the existingandroidmatrix job that runs./gradlew --no-daemon --build-cache :app:ktlintCheck :benchmark:ktlintCheck, mirroringpnpm android:lint. It reuses the job's existing Java/Android SDK setup — ktlint itself is JVM-only, but the AGP modules need the SDK to configure, so a slimmer SDK-less job would not work. The first commit fixes the currentShellScreen.ktdrift (via./gradlew :app:ktlintFormat, formatting-only) so the lane is green from the start; the formatting shifted tracked line numbers, so the native i18n inventory is resynced in a follow-up commit (pnpm native:i18n:sync, line numbers only).User Impact
No user-facing behavior change. PRs touching
apps/androidnow fail CI on formatting drift instead of silently landing it, so maintainers no longer need periodic manual ktlint sweeps.Evidence
Verified against
mainat ceb7a4a (Android tree identical to the ktlint-checked b2cecd8):./gradlew :app:ktlintCheck :benchmark:ktlintCheckon unmodifiedmainFAILS with 4 violations inapp/src/main/java/ai/openclaw/app/ui/ShellScreen.kt(introduced by fix(android): stabilize recent sessions overview #101161).ktlintFormat-generated fix in this PR:BUILD SUCCESSFUL, both:appand:benchmarkclean;ShellScreen.ktis the only file the formatter touched.android-ktlintcheck ran end-to-end on this PR's first push and completedsuccess— live proof the lane triggers for PRs touchingapps/android(this PR edits a Kotlin file) and passes on formatted code.pnpm native:i18n:checkpasses after the inventory resync (entries=2868 changed=false).actionlintand YAML parse clean on the modified.github/workflows/ci.yml; the lane runs under the samerun_android_jobscope gate as the existing Android lanes.Known unrelated failures from current
main(present at ceb7a4a in files this PR does not touch):check-lintfails onsrc/skills/workshop/curator.ts:521(oxc no-map-spread, from #101214) and on literal merge-conflict markers inui/src/components/app-sidebar.ts(landed via #101191);checks-fast-bundled-protocolfails because the generated protocol clients were not regenerated for the newSkillsCuratorStatus*schema (#101214). Being fixed separately.