From 87a0ef1a2a596c832f16e180ede4e195140fc00f Mon Sep 17 00:00:00 2001 From: iris <2+iris@noreply.localhost> Date: Fri, 28 Aug 2026 04:03:48 -0400 Subject: [PATCH] Put the formatter and the linter in the routine that people actually run AGENTS.md's "Checking your work" listed a typecheck for the app and tests plus clippy for the server. Neither half mentioned a formatter, and nothing mentioned Android Lint at all -- which is how a linter that was in the build the whole time went unrun long enough to accumulate a crash. Both lines now say the whole thing, and the app's reads as the counterpart of the server's rather than a shorter version of it. The note about lint is there because it is the one step a build does not do for you: nothing fails if you skip it, which is exactly why it needs writing down. The command in the app bullet is the one I ran to verify this commit. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_017xn8nHw1tw1R6PtiY1eEtw --- AGENTS.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a0ff5c2..6d89068 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -64,12 +64,20 @@ real-phone/WireGuard bring-up, which is operational rather than code. ## Checking your work -- Server: `./run-tests.sh` (or `cargo test`) + `cargo clippy --all-targets` - from `server/` — the build stays warning-clean, keep it that way. -- App: from `app/`, `. ./android-env.sh && ./gradlew :androidApp:compileDebugKotlin` - to typecheck; `./build-apk.sh` to produce the APK to install on a phone - (through Dev Updater); `./run-android.sh` to build, install, and launch - on the emulator. +- Server: from `server/`, `./run-tests.sh` (or `cargo test`) + + `cargo clippy --all-targets` + `cargo fmt`. The build stays + warning-clean and rustfmt-clean at the defaults — there is no + `rustfmt.toml` and there should not be one. +- App: from `app/`, `. ./android-env.sh && ./gradlew :androidApp:ktfmtFormat + :androidApp:compileDebugKotlin :androidApp:lintDebug` — format, typecheck + and lint, the app-side equivalent of the line above. Then `./build-apk.sh` + to produce the APK to install on a phone (through Dev Updater), or + `./run-android.sh` to build, install, and launch on the emulator. +- **Android Lint is not optional and is not run by a build.** It found a + crash that had been shipping: `java.time` on a minSdk-24 app with + desugaring off. It is clean now apart from Compose 1.11.1 having a 1.12.0 + available; keep it that way, and suppress with `tools:ignore` plus a + written reason rather than by lowering the bar. - **The APK pins the CA of the machine that builds it**, read at build time from `$XDG_CONFIG_HOME/ai-app/certs/ca.pem` (`AI_APP_CA` overrides) and generated into a constant. So the server must have started once on that