Skip to content
Novus Examples
mbox4.2 KB

Git Format-Patch Series - All Four Messages as One Mbox

The same four messages concatenated into a single mbox, which is exactly what `git format-patch --stdout` produces and what `git am` consumes. The From_ separator lines use git's fixed sentinel date, so a splitter cannot rely on the timestamp being real.

Preview — first 50 linesmbox
From 024f75262757878b20f7a3e64c1472d87a75d6b8 Mon Sep 17 00:00:00 2001
From: Ada Fernsby <ada.fernsby@example.invalid>
Date: Mon, 2 Mar 2026 08:59:00 +0000
Subject: [PATCH 0/3] ledger: zero-delta postings and rounding drift

Three small changes from the reconciliation review. Patch 1 is the
behaviour fix; patches 2 and 3 are follow-ups that can be dropped.

Ada Fernsby (2):
  feat(ledger): treat a zero delta as a no-op
  feat(ledger): add banker's rounding helper

Priya Raman (1):
  docs: rename README to guide

 docs/{README.md => guide.md}    |  0
 internal/ledger/apply.go        |  9 +++++++--
 internal/ledger/rounding.go     | 16 ++++++++++++++++
 3 files changed, 23 insertions(+), 2 deletions(-)
---
-- 
2.43.0

From cdbd7c648caa53322292d5709d478c2c3caaa38e Mon Sep 17 00:00:00 2001
From: Ada Fernsby <ada.fernsby@example.invalid>
Date: Mon, 2 Mar 2026 09:14:03 +0000
Subject: [PATCH 1/3] feat(ledger): treat a zero delta as a no-op
In-Reply-To: <024f75262757878b20f7a3e64c1472d87a75d6b8.1772442000.git.ada.fernsby@example.invalid>
References: <024f75262757878b20f7a3e64c1472d87a75d6b8.1772442000.git.ada.fernsby@example.invalid>

Apply returned a wrapped error for zero-value postings, which the
reconciliation job counted as a failure.

Signed-off-by: Ada Fernsby <ada.fernsby@example.invalid>
---
 internal/ledger/apply.go | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/internal/ledger/apply.go b/internal/ledger/apply.go
index 95f499d..ce501c6 100644
--- a/internal/ledger/apply.go
+++ b/internal/ledger/apply.go
@@ -1,14 +1,21 @@
 package ledger
 
-import "errors"
+import (
+	"errors"
+	"fmt"
+)
133 lines total — download for the full file.

Specifications

Seed
20260807
Messages
4
Separator
From <sha> Mon Sep 17 00:00:00 2001
Includes Cover Letter
true
Line Endings
LF
Encoding
UTF-8

Testing contract

Expected to pass
Scenario
Split an mbox into individual messages on the From_ separator and apply the series.
Expected result
Four messages are recovered in order — cover letter, 1/3, 2/3, 3/3 — and none of the 'From ' lines inside quoted bodies is mistaken for a separator.

What is a .mbox file?

An MBOX file is a mailbox that stores many email messages concatenated into one plain-text file, each message preceded by a 'From ' separator line. It is the classic Unix mailbox format used by many mail clients for export and archival.

How to use this file

Use an example MBOX to test mailbox splitting, message boundary detection, thread reconstruction, and import into a mail client or parser.

How to use this file for testing

“Git Format-Patch Series - All Four Messages as One Mbox” is a deterministic Novus Examples fixture for Email parsing, Visual diff / regression, Code parsing. Standards-compliant RFC 822 messages — plain, multipart text+HTML, and with an attachment — plus an MBOX mailbox, for testing header parsing, MIME decoding, attachment extraction, and mailbox splitting.

Documented properties for this file: seed 20260807 · 4 messages · UTF-8 · LF. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

Diff and patch fixtures name their target paths and the exact edge case they exercise — rename, mode change, binary hunk, CRLF↔LF, or missing trailing newline. Apply or render them against the documented before-state; every author, path, and hash is fictional.

Code examples

import mailbox

for msg in mailbox.mbox("series.mbox"):
    print(msg["subject"])

Generated by generation/version_control.py. Free for any use, no attribution required — license.