Add evidence-scoped mailmind sync and deterministic enrichment #22

Merged
piers merged 1 commit from feat/svd-dev-peoplemind-mcp-6-mailmind-source-over-mcp-with-a-8f761078 into main 2026-11-01 11:24:09 +00:00
Collaborator

Add mailmind configuration, token loading, cursor-based MCP sync, reference-only interactions, and deterministic signature enrichment. Migrate interactions to schema v4 with replay deduplication, preserve existing record hashes, support remote interval workers, and document setup.

Validation: 232 passed, 3 Radicale skipped; pristine baseline 173 passed, 3 skipped. Ruff, formatting, mypy, and source/wheel builds pass.

Mailmind contract verified at d0ee0f1a6f3dc832e3ec74f8ebb2984fb091f2b9 against the approved Agent Adjustments. Paths below are in mailmind; server denotes src/imap_mailmind_mcp/server.py.

Row Verified contract Evidence Result
A1 Six fields; first/last embedded in spans tests/test_evidence.py:213-232; server:628-646 Pass
A2 Sent count and optional date span server:594-598,614-617; docs/adr/0008-evidence-scope.md:27 Pass
A3 Marker-wrapped aggregate signatures without message IDs; use call references server:634-639; docs/adr/0008-evidence-scope.md:28-36,43 Pass
A4 Seven-column add envelopes, four-column other changes, limit 100 server:59,454-497 Pass
A5 Numeric next_cursor and more=0/1; empty-page sentinel server:471-485 Pass
A6 Evidence tools require evidence; body/search require read server:209,374,454,563,601,650; docs/adr/0008-evidence-scope.md:17-22 Pass

Closes #6
Co-Authored-By: gpt-6.1-sol noreply@openai.com

Add mailmind configuration, token loading, cursor-based MCP sync, reference-only interactions, and deterministic signature enrichment. Migrate interactions to schema v4 with replay deduplication, preserve existing record hashes, support remote interval workers, and document setup. Validation: 232 passed, 3 Radicale skipped; pristine baseline 173 passed, 3 skipped. Ruff, formatting, mypy, and source/wheel builds pass. Mailmind contract verified at d0ee0f1a6f3dc832e3ec74f8ebb2984fb091f2b9 against the approved Agent Adjustments. Paths below are in mailmind; server denotes src/imap_mailmind_mcp/server.py. | Row | Verified contract | Evidence | Result | |---|---|---|---| | A1 | Six fields; first/last embedded in spans | tests/test_evidence.py:213-232; server:628-646 | Pass | | A2 | Sent count and optional date span | server:594-598,614-617; docs/adr/0008-evidence-scope.md:27 | Pass | | A3 | Marker-wrapped aggregate signatures without message IDs; use call references | server:634-639; docs/adr/0008-evidence-scope.md:28-36,43 | Pass | | A4 | Seven-column add envelopes, four-column other changes, limit 100 | server:59,454-497 | Pass | | A5 | Numeric next_cursor and more=0/1; empty-page sentinel | server:471-485 | Pass | | A6 | Evidence tools require evidence; body/search require read | server:209,374,454,563,601,650; docs/adr/0008-evidence-scope.md:17-22 | Pass | Closes #6 Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
Add mailmind configuration, token loading, cursor-based MCP sync, reference-only interactions, and deterministic signature enrichment. Migrate interactions to schema v4 with replay deduplication, preserve existing record hashes, support remote interval workers, and document setup.

Validation: 232 passed, 3 Radicale skipped; pristine baseline 173 passed, 3 skipped. Ruff, formatting, mypy, and source/wheel builds pass.

Mailmind contract verified at d0ee0f1a6f3dc832e3ec74f8ebb2984fb091f2b9 against the approved Agent Adjustments. Paths below are in mailmind; server denotes src/imap_mailmind_mcp/server.py.

| Row | Verified contract | Evidence | Result |
|---|---|---|---|
| A1 | Six fields; first/last embedded in spans | tests/test_evidence.py:213-232; server:628-646 | Pass |
| A2 | Sent count and optional date span | server:594-598,614-617; docs/adr/0008-evidence-scope.md:27 | Pass |
| A3 | Marker-wrapped aggregate signatures without message IDs; use call references | server:634-639; docs/adr/0008-evidence-scope.md:28-36,43 | Pass |
| A4 | Seven-column add envelopes, four-column other changes, limit 100 | server:59,454-497 | Pass |
| A5 | Numeric next_cursor and more=0/1; empty-page sentinel | server:471-485 | Pass |
| A6 | Evidence tools require evidence; body/search require read | server:209,374,454,563,601,650; docs/adr/0008-evidence-scope.md:17-22 | Pass |

Closes #6
Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
Owner

Architect verification (scratch worktree at 63d8961, outside the repo dir):

  • pytest: 232 passed, 3 skipped (Radicale); baseline before #6 was 173 passed, 3 skipped
  • mypy --strict: clean, 29 source files
  • ruff check and ruff format --check: clean
  • uv lock --check: resolved, no drift
  • no nested .git; write set is exactly the 13 Primary Files
  • codex-svd integrate: readyForMerge true, testResult green, CI absent (repo has no CI)

Gate rulings confirmed in the diff: A1 and A3 parsed as the shipped mailmind shapes (spans in received/sent, marker-wrapped aggregate signature block, no per-block ids); TOOLS is a closed two-tool frozenset asserted on every call; allow_http is an explicit opt-in with the localhost exception; open_positions untouched; initial cursor 0; skipped_unknown appended last; display_name = address for mail-only Persons with a narrow takeover when a later asserted name arrives; errors surface as codes only, with third-party loggers pinned to WARNING.

Two additions beyond the spec text, both accepted: migration 4 also creates the partial unique index interactions_once so cursor replay cannot duplicate interactions, and the README example sets allow_http = true for the pod network with the clear-text caveat stated. Mailmind contract verified at d0ee0f1, which contains 96efa14 (#78).

Ready for the operator to merge.

Architect verification (scratch worktree at 63d8961, outside the repo dir): - pytest: 232 passed, 3 skipped (Radicale); baseline before #6 was 173 passed, 3 skipped - mypy --strict: clean, 29 source files - ruff check and ruff format --check: clean - uv lock --check: resolved, no drift - no nested .git; write set is exactly the 13 Primary Files - `codex-svd integrate`: readyForMerge true, testResult green, CI absent (repo has no CI) Gate rulings confirmed in the diff: A1 and A3 parsed as the shipped mailmind shapes (spans in `received`/`sent`, marker-wrapped aggregate signature block, no per-block ids); `TOOLS` is a closed two-tool frozenset asserted on every call; `allow_http` is an explicit opt-in with the localhost exception; `open_positions` untouched; initial cursor 0; `skipped_unknown` appended last; display_name = address for mail-only Persons with a narrow takeover when a later asserted name arrives; errors surface as codes only, with third-party loggers pinned to WARNING. Two additions beyond the spec text, both accepted: migration 4 also creates the partial unique index `interactions_once` so cursor replay cannot duplicate interactions, and the README example sets `allow_http = true` for the pod network with the clear-text caveat stated. Mailmind contract verified at d0ee0f1, which contains 96efa14 (#78). Ready for the operator to merge.
piers merged commit 8c016157e6 into main 2026-11-01 11:24:09 +00:00
Sign in to join this conversation.
No description provided.