Testing & CI
Everything runs through pixi so the toolchain is reproducible. One gate:
pixi run ci # = fmt + fmt-ui + clippy + test + test-native-git
# + test-ui + check-ui + deny + checks + third-party-check + docs
# (the list that is true is the `ci` task in pixi.toml)
The suites
| Task | What it runs |
|---|---|
pixi run test | cargo test --workspace — the Rust unit + integration tests. |
pixi run test-ui | Vitest (jsdom) — the markdown→HTML render seam and app flows. |
pixi run check-ui | svelte-check over every component. vite build does not typecheck — it strips types and emits — so without this a component calling a function it never imported builds clean and throws in the browser. |
pixi run seam | the zero-I/O fm-query suite (seam 1). |
pixi run perf | search-under-budget (< 100 ms at 10k notes). |
pixi run deny | cargo deny — license/advisory gate (permissive-only). |
pixi run checks | architectural greps (see below). |
pixi run third-party-check | THIRD-PARTY.md still describes the tree it claims to. Regenerate with pixi run third-party. |
pixi run docs | builds this book; broken links fail the build. |
Environments
pixi.toml defines three, and a task belongs to exactly one. Running a task from the wrong one
is a real hazard rather than a tidiness point: the environments resolve their own nodejs/pnpm,
and a mobile CLI run from the wrong one has already re-resolved a dependency and broken a build.
| Environment | For |
|---|---|
default | everything above, and the optional media tools (pdftotext, vipsthumbnail, restic), so the tests that probe for them exercise them instead of skipping. |
android | the Android toolchain: pixi run -e android android-release, android-smoke. |
cross | the cross-compilation targets. pixi run -e cross check-cross type-checks Myrme’s fm-agent crate for Windows, macOS and both iOS targets. |
Opt-in suites — not in the gate, and each for a reason
These are cheap, they run locally, and none of them needs CI. They are outside pixi run ci
because they are slow, need a toolchain the gate does not, or are for one platform.
| Task | Run it when |
|---|---|
pixi run -e cross check-cross | after touching anything per-OS in Myrme’s fm-agent. It found a no-op std::mem::forget on a raw pointer and a deprecated libc::mach_host_self on its first run, in code that had shipped without ever being compiled for either target. |
pixi run check-pins (in Myrme’s repository) | when a model or runtime pin moves. Downloads ~110 MB and checks every pinned runtime is really there. |
| (the assistant) | its own tests — the download wrappers, the evals, pixi run integration against this app — run in Myrme’s repository, https://github.com/formicaria-org/myrme. |
pixi run -e android android-smoke | after an Android change, with a device or emulator attached. |
Conventions
- Hermetic. Tests use
tempfile::tempdiror the in-RAMMemoryStore; no network, no shared state. Tests needing a subprocess tool (e.g.restic,pdftotext) probe for it and skip with a message when it’s absent, so the suite stays green outside the full env whilepixi runexercises it for real. - Contract equivalence.
FileStoreis tested to behave identically toMemoryStore, so command tests written against the memory store hold in production. - Byte round-trip. A note read → edited → written back is byte-for-byte identical; this invariant is pinned by a test.
The architectural greps (ci/checks.sh)
Dozens of invariants are enforced as build-failing greps — run
pixi run checks and read the [check] lines, which are the list. (No number here on
purpose: this page said “two” long after there were dozens. A count in prose is a claim
nothing verifies.)
The two the seams rest on:
- Seam 1 —
fm-querymust not reference a database crate,std::fs,std::path, orFile. The query engine physically cannot do I/O. - Generic renderers — no
todo|doing|doneliteral may appear underui/src/renderers/**. Status names live only in data and CSS.
The rest cover the two git backends staying in step, the release archive’s contents, the iOS and Android shells, licence and font notices, the workflow triggers, and the documentation this manual is part of — including a check that every dispatch arm has a row in the command reference.
Run pixi run checks before committing a renderer or a query-engine change.
UI dev without a backend
pnpm -C ui dev (or the vitest suite) runs the UI against the in-memory mock in
ui/src/lib/mock.ts — no server, no vault. import.meta.env.PROD selects the
real HTTP backend only in the built bundle.