Skip to content

style(android): apply ktlint to landed changes#100304

Merged
steipete merged 3 commits into
mainfrom
codex/android-test-lint-followup
Jul 6, 2026
Merged

style(android): apply ktlint to landed changes#100304
steipete merged 3 commits into
mainfrom
codex/android-test-lint-followup

Conversation

@steipete

@steipete steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Android ktlint failed on current main after the landed mobile chat stack, including recovery (#100551), syntax highlighting (#100217), and command-control changes. The previous PR branch was based on an old tree and could no longer be safely rebased: it included stale source and would have deleted a newer test assertion.

Why This Change Was Made

Rewrite the PR from current main, run the repository's authoritative :app:ktlintFormat task on Blacksmith Testbox, and keep only its mechanical output. The result formats all 13 Kotlin source/test files currently reported by :app:ktlintCheck; the native-app i18n inventory is regenerated only to refresh moved source line numbers. No runtime or test behavior changes.

User Impact

No product behavior change. Android lint is green again, so later mobile changes inherit a clean validation baseline.

Evidence

  • Blacksmith Testbox tbx_01kwtnc77nmsgh6mjn01f2ct8b: cd apps/android && ./gradlew :app:ktlintCheck :app:testPlayDebugUnitTest --tests ai.openclaw.app.chat.ChatControllerCommandControlsTest --tests ai.openclaw.app.gateway.InvokeErrorParserTest --rerun-tasks — green.
  • node --import tsx scripts/native-app-i18n.ts check — green after regenerating apps/.i18n/native-source.json.
  • Fresh Codex autoreview: clean; formatting-only patch assessed correct.
  • git diff --check — green.

Follow-up to #100551, #100217, #100200, and #98796.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: S maintainer Maintainer-authored PR labels Jul 5, 2026
@clawsweeper

clawsweeper Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 6, 2026, 1:00 AM ET / 05:00 UTC.

Summary
The branch applies ktlint formatting to Android Kotlin source/test files and refreshes native i18n source line metadata.

PR surface: Other +231. Total +231 across 14 files.

Reproducibility: not applicable. as a product-bug reproduction; this is a formatting cleanup PR. The relevant check is source/diff validation plus ktlint/native-i18n evidence, and I did not rerun Gradle in this read-only review.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🐚 platinum hermit
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Resolve or explain the current exact-head non-Android CI failures before merge.

Risk before merge

  • [P1] The exact-head CI run still has several non-Android failures; I did not trace them to this Android formatting diff, so merge should wait for normal required-check resolution or maintainer explanation.

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow Android formatter and generated-inventory cleanup after the required CI and maintainer gates are satisfied, without adding behavior, config, dependency, or release-note changes.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P2] This is an open maintainer-labeled PR with current full-CI failures to resolve, not a narrow ClawSweeper repair job.

Security
Cleared: Cleared: the current diff does not change dependencies, workflows, lockfiles, scripts, secrets, permissions, downloads, or install/release paths.

Review details

Best possible solution:

Land the narrow Android formatter and generated-inventory cleanup after the required CI and maintainer gates are satisfied, without adding behavior, config, dependency, or release-note changes.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a product-bug reproduction; this is a formatting cleanup PR. The relevant check is source/diff validation plus ktlint/native-i18n evidence, and I did not rerun Gradle in this read-only review.

Is this the best way to solve the issue?

Yes, this is the narrow maintainable solution for the stated ktlint issue: keep only formatter output and the generated native-source line metadata. The remaining work is required-check and maintainer handling, not a code repair.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 55a0012c44b5.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies Testbox terminal proof for the formatter/focused Android checks, and the current exact-head CI run shows native-i18n and Android jobs passing for this formatting-only change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body supplies Testbox terminal proof for the formatter/focused Android checks, and the current exact-head CI run shows native-i18n and Android jobs passing for this formatting-only change.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: The intended and current diff is a low-risk formatting/generated-inventory cleanup with no product behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body supplies Testbox terminal proof for the formatter/focused Android checks, and the current exact-head CI run shows native-i18n and Android jobs passing for this formatting-only change.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies Testbox terminal proof for the formatter/focused Android checks, and the current exact-head CI run shows native-i18n and Android jobs passing for this formatting-only change.
Evidence reviewed

PR surface:

Other +231. Total +231 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 14 397 166 +231
Total 14 397 166 +231

What I checked:

  • Root and scoped policy read: The full root policy requires whole-surface PR review and scoped AGENTS reads; the Android scoped policy adds release/license guardrails that are not implicated by this formatting-only diff. (AGENTS.md:29, 55a0012c44b5)
  • Current PR scope is narrow: Live GitHub diff lists only 14 files under apps/android plus apps/.i18n/native-source.json, so the earlier broad non-Android branch drift finding no longer applies. (355adff93171)
  • Diff shape is formatter/generated metadata only: The patch hunks are ktlint wrapping/import/blank-line changes in Kotlin files and generated native-source line-number updates; I did not see config, dependency, API, workflow, or runtime logic changes. (apps/android/app/src/main/java/ai/openclaw/app/chat/ChatController.kt:733, 355adff93171)
  • Android ktlint contract: The Android app applies the ktlint Gradle plugin with ignoreFailures=false, matching the PR's stated formatter gate. (apps/android/app/build.gradle.kts:187, 55a0012c44b5)
  • Native i18n generated inventory contract: The native i18n script writes apps/.i18n/native-source.json and scans Android Kotlin/KTS sources, so the generated line-number refresh is the expected companion output after formatting. (scripts/native-app-i18n.ts:61, 55a0012c44b5)
  • Current exact-head CI evidence: The current-head CI run for 355adff reports native-i18n, android-test-play, android-test-third-party, and android-build-play success, while several unrelated non-Android jobs failed and still need ordinary gate handling. (355adff93171)

Likely related people:

  • steipete: Recent merged Android chat recovery, syntax highlighting, streaming harness, and native-i18n work account for most of the formatted surface, and git history/blame point to those commits. (role: recent area contributor and likely follow-up owner; confidence: high; commits: 2b48e9814840, 5c3e938e7010, 3f493aa6d015; files: apps/android/app/src/main/java/ai/openclaw/app/chat/ChatController.kt, apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatCodeHighlight.kt, apps/.i18n/native-source.json)
  • IWhatsskill: The merged Android command-controls PR introduced the command UI and tests now included in the ktlint cleanup surface. (role: feature contributor; confidence: high; commits: c680312ef6f3; files: apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatCommandControls.kt, apps/android/app/src/main/java/ai/openclaw/app/ui/chat/ChatComposer.kt, apps/android/app/src/test/java/ai/openclaw/app/chat/ChatControllerCommandControlsTest.kt)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (7 earlier review cycles)
  • reviewed 2026-07-05T11:41:42.380Z sha 9074cb0 :: needs changes before merge. :: [P2] Regenerate the native i18n inventory
  • reviewed 2026-07-05T12:12:00.348Z sha 0b78888 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-05T13:36:40.354Z sha e7b4934 :: needs real behavior proof before merge. :: [P1] Rebase back to the Android-only cleanup
  • reviewed 2026-07-05T14:49:33.605Z sha d3d276b :: needs real behavior proof before merge. :: [P1] Rebase back to the Android-only cleanup | [P2] Roll back staged API keys on all activation failures | [P2] Clear terminal disconnect when a new start begins
  • reviewed 2026-07-05T15:12:06.883Z sha 91c577e :: needs real behavior proof before merge. :: [P1] Rebase back to the Android-only cleanup | [P2] Roll back staged API keys on later setup failures | [P2] Clear terminal disconnect when a new start begins
  • reviewed 2026-07-06T03:18:40.840Z sha bf4da24 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-06T04:10:05.595Z sha 0d6388f :: needs real behavior proof before merge. :: [P1] Rebuild the branch back to the Android-only cleanup

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 5, 2026
@steipete
steipete force-pushed the codex/android-test-lint-followup branch from 9e2ac32 to 0b78888 Compare July 5, 2026 12:03
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 5, 2026
@steipete
steipete requested a review from a team as a code owner July 5, 2026 13:13
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web app: ios App: ios app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations labels Jul 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 91c577e470

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let key = self.manualKey.trimmingCharacters(in: .whitespacesAndNewlines)
guard !key.isEmpty, !self.manualTesting else { return }
self.manualError = nil
self.manualTesting = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Keep close guard active during manual key tests

When the user falls through to the manual API-key form, this starts the same crestodian.setup.activate live test/persist flow but only flips manualTesting; phase stays .ready, so the phase.didSet busyReason never gets set and OnboardingController.windowShouldClose allows the onboarding window to close without confirmation. In that manual-key scenario, closing/Cmd-W can silently abandon the UI while the gateway may still be testing and writing credentials/config, unlike automatic candidate tests. Set the same busy guard/phase for manual testing and clear it in the completion path.

Useful? React with 👍 / 👎.

@steipete
steipete force-pushed the codex/android-test-lint-followup branch from 91c577e to bf4da24 Compare July 6, 2026 03:00
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: matrix Channel integration: matrix channel: mattermost Channel integration: mattermost channel: telegram Channel integration: telegram channel: voice-call Channel integration: voice-call channel: whatsapp-web Channel integration: whatsapp-web app: ios App: ios app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes scripts Repository scripts commands Command implementations docker Docker and sandbox tooling agents Agent runtime and tooling extensions: device-pair channel: qqbot extensions: qa-lab labels Jul 6, 2026
@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready on bf4da24de6d321319691f3d659b29f1558b485bd.

The stale branch was discarded and rebuilt from current main. This is the exact :app:ktlintFormat output for all 13 Kotlin files now reported by the Android lint gate, plus generated native-i18n line-location metadata. It preserves the newer test assertion that the old branch would have removed.

Proof:

No product behavior, public API, dependency, or changelog surface changes.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Dependency graph guard cleared

This PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh /allow-dependencies-change comment after the guard blocks that new head SHA.

  • Current SHA: 2b062ce9e6eac7c59f5e7e4e0ad366ba98fd948b

@steipete

steipete commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant