Add import --estimate: preview counts, sizes and a rough time before committing #67

Merged
jcoffey-dev merged 1 commits from feat/import-estimate into main 2026-11-12 16:42:21 +00:00
1 Commits
Author SHA1 Message Date
jcoffey-dev 87b143b898 Add import --estimate: preview counts, sizes and a rough time
ci / test (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 5m12s
ci / announce (pull_request) Skipped
Before committing to a migration, an operator wants to know how big it
is. --estimate connects to the source, reports how much is new to fetch
since the archive was last filled -- counts, bytes and a rough time --
and writes nothing. It implies --dry-run.

It reuses each source dry run's delta enumeration (new vs already in
the archive) and adds a size pass that asks only for sizes, never bodies:
over IMAP a UID FETCH RFC822.SIZE, on a Maildir the file lengths. Those
two sources report sizes today; the others fall back to a plain dry run
with a note, which is per-source follow-up work.

TypeCounts gains a bytes field; sync::estimate renders the report, with
a wide, clearly-rough time range since a first run has no measured
throughput to go on.
2026-11-12 08:29:47 -07:00