Write v2 docs, log privacy test and release 0.14.0 #197

Closed
opened 2026-11-12 05:52:20 +00:00 by svc-agent-writer · 5 comments

Part of epic #187. Documents write v2 and releases 0.14.0.

Read docs/adr/0013-trash-forward-and-draft-edits.md first. Describe what the code does at the head of main; do not copy the ADR.

What to build

  1. SECURITY.md: what a leaked write token can do after this change, from the Consequences of ADR 0013.
  2. README: the tools mail_trash and mail_draft_edit, the forward_id argument, the trash_per_day cap and its count in messages, and an upgrade note for schema v18. Add the line "the first start on schema v18 rebuilds the actions table once" to both "first start on schema" lists. Add a rollback note: a 0.13.0 image runs on a v18 file, and its worker refuses the new kinds.
  3. config.example.toml: trash_per_day in [writes].
  4. CLAUDE.md and the glossary: the new tools and kinds.
    4a. ADR 0006 §10: add one bullet that points to ADR 0013 for JMAP draft edits: import the new draft, then destroy the old Email under the $draft and blob id guard; the undo uses the same order. This is the only ADR edit in this issue. Put it in its own PR, because the runner refuses to merge a PR that touches docs/adr/.
  5. Server instructions and module docstrings: name the new tools; each new docstring names its untrusted fields in one sentence.
  6. A test for write-path log privacy: a write tool call and its worker apply log no subject, address, body or filename. Issue #189 found that this has no test.
  7. Before the release, the owner checks the real 0.13.0 image against a copy of a v18 mirror: mailmind api starts, mail_actions lists every row, and mail_flag still queues. State the result in the PR. The schema tests only simulate the older reader.
  8. Release 0.14.0 by the steps of the last release commit.

Acceptance criteria

  • Each document in the list names the new tools and the cap.
  • The README upgrade note states that the writer upgrades the store to v18 and that an older reader still opens it.
  • The log privacy test passes at an existing seam.
  • The version is 0.14.0 in every place the last release changed.
  • make check passes.

Out of scope

Any behaviour change. Any starbase deployment change: a host that carries a write token with mail_trash needs its own ADR 0023 amendment in starbase. CI files.

Blocked by

Part of epic #187. Documents write v2 and releases 0.14.0. Read `docs/adr/0013-trash-forward-and-draft-edits.md` first. Describe what the code does at the head of `main`; do not copy the ADR. ## What to build 1. `SECURITY.md`: what a leaked write token can do after this change, from the Consequences of ADR 0013. 2. README: the tools `mail_trash` and `mail_draft_edit`, the `forward_id` argument, the `trash_per_day` cap and its count in messages, and an upgrade note for schema v18. Add the line "the first start on schema v18 rebuilds the `actions` table once" to both "first start on schema" lists. Add a rollback note: a 0.13.0 image runs on a v18 file, and its worker refuses the new kinds. 3. `config.example.toml`: `trash_per_day` in `[writes]`. 4. `CLAUDE.md` and the glossary: the new tools and kinds. 4a. ADR 0006 §10: add one bullet that points to ADR 0013 for JMAP draft edits: import the new draft, then destroy the old Email under the `$draft` and blob id guard; the undo uses the same order. This is the only ADR edit in this issue. Put it in its own PR, because the runner refuses to merge a PR that touches `docs/adr/`. 5. Server instructions and module docstrings: name the new tools; each new docstring names its untrusted fields in one sentence. 6. A test for write-path log privacy: a write tool call and its worker apply log no subject, address, body or filename. Issue #189 found that this has no test. 7. Before the release, the owner checks the real 0.13.0 image against a copy of a v18 mirror: `mailmind api` starts, `mail_actions` lists every row, and `mail_flag` still queues. State the result in the PR. The schema tests only simulate the older reader. 8. Release 0.14.0 by the steps of the last release commit. ## Acceptance criteria - [ ] Each document in the list names the new tools and the cap. - [ ] The README upgrade note states that the writer upgrades the store to v18 and that an older reader still opens it. - [ ] The log privacy test passes at an existing seam. - [ ] The version is 0.14.0 in every place the last release changed. - [ ] `make check` passes. ## Out of scope Any behaviour change. Any starbase deployment change: a host that carries a write token with `mail_trash` needs its own ADR 0023 amendment in starbase. CI files. ## Blocked by - #192 - #193 - #194 - #195 - #196
Collaborator

⏸ SVD architect gate: dev/mail-mind-mcp#197 write-v2-docs-log-privacy-test-and-release-0-14-0

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 effort medium

Run: 20261112T225223Z-3ebcb716

Held because: CLEAN but 6 open risk(s) (1 sequencing · 2 verification · 3 decision) — HOLD-ALL parks everything. The risks, verbatim:

Open risks:

  1. Item 4a (the ADR 0006 §10 draft-edit pointer) is excluded from this PR, because the issue says the runner refuses to merge a PR that touches docs/adr/. Question: should 4a be filed as its own issue, with this PR using 'Closes #197'? Or should #197 stay open for 4a, with this PR using 'Refs #197'? [decision]
  2. The dispatch-stage doctrine says 'Do NOT bump version', but this work item is the 0.14.0 release, and the 0.13.0 bump (#186, 99b976c) landed as an agent PR. Question: does the architect approve the version bump inside this dispatch PR (the lean assumes yes; the tag push stays operator-only), or should it split into a separate operator commit after the docs/test PR merges? [decision]
  3. Item 7, owner-only, before tagging: run the real git.groupthink.asia/dev/mail-mind-mcp:0.13.0 image against a copy of a v18 mirror and confirm three things: mailmind api starts, mail_actions lists every row (trash/edit kinds included), and mail_flag still queues. Record the result in the PR body's 'Pre-release owner check' section, which the agent leaves unfilled. [verification]
  4. The issue is blocked by #192-#196. Their code is on main: c01ef13 v18, 1481d94 IMAP trash, 05ef02c forward, ce95248 JMAP trash, 3eda710 IMAP edit, 9081bea JMAP edit. Their tracker state was not in the issue-context snapshot, so the drain must confirm they are closed before dispatch. [sequencing — blocked by #192, #193, #194, #195, #196]
  5. make check was not run in Half-A (the target repo is read-only, and pip-audit needs network). The dispatcher must record the pristine-base make check result before the first edit and show that the only change in the test set is the two new passing tests. [verification]
  6. If either new log-privacy test fails because a production log record carries mail content, the spec says to stop and report rather than fix (behaviour change is out of scope). Question: should such a defect instead be fixed in this PR, which would widen scope into server.py/source.py code? [decision]

Change: Docs describe code at 9081bea. SECURITY.md: rewrite the 'Reversible writes only', 'Write limits' (five→seven tools; trash_per_day counts messages; edits share drafts_per_day), 'Audit' and 'Untrusted content' rows (lines 13-18), and add a 'Leaked write token' row from the ADR 0013 Consequences. README: write tools table (181-191), with forward_id on mail_draft and new mail_draft_edit and mail_trash rows; caps paragraph; the [writes] row at :225; a 0.14.0 upgrade note after :54 in the shape of the :46/:50 notes (v17→v18, the writer rebuilds the actions table once per store.py:3779-3804, an older reader opens it, a 0.13.0 worker refuses the new kinds as invalid_argument); the exact v18 line appended to both 'first start on schema' lists (:123, :308); 'never send or permanently delete' at :318. config.example.toml: comments only, naming mail_draft_edit and mail_trash (trash_per_day already at :57). CLAUDE.md lines 7/18/25/26 plus one Conventions bullet. GLOSSARY: Action, Trash action and Draft edit entries in the Blade/Mind shape. server.py: instructions :143-148 name mail_draft_edit; the module docstring :1-9 names the new tools. outbox.py docstring: forward composition plus one untrusted-fields sentence. No function body changes. Log privacy: test_write_calls_log_no_mail_content in tests/test_write_tools.py, using serve()/worker() :79-120 at INFO and scanning str(r.dict) for sentinels as at tests/test_attachments.py:424-425; test_worker_apply_logs_no_mail_content in tests/test_actions.py, using runner()/run_action()/seed_live_draft (:355, :445, :630) at DEBUG for forward draft, edit and trash. A leak is reported in deviations, not fixed. Release: mirror 99b976c, with 0.14.0 in pyproject:3, init:3, uv.lock:1299 (uv lock, one-line diff only), deployment.yaml:57/94/118 and kustomization:12. The PR body carries an unfilled item-7 owner checklist. No tag, no docs/adr/ edits.

Files: SECURITY.md · README.md · config.example.toml · CLAUDE.md · GLOSSARY.md · src/mail_mind_mcp/server.py · src/mail_mind_mcp/outbox.py · tests/test_write_tools.py · tests/test_actions.py · pyproject.toml · src/mail_mind_mcp/__init__.py · uv.lock · deploy/k8s/base/deployment.yaml · deploy/k8s/overlays/example/kustomization.yaml
Derived artifacts: pyproject.toml

Decision: accept the 6 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):

  • add label svd:go — approve; Half-B dispatch accepts exactly this spec (open risks accepted)
  • add label svd:fire beside svd:go — approve AND authorise the Half-B fire from the phone; never on its own
  • add label svd:skip — park it; dispatch refuses it and the issue stays for a human
  • add label svd:respec — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-12-write-v2-docs-log-privacy-test-and-release-0-14-0.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-12-write-v2-docs-log-privacy-test-and-release-0-14-0.md

### ⏸ SVD architect gate: dev/mail-mind-mcp#197 write-v2-docs-log-privacy-test-and-release-0-14-0 **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 effort `medium` **Run:** `20261112T225223Z-3ebcb716` **Held because:** CLEAN but 6 open risk(s) (1 sequencing · 2 verification · 3 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. Item 4a (the ADR 0006 §10 draft-edit pointer) is excluded from this PR, because the issue says the runner refuses to merge a PR that touches docs/adr/. Question: should 4a be filed as its own issue, with this PR using 'Closes #197'? Or should #197 stay open for 4a, with this PR using 'Refs #197'? [decision] 2. The dispatch-stage doctrine says 'Do NOT bump version', but this work item is the 0.14.0 release, and the 0.13.0 bump (#186, 99b976c) landed as an agent PR. Question: does the architect approve the version bump inside this dispatch PR (the lean assumes yes; the tag push stays operator-only), or should it split into a separate operator commit after the docs/test PR merges? [decision] 3. Item 7, owner-only, before tagging: run the real git.groupthink.asia/dev/mail-mind-mcp:0.13.0 image against a copy of a v18 mirror and confirm three things: `mailmind api` starts, `mail_actions` lists every row (trash/edit kinds included), and `mail_flag` still queues. Record the result in the PR body's 'Pre-release owner check' section, which the agent leaves unfilled. [verification] 4. The issue is blocked by #192-#196. Their code is on main: c01ef13 v18, 1481d94 IMAP trash, 05ef02c forward, ce95248 JMAP trash, 3eda710 IMAP edit, 9081bea JMAP edit. Their tracker state was not in the issue-context snapshot, so the drain must confirm they are closed before dispatch. [sequencing — blocked by #192, #193, #194, #195, #196] 5. `make check` was not run in Half-A (the target repo is read-only, and pip-audit needs network). The dispatcher must record the pristine-base `make check` result before the first edit and show that the only change in the test set is the two new passing tests. [verification] 6. If either new log-privacy test fails because a production log record carries mail content, the spec says to stop and report rather than fix (behaviour change is out of scope). Question: should such a defect instead be fixed in this PR, which would widen scope into server.py/source.py code? [decision] **Change:** Docs describe code at 9081bea. SECURITY.md: rewrite the 'Reversible writes only', 'Write limits' (five→seven tools; trash_per_day counts messages; edits share drafts_per_day), 'Audit' and 'Untrusted content' rows (lines 13-18), and add a 'Leaked write token' row from the ADR 0013 Consequences. README: write tools table (181-191), with forward_id on mail_draft and new mail_draft_edit and mail_trash rows; caps paragraph; the [writes] row at :225; a 0.14.0 upgrade note after :54 in the shape of the :46/:50 notes (v17→v18, the writer rebuilds the actions table once per store.py:3779-3804, an older reader opens it, a 0.13.0 worker refuses the new kinds as invalid_argument); the exact v18 line appended to both 'first start on schema' lists (:123, :308); 'never send or permanently delete' at :318. config.example.toml: comments only, naming mail_draft_edit and mail_trash (trash_per_day already at :57). CLAUDE.md lines 7/18/25/26 plus one Conventions bullet. GLOSSARY: Action, Trash action and Draft edit entries in the Blade/Mind shape. server.py: instructions :143-148 name mail_draft_edit; the module docstring :1-9 names the new tools. outbox.py docstring: forward composition plus one untrusted-fields sentence. No function body changes. Log privacy: test_write_calls_log_no_mail_content in tests/test_write_tools.py, using serve()/worker() :79-120 at INFO and scanning str(r.__dict__) for sentinels as at tests/test_attachments.py:424-425; test_worker_apply_logs_no_mail_content in tests/test_actions.py, using runner()/run_action()/seed_live_draft (:355, :445, :630) at DEBUG for forward draft, edit and trash. A leak is reported in deviations, not fixed. Release: mirror 99b976c, with 0.14.0 in pyproject:3, __init__:3, uv.lock:1299 (uv lock, one-line diff only), deployment.yaml:57/94/118 and kustomization:12. The PR body carries an unfilled item-7 owner checklist. No tag, no docs/adr/ edits. **Files:** `SECURITY.md` · `README.md` · `config.example.toml` · `CLAUDE.md` · `GLOSSARY.md` · `src/mail_mind_mcp/server.py` · `src/mail_mind_mcp/outbox.py` · `tests/test_write_tools.py` · `tests/test_actions.py` · `pyproject.toml` · `src/mail_mind_mcp/__init__.py` · `uv.lock` · `deploy/k8s/base/deployment.yaml` · `deploy/k8s/overlays/example/kustomization.yaml` **Derived artifacts:** `pyproject.toml` **Decision:** accept the 6 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`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-12-write-v2-docs-log-privacy-test-and-release-0-14-0.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-12-write-v2-docs-log-privacy-test-and-release-0-14-0.md`</sub>
Collaborator

✅ SVD architect gate: dev/mail-mind-mcp#197 write-v2-docs-log-privacy-test-and-release-0-14-0

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 unclassified · dispatch effort unclassified

Run: 20261112T225223Z-3ebcb716

Files: SECURITY.md · README.md · config.example.toml · CLAUDE.md · GLOSSARY.md · src/mail_mind_mcp/server.py · src/mail_mind_mcp/outbox.py · tests/test_write_tools.py · tests/test_actions.py · pyproject.toml · src/mail_mind_mcp/__init__.py · uv.lock · deploy/k8s/base/deployment.yaml · deploy/k8s/overlays/example/kustomization.yaml
Derived artifacts: pyproject.toml

Write-set divergence: present table wins. 0 sourceHashes vs 26-row table.

Decision: dispatch this spec (svd:go)?

Your call (when this issue is held at the gate via svd:hold):

  • add label svd:go — approve; Half-B dispatch accepts exactly this spec (open risks accepted)
  • add label svd:fire beside svd:go — approve AND authorise the Half-B fire from the phone; never on its own
  • add label svd:skip — park it; dispatch refuses it and the issue stays for a human
  • add label svd:respec — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-12-write-v2-docs-log-privacy-test-and-release-0-14-0.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-12-write-v2-docs-log-privacy-test-and-release-0-14-0.md

### ✅ SVD architect gate: dev/mail-mind-mcp#197 write-v2-docs-log-privacy-test-and-release-0-14-0 **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 `unclassified` · dispatch effort `unclassified` **Run:** `20261112T225223Z-3ebcb716` **Files:** `SECURITY.md` · `README.md` · `config.example.toml` · `CLAUDE.md` · `GLOSSARY.md` · `src/mail_mind_mcp/server.py` · `src/mail_mind_mcp/outbox.py` · `tests/test_write_tools.py` · `tests/test_actions.py` · `pyproject.toml` · `src/mail_mind_mcp/__init__.py` · `uv.lock` · `deploy/k8s/base/deployment.yaml` · `deploy/k8s/overlays/example/kustomization.yaml` **Derived artifacts:** `pyproject.toml` **Write-set divergence:** present table wins. 0 sourceHashes vs 26-row table. **Decision:** dispatch this spec (`svd:go`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-12-write-v2-docs-log-privacy-test-and-release-0-14-0.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-12-write-v2-docs-log-privacy-test-and-release-0-14-0.md`</sub>
svc-svd-writer referenced this issue from a commit 2026-11-12 23:15:33 +00:00
Collaborator

spec-verify-dispatch Half B for dev/mail-mind-mcp#197 write-v2-docs-log-privacy-test-and-release-0-14-0 completed integration verify.

  • PR: #209
  • Branch: feat/svd-dev-mail-mind-mcp-197-write-v2-docs-log-privacy-test-3a4c1438
  • Commit: 81e5f65656
  • Build: none
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/72/pipeline/97/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: Item 7 (owner check of the 0.13.0 image against a v18 mirror) and the tag push remain operator-only and are not done by this PR.
  • Warning: Item 4a (ADR 0006 draft-edit bullet) is out of this PR by spec and needs its own work unit.
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261112T230845Z-3a4c1438 --confirm-merge)
spec-verify-dispatch Half B for dev/mail-mind-mcp#197 write-v2-docs-log-privacy-test-and-release-0-14-0 completed integration verify. - PR: https://git.groupthink.asia/dev/mail-mind-mcp/pulls/209 - Branch: feat/svd-dev-mail-mind-mcp-197-write-v2-docs-log-privacy-test-3a4c1438 - Commit: 81e5f65656e1e22f9896c0afc25c026ad1191e0c - Build: none - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/72/pipeline/97/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: Item 7 (owner check of the 0.13.0 image against a v18 mirror) and the tag push remain operator-only and are not done by this PR. - Warning: Item 4a (ADR 0006 draft-edit bullet) is out of this PR by spec and needs its own work unit. - CI wait: ci/woodpecker/pr/validation -> pass - Decision: review the PR and merge? (`codex-svd ship --run-id 20261112T230845Z-3a4c1438 --confirm-merge`)
Author
Member

Status 2026-11-13: items 1–6 and 8 merged in #209 (ff20725, 0.14.0). Item 4a merged in #207 (eba520d). The integration suite (GreenMail and Stalwart) is green after #208.

Open before the v0.14.0 tag (item 7, owner only). Run the real git.groupthink.asia/dev/mail-mind-mcp:0.13.0 image against a copy of a v18 mirror:

  • mailmind api starts.
  • mail_actions lists every row, including trash and edit kinds.
  • mail_flag still queues.

This issue closes when the check passes.

Status 2026-11-13: items 1–6 and 8 merged in #209 (`ff20725`, 0.14.0). Item 4a merged in #207 (`eba520d`). The integration suite (GreenMail and Stalwart) is green after #208. Open before the `v0.14.0` tag (item 7, owner only). Run the real `git.groupthink.asia/dev/mail-mind-mcp:0.13.0` image against a copy of a v18 mirror: - [ ] `mailmind api` starts. - [ ] `mail_actions` lists every row, including `trash` and `edit` kinds. - [ ] `mail_flag` still queues. This issue closes when the check passes.
Author
Member

Item 7 owner check, 2026-11-13: passed. Run on the real git.groupthink.asia/dev/mail-mind-mcp:0.13.0 image (digest a3633c1565a1), against a v18 store built by 0.14.0 code with applied draft, edit and trash rows.

  • mailmind api starts. With trash_per_day in [writes], 0.13.0 refuses the config (config_error, extra inputs not permitted). Without the key, it starts with no schema error. The README rollback note now says to remove the key first (#210).
  • mail_actions lists every row, including edit and trash (0.13.0 shows their detail as of=None).
  • mail_flag still queues: action=4 kind=flag state=queued.

All items are done: #207, #208, #209, #210. Closing. The v0.14.0 tag is the operator's step.

Item 7 owner check, 2026-11-13: passed. Run on the real `git.groupthink.asia/dev/mail-mind-mcp:0.13.0` image (digest `a3633c1565a1`), against a v18 store built by 0.14.0 code with applied draft, edit and trash rows. - [x] `mailmind api` starts. With `trash_per_day` in `[writes]`, 0.13.0 refuses the config (`config_error`, extra inputs not permitted). Without the key, it starts with no schema error. The README rollback note now says to remove the key first (#210). - [x] `mail_actions` lists every row, including `edit` and `trash` (0.13.0 shows their detail as `of=None`). - [x] `mail_flag` still queues: `action=4 kind=flag state=queued`. All items are done: #207, #208, #209, #210. Closing. The `v0.14.0` tag is the operator's step.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/mail-mind-mcp#197
No description provided.