fix(mail): resolve security draft CC before backend calls - #1200
Merged
potiuk merged 1 commit intoSep 12, 2026
Conversation
andreahlert
marked this pull request as ready for review
September 12, 2026 02:22
andreahlert
requested review from
justinmclean and
potiuk
and removed request for
justinmclean
September 12, 2026 02:22
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
When
security_listis missing or blank, security reply drafts can lose their security CC. This change resolves the recipient in the shared mail-source contract before creating a draft, and applies the same rule to import, sync, invalidate, and CVE allocation.The resolver uses the project list when configured. Otherwise, it warns and records
cc_fallback, usingsecurity_inbox.foundation_security_addressthrough project, organization, and framework precedence. If neither address is available, draft creation stops. Mailbox searches retain the existing<security-list>meaning.OAuth and MCP draft recipes now reject missing or blank resolved CC values before invoking a backend. Documentation, the lifecycle spec, 13 configuration eval cases, and 11 recipe regression tests are included. Local agent artifacts are also excluded in
.gitignore.Type of change
Test plan
prek run --all-files, including workspace lint, typing, tests, and documentation checksA broader model-eval run during development returned 118/147 passing, with 29 failures outside the new CC step. Those failing cases had identical assembled prompts and fixtures on clean main; one failure was reproduced there, while other sampled failures varied between runs. This is not a claim that the complete model-eval suites are green. The final focused CC eval run passed all 13 cases.
RFC-AI-0004 compliance
Linked issues
Closes #181.
Notes for reviewers
An explicitly null or blank project-level foundation address disables that fallback rather than inheriting the organization value. This is a deliberate configuration choice for review, not a previously agreed requirement from the issue.
The shared resolver governs draft CC only; it does not redirect mailbox reads to a foundation inbox.
AI assistance disclosure
This change was developed with AI assistance from OpenAI Codex.