tests: Consolidate integration binaries into one, fix nextest filters
Closes #2 (target/ bloat).
The 22 files in `mnemosyne_tests/tests/*.rs` were each compiling
into their own statically-linked binary, every one of which pulled
in the full crate graph (sqlx, tokio, bollard, gix, reqwest,
mnemosyne_protocol, mnemosyne_ssh, mnemosyne_xrpc, ...). Across stale
hashed copies in `target/debug/deps/`, that reached ~80 GB. After
consolidation, one binary (~115 MB) replaces the 22 (~1.4 GB+
combined per build, multiplied across stale copies).
Layout change:
tests/
integration/
main.rs <-- single binary entry point
common/ <-- shared fixtures (formerly tests/common/)
<former tests/foo.rs as modules>
proptest-regressions/<-- seeds moved here (see below)
`Cargo.toml` declares the binary via `[[test]]` and turns off
`autotests` so a stray `tests/*.rs` from a future PR can't silently
re-introduce the per-file-binary explosion.
Pre-existing nextest config bug surfaced and fixed
---------------------------------------------------
The `public-keys` test-group override was using filters of the form
`test(=mnemosyne_tests::xrpc_endpoints::list_keys_*)`. Nextest's
`test()` matcher operates on the test name *within* the binary
(`xrpc_endpoints::list_keys_*` in the consolidated layout, just
`list_keys_*` in the old per-binary layout), not the full
`<package>::<binary>::<test>` triple printed by `--list`. So the
override was matching zero tests, the group was silently empty, and
the `DELETE FROM public_keys` races described in the config's own
comment were happening on every run — they just rarely lost.
Consolidation made the race deterministic enough to fail today's
`just test` run. Filters rewritten to bare module paths and a
comment added so the next person to touch this doesn't re-break it.
Proptest regression layout
--------------------------
Proptest's default `FileFailurePersistence::SourceParallel` walks
up from the source file looking for `tests/` (a special dir name)
and places `proptest-regressions/<name>.txt` parallel to it. Under
the old top-level-file layout that resolved to
`tests/<name>.proptest-regressions`; under the new layout it
resolves to `tests/proptest-regressions/<name>.txt`. Migrated the
four existing seed files so proptest still replays them.
cargo-sweep
-----------
Added `just sweep [days=14]` (wraps `cargo sweep --time`) and
`just sweep-toolchain` (wraps `cargo sweep --installed`). Includes
`target/debug/incremental/` automatically — addresses the 15 GB
incremental cache without disabling it, so local fast-rebuild wins
are preserved.
What the issue listed but I did NOT do
--------------------------------------
`SQLX_OFFLINE=true` + `.sqlx/` (the issue's lever #2) does not
apply here: this codebase has zero `sqlx::query!()` / `query_as!()`
macro invocations — every callsite uses the runtime string forms
(`sqlx::query(...)`). The 141 stale `libsqlx_postgres` copies were
just normal incremental residue from sqlx being on the dep graph
of every test binary, which the consolidation + sweep address
directly.
Verification
------------
`just test` → 162/162 pass, 2 skipped (stress, by design).
`list_keys_*` tests now run sequentially under the `public-keys`
group (~0.03–0.1 s each in a single thread) instead of racing.