M12 — the Android client, end to end #2

Merged
bvandeusen merged 86 commits from dev into main 2026-08-21 08:53:58 -04:00
Showing only changes of commit e7937ea87e - Show all commits
+29 -11
View File
@@ -189,25 +189,43 @@ reason. Bump the three together or not at all.
No workflow consumes it yet; the lane arrives with the app skeleton (M12 step 5). No workflow consumes it yet; the lane arrives with the app skeleton (M12 step 5).
## Formatting the Rust lane before pushing ## Checking the Rust lane before pushing
`cargo fmt --check` runs in CI and had failed on four consecutive desktop pushes There is no Rust toolchain on the workstation (rule 10) and the desktop lane is
by itself, each costing a full cycle to learn a whitespace nit. There is no Rust verified entirely in CI — but the CI image is pullable, so the three analyzer
toolchain on the workstation (rule 10), but the CI image is pullable, and running steps can be run against it locally first. **The operator authorised this on
a formatter is neither a test run nor a local stack: 2026-08-18** for `fmt`, `clippy` and `test`; it is not licence to run the bundle
build or stand up anything.
Run all three, in this order, before any push that touches Rust:
``` ```
docker run --rm --user "$(id -u):$(id -g)" -e CARGO_HOME=/tmp/cargo \ IMG=git.fabledsword.com/bvandeusen/ci-tauri:1.97
-v "$PWD:/w" -w /w \ DOCK="docker run --rm --user $(id -u):$(id -g) -e CARGO_HOME=/tmp/cargo -v $PWD:/w -w /w"
git.fabledsword.com/bvandeusen/ci-tauri:1.97 cargo fmt --all --check
$DOCK $IMG cargo fmt --all --check
$DOCK $IMG cargo clippy --locked --workspace --all-targets -- -D warnings
$DOCK $IMG cargo test --locked --workspace
``` ```
Drop `--check` to apply. `--user` keeps the container from leaving root-owned Drop `--check` from the first to apply it. `--user` keeps the container from
files behind; `CARGO_HOME` points somewhere writable for that user. leaving root-owned files behind; `CARGO_HOME` points somewhere writable for that
user. Commands are IDENTICAL to the workflow's, deliberately — a local check that
differs from CI is worse than none.
**This reproduces CI exactly, not approximately.** On the 2026-08-18 run the
local test binary hashes (`thoughtsync_core-bbaae79723888ad1`,
`thoughtsync_desktop_lib-9d162263f8d0aca3`, `thoughtsync_ffi-fc557b96dc795e27`)
matched CI run 3931's byte for byte. Same image, same lockfile, same units.
`target/` persists on the host between runs, so after the first cold build these
take seconds (~30s for clippy). It is gitignored and reaches ~1.4 GB; delete it
whenever the space is wanted.
**Don't infer formatting from existing code.** Several lines in `local/store.rs` **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 exceed 100 characters and survive only because rustfmt cannot break a string
literal — copying that shape caused one of the four failures. literal — copying that shape caused one of four consecutive fmt-only CI failures,
which is what this whole section exists to prevent.
## The desktop lockfile ## The desktop lockfile