Adds a reconcile command: a read-only report that an archive holds what a migration should have brought across, folder by folder.
inbuxa-migrate reconcile <ARCHIVE>
It prints, in order:
Folders — one row per mailbox, by full path, with its message count and a content checksum (blake3 over the sorted content hashes of the messages in it). A message filed in more than one folder is counted in each.
Totals — messages, folders, stored content size and blob count, and a single checksum over the whole archive's mail.
Integrity — ok, or a line for each problem: messages pointing at content not in the archive, empty blobs, messages in no folder, and messages filed in a folder that is not there.
Two uses
Compare the per-folder counts against the old mailbox to prove the move was complete.
Compare two archives' checksums to prove they hold the very same mail — an export and a re-import, or a backup and its source. The checksum is order-independent, so identical content always matches.
Notes
Read-only, like inspect: no network, never writes, refuses to create an archive from a bare path, says "in use" if another run holds it.
Exit codes: 0 clean, 8 an integrity problem (past the 1–7 the other commands use, so a script can tell a reconciliation failure from any other error), 7 the archive can't be opened.
New module src/reconcile.rs mirrors inspect's shape and reuses init::open_read_only, inspect::{format_count, format_bytes}. stdlib + existing deps only (blake3, rusqlite).
7 unit tests over in-memory archives (per-folder counts, nested paths, a message in two folders, identical-content checksum equality, each integrity failure, empty archive) + a CLI parse test. cargo fmt --check, clippy -D warnings, cargo test --locked all green. Smoke-tested end to end: imported a small Maildir, reconciled it clean (exit 0), then corrupted a blob pointer and confirmed exit 8 with the right message.
Documented in README (command list + prose), docs/usage.md (new Reconcile section), and CHANGELOG [Unreleased].
Adds a `reconcile` command: a read-only report that an archive holds what a migration should have brought across, folder by folder.
```
inbuxa-migrate reconcile <ARCHIVE>
```
It prints, in order:
- **Folders** — one row per mailbox, by full path, with its message count and a content checksum (blake3 over the sorted content hashes of the messages in it). A message filed in more than one folder is counted in each.
- **Totals** — messages, folders, stored content size and blob count, and a single checksum over the whole archive's mail.
- **Integrity** — `ok`, or a line for each problem: messages pointing at content not in the archive, empty blobs, messages in no folder, and messages filed in a folder that is not there.
### Two uses
- Compare the per-folder counts against the old mailbox to prove the move was complete.
- Compare two archives' checksums to prove they hold the very same mail — an export and a re-import, or a backup and its source. The checksum is order-independent, so identical content always matches.
### Notes
- Read-only, like `inspect`: no network, never writes, refuses to create an archive from a bare path, says "in use" if another run holds it.
- Exit codes: `0` clean, `8` an integrity problem (past the `1`–`7` the other commands use, so a script can tell a reconciliation failure from any other error), `7` the archive can't be opened.
- New module `src/reconcile.rs` mirrors `inspect`'s shape and reuses `init::open_read_only`, `inspect::{format_count, format_bytes}`. stdlib + existing deps only (`blake3`, `rusqlite`).
- 7 unit tests over in-memory archives (per-folder counts, nested paths, a message in two folders, identical-content checksum equality, each integrity failure, empty archive) + a CLI parse test. `cargo fmt --check`, `clippy -D warnings`, `cargo test --locked` all green. Smoke-tested end to end: imported a small Maildir, reconciled it clean (exit 0), then corrupted a blob pointer and confirmed exit 8 with the right message.
Documented in README (command list + prose), `docs/usage.md` (new Reconcile section), and CHANGELOG `[Unreleased]`.
reconcile <archive> reads a local archive and reports it folder by
folder -- a message count and a content checksum for each folder, totals
and a checksum for the whole, and an integrity check that every message
resolves to stored content and a real folder. It is read-only and
reaches no network, like inspect.
Two uses: compare the per-folder counts against the source mailbox to
prove the move brought everything across, and compare two archives'
checksums to prove they hold the very same mail (an export and a
re-import, or a backup and its source). It exits 8 when the archive is
not sound, past the 1-7 the other commands use, so a script can tell a
reconciliation failure from any other error.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds a
reconcilecommand: a read-only report that an archive holds what a migration should have brought across, folder by folder.It prints, in order:
ok, or a line for each problem: messages pointing at content not in the archive, empty blobs, messages in no folder, and messages filed in a folder that is not there.Two uses
Notes
inspect: no network, never writes, refuses to create an archive from a bare path, says "in use" if another run holds it.0clean,8an integrity problem (past the1–7the other commands use, so a script can tell a reconciliation failure from any other error),7the archive can't be opened.src/reconcile.rsmirrorsinspect's shape and reusesinit::open_read_only,inspect::{format_count, format_bytes}. stdlib + existing deps only (blake3,rusqlite).cargo fmt --check,clippy -D warnings,cargo test --lockedall green. Smoke-tested end to end: imported a small Maildir, reconciled it clean (exit 0), then corrupted a blob pointer and confirmed exit 8 with the right message.Documented in README (command list + prose),
docs/usage.md(new Reconcile section), and CHANGELOG[Unreleased].fa2a09d7adto7862aa9bc2