Skip to content

archive-mail Step 5 應強制走 export_emails_markdown 批次匯出 + coverage assert(split from che-apple-mail-mcp#232) #104

Description

@kiki830621

Problem(split from PsychQuant/che-apple-mail-mcp#232 concern #1

export_emails_markdown(che-apple-mail-mcp binary,server-side bulk export)已存在,但 plugins/che-apple-mail-mcp/commands/archive-mail.mdStep 5「生成 Markdown」仍以 per-email get_email 逐封 fetch + client-side transcription 為主路徑。AI 大批歸檔(實測一次 63 封)時照 Step 5 逐封抓,浪費 token。

原始脈絡 + 實戰驗證見 che-apple-mail-mcp#232。此 issue 只涵蓋 SOP(archive-mail.md) 部分(source of truth 在本 repo,非 MCP binary repo)。

Type

feature / docs(workflow enforcement)

Expected

  1. Step 5 大批量走批次路徑:待歸檔 ≥ N 封(對齊既有 confirmation gate 門檻)時 SHALL 用 export_emails_markdown;per-email get_email 降為 fallback。
  2. 拆批 SOP + coverage assert:mixed-direction corpus 因單一 mailbox 參數要拆收/寄兩批呼叫 → SOP 明列拆批慣例,且收尾用「manifest 總 written 數 vs 實際 .md 檔數」做 coverage assert(防跨呼叫覆蓋靜默丟檔——見 #232 的 collision 發現)。

相關

  • che-apple-mail-mcp#232 — 原始 issue(含 collision fix,binary 側)
  • 依 #232 的 collision fix 落地後,SOP 的拆批風險會降低,但 coverage assert 仍該加為防線。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions