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.
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"
+)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"])Related files
- patchGit Patch - Scissors Line Above the Real Commit MessageA patch sent as a reply: the mail subject starts with `Re:`, quoted text sits above a `-- >8 --` scissors line, and the real commit subject and body sit below it. `git am --scissors` discards everything above the cut; a parser that trusts the mail Subject header records 'Re: [PATCH] ...' as the commit title.

- patchGit Patch - Abbreviated index HashesThe `index` line abbreviates both blob ids to seven characters, which is what plain format-patch emits and what most patches in the wild carry. Three-way application can still fall back to path matching, but the blobs cannot be looked up unambiguously in a large repository.

- patchGit Patch - Bare --- Line Inside the Commit MessageThe commit message uses `---` as a horizontal rule, so the file contains two lines that look like the diffstat separator. git's own mailinfo ends the message at the FIRST one, which quietly truncates the message and drops the rounding table — the patch still applies, but the recorded history is wrong.

- patchGit Patch - Copy Detection at similarity index 85%`copy from`/`copy to` headers, produced only when copy detection is enabled with `-C`. The source file still exists afterwards, which is the whole difference from a rename — and the difference a parser that maps both header pairs onto one 'moved' concept silently erases.

- patchGit Patch - deleted file mode HeaderA deletion of an executable file, so the `deleted file mode 100755` header records the mode the file had rather than the mode to create. A patcher that writes an empty file here instead of unlinking leaves a broken executable behind.

- patchGit Patch - Empty Commit With No Diffformat-patch output for a commit created with `--allow-empty`: full mail headers, a commit message, the `---` separator, and then straight to the signature with no diffstat and no diff. Pipelines that treat 'no diff found' as a parse error reject a message that git itself considers valid.

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