Repository navigation
feat(mail): draft to Gmail or a local Maildir, set per project; setup proposes mail backends - #1636
Merged
Merged
Conversation
potiuk
force-pushed
the
setup/mail-backends-guidance
branch
from
October 15, 2026 22:50
1375ed8 to
ce11568
Compare
This was referenced Oct 15, 2026
potiuk
added a commit
that referenced
this pull request
Oct 16, 2026
ruff 0.16.9 has segfaulted on CI runners while checking members whose code the PR did not touch (vetted-ops on #1636, maildir on #1642), failing prek for reasons unrelated to the change. run-workspace-check.sh now treats an exit status above 128, a process killed by a signal, as a crash rather than a finding, and runs that member once more. A real finding (exit 1) is never retried, and a second crash still fails the check. Generated-by: Claude Code (Opus 5.5)
potiuk
force-pushed
the
setup/mail-backends-guidance
branch
4 times, most recently
from
October 16, 2026 03:03
df69e6f to
b2ffcda
Compare
potiuk
added a commit
to Kaap10/magpie
that referenced
this pull request
Oct 16, 2026
ruff 0.16.9 has segfaulted on CI runners while checking members whose code the PR did not touch (vetted-ops on apache#1636, maildir on apache#1642), failing prek for reasons unrelated to the change. run-workspace-check.sh now treats an exit status above 128, a process killed by a signal, as a crash rather than a finding, and runs that member once more. A real finding (exit 1) is never retried, and a second crash still fails the check. Generated-by: Claude Code (Opus 5.5)
potiuk
force-pushed
the
setup/mail-backends-guidance
branch
2 times, most recently
from
October 16, 2026 03:38
3698619 to
22eb59d
Compare
`setup config` now proposes the mail backends a mail-reading or mail-drafting skill needs. For an ASF project it selects PonyMail and apache-projects by default. For drafting it offers gmail-plaintext (default) or the local Maildir backend for Thunderbird and other mail clients, and never the claude.ai Gmail connector. Each mail-backend install step now ends with a numbered "what to do next" list: run the commands, restart the agent so the MCP tools load, authenticate, verify. A new install Step 9e covers Maildir, including Thunderbird's Repair Folder for a draft that does not show up; the same note is in tools/maildir/README.md. New eval suite: setup/step-config-mail (5 cases). Generated-by: Claude Code (Opus 5.5)
…on override The drafting backend is now Gmail or Maildir. The project sets it with mail_create.backend in project.md; a person overrides it for themselves with tools.mail_create in user.md. Every security skill that drafts mail (issue-import, issue-invalidate, issue-sync, cve-allocate, the GHSA relay) resolves it through draft-backends.md and, on Maildir, threads by In-Reply-To / References on the inbound Message-ID. tools/maildir gains maildir-draft-find, a read-only lookup the skills use for the existing-draft check before filing a reply. setup config records the drafting choice per project, or in the person's user.md when the project's project.md is committed. It now also checks for apache-projects when handing over the comdev install, and says the claude.ai Gmail connector stays connected for reading. New eval suite security-issue-sync/step-draft-backend (5 cases); setup/step-config-mail grows to 7 cases. Generated-by: Claude Code (Opus 5.5)
A drafts_path such as ~/Mail/<project>/Drafts reaches the tool unexpanded when it is substituted into a command, so maildir-draft-find found nothing and maildir-draft-create wrote under ./~ instead. Both now expand it. maildir-draft-find also takes several Message-IDs per --message-id, with or without angle brackets. Generated-by: Claude Code (Opus 5.5)
maildir-draft-find normalised a subject such as "Re:" to an empty string, which matched every draft in the Maildir. Generated-by: Claude Code (Opus 5.5)
potiuk
force-pushed
the
setup/mail-backends-guidance
branch
from
October 16, 2026 03:51
22eb59d to
5c2fed8
Compare
11 of 13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
issue-import,issue-invalidate,issue-syncincluding the GHSA relay,cve-allocate) can now file their drafts into a local Maildir that Thunderbird or another mail client shows, as well as into Gmail. On Maildir they thread byIn-Reply-To/Referenceson the inboundMessage-ID(PonyMail supplies it, or the root the tracker records). Before filing, they check for a draft already waiting with the new read-onlymaildir-draft-find. Before this, the Maildir tool existed but no skill could use it.mail_create.backendinproject.md; a person setstools.mail_createin their ownuser.md. The rule isuser.md, thenproject.md, thengmail, defined once intools/gmail/draft-backends.md, which every draft site already links.setup configproposes mail backends. Before this,confignever mentioned them. For an ASF project, PonyMail andapache-projectsare selected by default. The drafting choice is written to the project's configuration, or as a personal override inuser.mdonce the user has seen the lines. Every install step (install.md9c, 9d, 9e) now ends with a numbered what to do next list: run the commands, restart the agent, authenticate, verify. It says the claude.ai Gmail connector stays connected for reading only. Thunderbird's Repair Folder is documented for a draft that doesn't show up.Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/<system>/*.md)tools/*/withpyproject.toml)projects/_template/)Test plan
prek run --all-filespassestools/maildirruff, mypy and pytest pass (17 tests, 8 new formaildir-draft-find, including~expansion and bareMessage-IDs)setup/step-config-mail7/7 andsecurity-issue-sync/step-draft-backend5/5; re-run against the edited sections:setup/step-config-adversarial5/5,setup/step-config-stamp6/6,security-issue-import/step-0-preflight3/3,security-issue-import/step-7-apply3/3,security-issue-invalidate/step-5d-email-draft2/2,security-issue-sync/step-ghsa-access-tier5/5,security-cve-allocate/step-4-propose-updates3/3. Self-eval only (Claude Code, Opus 5.5).apache-projectsgap in the hand-over, the missing Gmail read path, Maildir offered but not wired up (the reason for the security-skill changes),~expansion,Message-IDparsing, and an empty-subject match. The last gemini pass on the branch is a Pass.RFC-AI-0004 compliance
configwrites a personaluser.mdoverride only after showing the lines; every MCP registration is printed for the user to run, never run by the agentLinked issues
None.
Notes for reviewers (optional)
tools/spec-loop/specs/adoption-and-setup.md(criterion 32) andadapters.md(criterion 6) describe the new behaviour..last-syncis left where it was: it is 55 commits behindmainfor reasons unrelated to this PR, and bumping it here would claim those commits are synced.draft-backends.mddefines its own recap line.Generative AI disclosure: drafted with Claude Code (Opus 5.5) and reviewed by the author.
🤖 Generated with Claude Code