Commit graph parsimony/internal/mbox
Author SHA1 Message Date
tgiachi
9968c3b70f fix(mbox): stop buffering a line beyond the size limit
- readLine now holds at most max(limit+1, 1024) bytes of a line and reports its full
  length; the rest is read and thrown away, so a single 25 MiB line is no longer read whole.
- The message size is counted from the reported line lengths (after restoring >From),
  so the limit is unchanged for normal input.
- Tests: a line over the limit mid-file, at the end of the input and before the first
  separator, long lines under the limit, a tiny limit, exact boundary, readLine itself.
2026-11-10 11:53:32 +01:00
tgiachi
a170204ecb test: close gaps found by mutation checks on the archive import
- Cover the CRLF separator line, cycle roots entered from outside, linear rethreading of long chains
- Cover a read error mid-import, the "and N more" lines, and the mbox content type
- Cover clearing the previous result and the capped error list in the UI
2026-11-09 19:50:40 +01:00
tgiachi
ba6c37bc21 feat(mbox,store): mbox reader, batch archiving and thread rebuilding
- Add internal/mbox: streaming reader with strict From_ detection, mboxrd unescaping, size cap and envelope dates
- Add Store.ArchiveBatch: many messages in one transaction
- Add Store.Rethread: rebuild threads from In-Reply-To whatever the insertion order, tolerating cycles
2026-11-09 17:13:56 +01:00