From 1f294c4ad8496d979465f2806522f9da1641d875 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sun, 26 Jul 2026 19:27:39 -0400 Subject: [PATCH] ci-requirements: record how to format the Rust lane without a local toolchain Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SreJkbxB4gx8pPsu8QbLPi --- ci-requirements.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ci-requirements.md b/ci-requirements.md index d167837..4132406 100644 --- a/ci-requirements.md +++ b/ci-requirements.md @@ -131,3 +131,23 @@ backend/frontend push. a TLS-backend change as a change to *this lane*, not just a dependency bump. - No Postgres lane (unchanged): the desktop app's local store + sync behavior is verified on the operator's machine, not in CI. + +## Formatting the Rust lane before pushing + +`cargo fmt --check` runs in CI and had failed on four consecutive desktop pushes +by itself, each costing a full cycle to learn a whitespace nit. There is no Rust +toolchain on the workstation (rule 10), but the CI image is pullable, and running +a formatter is neither a test run nor a local stack: + +``` +docker run --rm --user "$(id -u):$(id -g)" -e CARGO_HOME=/tmp/cargo \ + -v "$PWD/desktop/src-tauri:/w" -w /w \ + git.fabledsword.com/bvandeusen/ci-tauri:1.97 cargo fmt --check +``` + +Drop `--check` to apply. `--user` keeps the container from leaving root-owned +files behind; `CARGO_HOME` points somewhere writable for that user. + +**Don't infer formatting from existing code.** Several lines in `local/store.rs` +exceed 100 characters and survive only because rustfmt cannot break a string +literal — copying that shape caused one of the four failures.