Amend ADR 0008 to keep the delimited sign-off block for mail_evidence #175

Merged
svc-agent-writer merged 1 commit from docs/85-adr-0008-delimited-sign-off into main 2026-11-03 23:23:33 +00:00

Summary

Docs only. This is the ADR 0008 amendment that #85 names as its human act: ruling: the operator accepts the ADR 0008 amendment that stores a delimited sign-off block in the mirror (ADR-0008). Merging this PR is that ruling. After the merge, #85 can move to ready-for-agent.

 docs/adr/0008-evidence-scope.md
 Status
+  §2 amended and §11 added 2026-11-04 (#85)
 §2 signature
-  text below a `-- ` delimiter is not in the mirror (#85)
+  the stored block (§11) is the sign-off when not empty; otherwise the §2 rule runs
+§11 the delimited sign-off block
+  delimiter, block bounds, redaction at write, three states, received mail only,
+  ingest capture, 365-day backlog and byte path, not a mail change, what reads it,
+  schema v17, evidence-stats, retention
 Consequences
+  more third-party data in the mirror; backlog server load; the accepted misses

mail_evidence and mail_peer_evidence_v1 read the column. The signature field gains the delimited block, and no new field is added. body_text, mail_read, FTS, embeddings, the assessor, the feed and the snapshot are unchanged.

Points to rule on

Your 2026-11-01 rulings on #85 are carried over unchanged. Six points below either go beyond them or depart from the brief:

  1. Delimiter form (departs from the brief). The brief says -- . At pin v0.1.2, trim_quoted strips trailing white space and then compares with -- (imap_blade_mcp/mime.py:186). §11 uses that test, so the column starts exactly where body_text stops. With -- only, a bare -- signature would be cut from the body and kept nowhere.
  2. First delimiter, not last (departs from the brief). The brief says "the last delimiter before any quoted text". Mailing lists add their own -- footer after the sender's signature. "Last" would choose the footer, stop at the list-footer line and store nothing.
  3. Forwards (new). trim_quoted keeps forward headers. A delimiter below a forward marker belongs to the forwarded author. §11 stores an empty string for it, so the original author's signature is not credited to the forwarder.
  4. No 72-character stop in the block (new). §2 stops at a line over 72 characters to avoid returning body text. A delimiter has already declared the block, and the 600-character cap bounds it, so §11 does not apply that stop.
  5. Configuration (new). The section is [sign_off], with backlog_days = 365 (ruled) and per_pass = 100. The section name and the per-pass default are new.
  6. Both evidence tools (follows §8). mail_peer_evidence_v1 serves the §2 fields, so it reads the column too.

Evidence

Each claim in §11 that describes current code was checked on main at 76d3433:

  • Delimiter: trim_quoted does stripped = line.rstrip(), then cuts at stripped == "--" (mime.py:175, :186).
  • No reindex: the FTS update trigger is AFTER UPDATE OF subject, from_addr, from_name, to_addrs, body_text, attached_text (src/mail_mind_mcp/store.py:70-71). Writing sign_off does not fire it.
  • No extra fetch at ingest: both sources hold the untrimmed text just before trim_quoted, at ingest.py:369 and :611 and at jmap.py:1083. The text is bounded by store.max_text_bytes (default 512,000).
  • Not a mail change: peer events are emitted only beside a changes insert (Store._emit, ADR 0012). A column write adds neither.
  • Schema: the schema is at v16 (store.py:38), so the column takes v17.

Merge Danger

Door: two-way for this PR; the build it authorises is closer to one-way.

The PR changes one document. The build it authorises writes third-party personal data into the mirror, and into its backups. Removing that data later means a migration and backup expiry.

Blast Radius: data boundary

Every instance stores the delimited block of each received message once the build ships, and the 365-day backlog is on by default. An evidence token reaches the block through signature. ADR 0008 §7 still governs who receives one.

Refs #85

🤖 Generated with Claude Code

## Summary Docs only. This is the ADR 0008 amendment that #85 names as its human act: `ruling: the operator accepts the ADR 0008 amendment that stores a delimited sign-off block in the mirror (ADR-0008)`. **Merging this PR is that ruling.** After the merge, #85 can move to `ready-for-agent`. ```diff docs/adr/0008-evidence-scope.md Status + §2 amended and §11 added 2026-11-04 (#85) §2 signature - text below a `-- ` delimiter is not in the mirror (#85) + the stored block (§11) is the sign-off when not empty; otherwise the §2 rule runs +§11 the delimited sign-off block + delimiter, block bounds, redaction at write, three states, received mail only, + ingest capture, 365-day backlog and byte path, not a mail change, what reads it, + schema v17, evidence-stats, retention Consequences + more third-party data in the mirror; backlog server load; the accepted misses ``` `mail_evidence` and `mail_peer_evidence_v1` read the column. The `signature` field gains the delimited block, and no new field is added. `body_text`, `mail_read`, FTS, embeddings, the assessor, the feed and the snapshot are unchanged. ### Points to rule on Your 2026-11-01 rulings on #85 are carried over unchanged. Six points below either go beyond them or depart from the brief: 1. **Delimiter form (departs from the brief).** The brief says `-- `. At pin v0.1.2, `trim_quoted` strips trailing white space and then compares with `--` (`imap_blade_mcp/mime.py:186`). §11 uses that test, so the column starts exactly where `body_text` stops. With `-- ` only, a bare `--` signature would be cut from the body and kept nowhere. 2. **First delimiter, not last (departs from the brief).** The brief says "the last delimiter before any quoted text". Mailing lists add their own `-- ` footer after the sender's signature. "Last" would choose the footer, stop at the list-footer line and store nothing. 3. **Forwards (new).** `trim_quoted` keeps forward headers. A delimiter below a forward marker belongs to the forwarded author. §11 stores an empty string for it, so the original author's signature is not credited to the forwarder. 4. **No 72-character stop in the block (new).** §2 stops at a line over 72 characters to avoid returning body text. A delimiter has already declared the block, and the 600-character cap bounds it, so §11 does not apply that stop. 5. **Configuration (new).** The section is `[sign_off]`, with `backlog_days = 365` (ruled) and `per_pass = 100`. The section name and the per-pass default are new. 6. **Both evidence tools (follows §8).** `mail_peer_evidence_v1` serves the §2 fields, so it reads the column too. ## Evidence Each claim in §11 that describes current code was checked on `main` at `76d3433`: - **Delimiter:** `trim_quoted` does `stripped = line.rstrip()`, then cuts at `stripped == "--"` (`mime.py:175`, `:186`). - **No reindex:** the FTS update trigger is `AFTER UPDATE OF subject, from_addr, from_name, to_addrs, body_text, attached_text` (`src/mail_mind_mcp/store.py:70-71`). Writing `sign_off` does not fire it. - **No extra fetch at ingest:** both sources hold the untrimmed text just before `trim_quoted`, at `ingest.py:369` and `:611` and at `jmap.py:1083`. The text is bounded by `store.max_text_bytes` (default 512,000). - **Not a mail change:** peer events are emitted only beside a `changes` insert (`Store._emit`, ADR 0012). A column write adds neither. - **Schema:** the schema is at v16 (`store.py:38`), so the column takes v17. ## Merge Danger **Door:** two-way for this PR; the build it authorises is closer to one-way. The PR changes one document. The build it authorises writes third-party personal data into the mirror, and into its backups. Removing that data later means a migration and backup expiry. **Blast Radius:** data boundary Every instance stores the delimited block of each received message once the build ships, and the 365-day backlog is on by default. An evidence token reaches the block through `signature`. ADR 0008 §7 still governs who receives one. Refs #85 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Amend ADR 0008 to keep the delimited sign-off block for mail_evidence
All checks were successful
ci/woodpecker/pr/validation Pipeline was successful
8e2abe282b
§11 records the sign_off column that #85 asks for: the block below the first delimiter that trim_quoted cuts at, redacted when written, at most 8 lines and 600 characters, for received mail only. It sets the three states (NULL not scanned, empty none, text the block), the 365-day backlog and its byte path, the evidence-stats count report, and that the write is not a mail change. §2 now reads the stored block first and falls back to its rule. The field list does not change.

Refs #85

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
svc-agent-writer deleted branch docs/85-adr-0008-delimited-sign-off 2026-11-03 23:23:34 +00:00
Sign in to join this conversation.
No description provided.