trim_quoted keeps forwarded mail (imap-blade-mcp fix plus pin bump) #113
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp#113
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #106 (item 8). Decided at triage 2026-11-02: fix in imap-blade-mcp, then bump the pin here.
Agent Brief
Category: bug
Summary: trim_quoted keeps forwarded mail: do not cut at a header block that follows a forward marker
Current behavior:
mail_read trims quoted replies with
trim_quotedfrom imap-blade-mcp, a pinned git dependency. Its header pattern cuts at any matchingFrom:style line after the first line. A forward that startsBegin forwarded message:followed by a header block keeps only its first line, so the forwarded content is lost.Desired behavior:
In imap-blade-mcp,
trim_quotedrecognises a forward marker (Begin forwarded message:,---------- Forwarded message ---------,-------- Original Message --------,-----Original Message-----, and the same with surrounding whitespace) and does not cut at the header block that follows it. The header block and the forwarded body are kept. Cutting at a reply marker such asOn … wrote:or at quote prefixes is unchanged. The omitted-character count stays exact. Then this repo bumps the pinned imap-blade-mcp revision, and a test here reads a forwarded message through mail_read and sees the forwarded body.Key interfaces:
trim_quoted(text) -> (kept, omitted_chars)in imap-blade-mcp: same signature.Acceptance criteria:
Hi\n\nBegin forwarded message:\n\nFrom: a@example.test\nSubject: x\n\nbodykeeps every line.Thanks\n\nOn Mon, X wrote:\n> quotedstill cuts at theOn … wrote:line.uv.lockmatches, and a mail_read test over a forwarded fixture shows the forwarded body.make checkpasses in both repos.Out of scope:
trim_quotedin this repo.Filed under: operator word "accept" sha256:c125d0397b60
Blocked by
Begin forwarded message:and---------- Forwarded message ---------are forward markers; OutlookOriginal Messagestays a reply cut. This issue keeps the pin bump to the release that carries #3 and themail_readforwarded-fixture test.