Repository navigation
Mail scope: accept optional Account/Mailbox entries in mail_mailboxes - #86
Conversation
|
Addressed review findings:
Follow-up note (out of scope here): Verification: |
…sigma fold, compose guard & shared alias
|
Addressed round-2 review findings:
Verification: |
…losed unread alias check
|
Addressed round-3 review findings:
Verification: |
|
Review: 3 rounds by an independent reviewer of another model family; all in-scope findings fixed; two inherited issues (move source race, operator picker submits path only) left as follow-ups |
|
Addressed final review blocker:
Verification: |
|
Review: no blocking (independent reviewer of another model family, 5 rounds; head 81feb1e). Inherited issues left as follow-ups: move source race, operator picker submits path only. |
|
merge-check: merged. approved, target, ci, verified, contract, evidence, owner, weakening |
Closes #85.
Summary
mail_mailboxesentries of the formAccount/Mailbox(e.g.Work/INBOX,Work/[Gmail]/All Mail) to match only that account's mailbox rather than forming a cross-product across all allowedmail_accounts.*stays the only wildcard.MailScope.mailboxTargets,MailService.scopeRefusal,draftDestinationRefusal,scanScriptJXA,findMessageJXA(numeric + RFC Message-ID),listMailboxesScriptJXA,mailboxInAccountJXA, andmoveScriptJXA.ContextSchema.swiftandCLAUDE.md, and added unit + JXA stub tests inTests/macMCPTests/MailScopeAccountMailboxTests.swift.Slash Ambiguity Resolution
Mailbox paths themselves contain
/(e.g.[Gmail]/All Mail,Projects/Archive).MailScope.parseMailboxRulesresolves the ambiguity by splitting an entry at its first/only if the first segment equals (after the existing NFC + lowercase folding) one of the allowed account names inmail_accountsand the remainder after/is non-empty; otherwise the whole entry is treated as a plain mailbox path matching any allowed account. Both Swift and all generated JXA scripts consume the parsed rules from this single helper so they cannot drift.Calendar Scope Check
Checked
CalendarService.swiftandEventKitScope.swift(ScopedRows):calendarsentries are already alwaysAccount/Calendar(ScopePath.Row.path, matched whole againstrows[$0].path), so calendars do not have the bare-name cross-product issue and need no change.Verification
swift test --filter "MailScopeAccountMailboxTests|MailScopeTests|MailScopeEnforcementTests|ScopeDeclarationTests|ResourceScopeTests|ContextEnumerationTests"(122 tests, 0 failures)./scripts/ci-guards.sh main HEAD(passed)build.sh(confirmed it installs to~/.local/bin/macmcpand invokes Relay).