mail_status(quick=true) returns sync health without the table counts #110
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp#110
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 1). Decided at triage 2026-11-02: a
quickflag, not a counts table.Agent Brief
Category: enhancement
Summary: mail_status(quick=true) returns sync health without the table counts
Current behavior:
Every mail_status call counts messages per account, attachment text rows, the attachment backlog through a NOT EXISTS per message, and attachment chunk vectors. Each count reads a whole table, so the call slows as the mirror grows. The health endpoint is unaffected because it reads only the last sync time (#90).
Desired behavior:
mail_status takes
quick(default false). Withquick=truethe result holds every per-account sync field (last sync, lag, source kind, errors) and the mirror-level status lines, and omits every count. The omitted counts are shown as-or the lines are dropped, with one line stating that counts were skipped, so a caller never reads a missing count as zero. The default call is unchanged. The tool description says which fields quick omits and why.Key interfaces:
Store.status: the count queries become skippable without duplicating the sync-health part.mail_statussignature and docstring.Acceptance criteria:
quick=trueruns no COUNT query (assert through the SQLite trace callback or a query log in the test).quick=trueoutput holds the same sync lag and last-sync values as the default call on the same store.quick=trueoutput states that counts were skipped and shows no numeric count.make checkpasses.Out of scope:
Filed under: operator word "accept" sha256:c125d0397b60
⏸ SVD architect gate: dev/mail-mind-mcp#110 mail-status-quick-true-returns-sync-health-without-the-table
Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
standard· dispatch effortmediumRun:
20261102T063839Z-b84e731bHeld because: CLEAN but 4 open risk(s) (2 verification · 2 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
uv run python3 -m pytest -q -m "not integration"on pristine7927f74before the first edit. Then runmake checkon the branch and confirm the failure set is unchanged, apart from the six new tests passing. [verification]Change: Store.status (store.py:2118) gets
counts: bool = True. When counts is false it skips the four whole-table aggregates: the accounts COUNT/SUM, attachment_text, the backlog NOT EXISTS, and attachment_embeddings. It omits their three dict keys. It lists accounts through a new module constant_STATUS_ACCOUNTS: a recursive MIN(account) loose index scan over the (account, …) indexes at store.py:112-114. The plan was verified in scratch SQLite 3.53.3 as SEARCH-only, and it returns the same account set as the default. The sync-health reads stay shared: mailboxes, last_ok_sync(), last_errors, change_seq, db and WAL size. mail_status (server.py:673-711) getsquick: Annotated[bool, Field(...)] = False, following the idiom at server.py:231. With quick it calls status(counts=False) and keeps the six mirror lines. It appends the literalcounts: skipped (quick=true); call mail_status without quick for them. Each account line becomesaccount=X last_ok_sync=Y. The default branch is unchanged character for character, and the docstring names the omitted fields and why. README.md:54 gets one sentence. The tests mirror the two-connection trace in tests/test_server.py:235-259.Files:
src/mail_mind_mcp/store.py·src/mail_mind_mcp/server.py·README.md·tests/test_server.py·tests/test_store.pyDecision: accept the 4 open risk(s) above and dispatch this spec (
svd:go), or park (svd:skip) / re-spec (svd:respec)?Your call (when this issue is held at the gate via
svd:hold):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-02-mail-status-quick-true-returns-sync-health-without-the-table.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-02-mail-status-quick-true-returns-sync-health-without-the-table.mdspec-verify-dispatch Half B for dev/mail-mind-mcp#110 mail-status-quick-true-returns-sync-health-without-the-table completed integration verify.
2f015641f32f01564are empty. Local suite: 819 passed, 8 skipped, 18 deselected.codex-svd ship --run-id 20261102T065919Z-d7c640e2 --confirm-merge)