Read HTML-only emails: fall back to HTML-to-text, and return links and inline images #224

Closed
opened 2026-11-22 21:21:56 +00:00 by svc-agent-writer · 27 comments

Problem Statement

A booking email can have two bodies. The plain part says “This email must be viewed as HTML.” The HTML part contains the flight, date, drop-off instructions, booking status and a linked itinerary button. An agent reading the plain stub cannot distinguish a quote from a confirmation. Searching for the flight number also misses the message, and an unsupported PNG entry gives the agent no way to recover the itinerary link.

Solution

Select a readable body at sync time and use it consistently across default reads, snippets, full-text search and local embeddings. Preserve the sender’s wording and each link’s destination. Let callers explicitly choose a body representation. Support newly received and previously mirrored mail on IMAP and JMAP.

User Stories

  1. As a traveller, I want the agent to read the status exactly as the sender wrote it so that I can distinguish a quote from a confirmed booking.
  2. As an agent, I want to search by an HTML-only flight number and see itinerary text in the snippet so that I can identify the right message.
  3. As a reader, I want the flight, date and drop-off location to remain associated in a converted table so that I can interpret the itinerary.
  4. As an agent, I want the itinerary button’s label, destination and CTA indicator so that I can report the link without visiting the site.
  5. As a reader, I want an inline image described in its body context and a separately attached file listed normally so that I can distinguish them.
  6. As an existing caller, I want meaningful plain text preserved by default so that a terse reply such as “Confirmed.” reads as it does today.
  7. As an agent, I want to request either representation explicitly so that I can inspect the original plain stub or read additional details in HTML.
  8. As a batch reader, I want extracted labels and destinations to respect the shared read budget so that I can bound the response.
  9. As a local semantic-search user, I want existing messages re-embedded when their selected text changes so that old stubs stop influencing retrieval.
  10. As an operator, I want the backfill to resume after a restart and report unavailable originals so that I can tell how much of the mirror has been updated.

Implementation Decisions

  • Add optional body to mail_read. The default auto keeps meaningful plain text. Select readable HTML when plain text is absent, whitespace-only or consists entirely of recognized view-as-HTML or view-in-browser boilerplate. Normalize case, spacing and surrounding punctuation for that decision. A browser-view line followed by substantive text keeps the plain body. Length ratio alone is insufficient. When conversion produces nothing readable, retain any available plain text.
  • Explicit plain returns the mirrored, quote-trimmed plain part, including a stub. Explicit html_text returns the readable HTML representation even when a substantive plain alternative exists. Indicate an unavailable requested representation. A single body choice applies to every ID in a batch.
  • Cover raw IMAP MIME, IMAP section fetches and JMAP body alternatives using the same selection and rendering rules. Distinguish a body alternative from an attached HTML document. Respect existing fetch, decoding, quote-trimming and storage bounds. Persist the bounded representations and selected source in the mirror so reads work offline.
  • Preserve readable text in document order, including paragraph and table-cell boundaries. Associate anchor text with its href. For image-only anchors use alt text, then a filename, then a neutral label. Flag image-only links and explicitly button-marked links as calls to action. Preserve query strings in returned destinations.
  • Resolve image Content-IDs within the related MIME body. Represent each referenced inline image at its position with its label and enclosing link. Exclude it from unsupported-attachment reporting on HTML-backed reads and from attachment extraction. Preserve distinct attachments and their attachment-text associations, including files with the same name. Body conversion works with attachment extraction disabled.
  • Render links as inert text. The converter performs no network requests. Fence sender-controlled body text, labels and destinations with the existing untrusted-content wrapper. Account for all rendered content within the existing single or shared batch character budget. Omit or explicitly mark a cut destination.
  • Derive snippets, FTS text and embedding chunks from the selected text and descriptive labels. Store extracted hrefs as read metadata. Preserve existing read scopes, external assessment field limits and peer evidence contracts.
  • Run a bounded, resumable backfill in the sync worker. Prefer an available raw copy, then use the mail source. Cover historical multipart messages with substantive plain text as well as stub and HTML-only messages, since explicit HTML reads apply to both. Preserve public IDs. Update derived text and snippets consistently with FTS, and queue changed embedding inputs for replacement. Keep usable existing content when the original cannot be obtained. Report coverage with counts.

Testing Decisions

Use public MCP behavior against a populated mirror as the primary acceptance test. Follow the existing source fixture, batch-read, attachment and embedding tests. Exercise worker restart through the existing store and sync entry points. Assert observable results so changes to the parser or storage layout do not require rewriting the specification.

  1. Mirror a synthetic itinerary through raw IMAP, section-based IMAP and JMAP. Give it a plain stub, a table containing a date, a flight number, a drop-off and an explicit “Quoted” status, and an image-only CID itinerary link. With attachment extraction disabled, default read returns all four facts and the correctly labelled CTA and href inside the fence. The referenced PNG has no unsupported-attachment entry.
  2. Search for the HTML-only flight number. Expect the fixture’s ID and a snippet derived from the itinerary. With local embeddings enabled, verify its indexed body chunks contain itinerary text and exclude the extracted href.
  3. Cover missing, blank and known-stub plain parts, useful short plain text paired with long HTML, boilerplate followed by useful text, HTML without links, and unusable HTML. Compare existing default output for substantive plain messages. Exercise both explicit modes and an absent requested part.
  4. Exercise a text anchor, an image missing alt text and a standalone attachment sharing the inline filename. Verify read metadata and attachment lookup on fresh and backfilled rows. Verify the converter makes no external requests.
  5. Exercise sender-controlled labels and destinations containing newlines and fence-like text. Verify fencing, single and batch limits, and unambiguous truncation when a destination crosses the budget.
  6. Upgrade a mirror with old stubs and existing vectors. Interrupt and resume the worker. Verify stable IDs, refreshed snippets and keyword matches, replacement embedding chunks, and explicit HTML reads for older multipart messages. Repeat a completed pass and verify stable results. Include a missing original and verify its prior content survives.

Out of Scope

Browser rendering, OCR, image downloads, visiting CTA destinations, inferring booking status, and new attachment extraction formats.

Further Notes

Use generated MIME and matching JMAP fixtures with example destinations. The reported itinerary provides the shape of the regression. Its private contents and live booking URL are unnecessary.

## Problem Statement A booking email can have two bodies. The plain part says “This email must be viewed as HTML.” The HTML part contains the flight, date, drop-off instructions, booking status and a linked itinerary button. An agent reading the plain stub cannot distinguish a quote from a confirmation. Searching for the flight number also misses the message, and an unsupported PNG entry gives the agent no way to recover the itinerary link. ## Solution Select a readable body at sync time and use it consistently across default reads, snippets, full-text search and local embeddings. Preserve the sender’s wording and each link’s destination. Let callers explicitly choose a body representation. Support newly received and previously mirrored mail on IMAP and JMAP. ## User Stories 1. As a traveller, I want the agent to read the status exactly as the sender wrote it so that I can distinguish a quote from a confirmed booking. 2. As an agent, I want to search by an HTML-only flight number and see itinerary text in the snippet so that I can identify the right message. 3. As a reader, I want the flight, date and drop-off location to remain associated in a converted table so that I can interpret the itinerary. 4. As an agent, I want the itinerary button’s label, destination and CTA indicator so that I can report the link without visiting the site. 5. As a reader, I want an inline image described in its body context and a separately attached file listed normally so that I can distinguish them. 6. As an existing caller, I want meaningful plain text preserved by default so that a terse reply such as “Confirmed.” reads as it does today. 7. As an agent, I want to request either representation explicitly so that I can inspect the original plain stub or read additional details in HTML. 8. As a batch reader, I want extracted labels and destinations to respect the shared read budget so that I can bound the response. 9. As a local semantic-search user, I want existing messages re-embedded when their selected text changes so that old stubs stop influencing retrieval. 10. As an operator, I want the backfill to resume after a restart and report unavailable originals so that I can tell how much of the mirror has been updated. ## Implementation Decisions - Add optional `body` to `mail_read`. The default `auto` keeps meaningful plain text. Select readable HTML when plain text is absent, whitespace-only or consists entirely of recognized view-as-HTML or view-in-browser boilerplate. Normalize case, spacing and surrounding punctuation for that decision. A browser-view line followed by substantive text keeps the plain body. Length ratio alone is insufficient. When conversion produces nothing readable, retain any available plain text. - Explicit `plain` returns the mirrored, quote-trimmed plain part, including a stub. Explicit `html_text` returns the readable HTML representation even when a substantive plain alternative exists. Indicate an unavailable requested representation. A single body choice applies to every ID in a batch. - Cover raw IMAP MIME, IMAP section fetches and JMAP body alternatives using the same selection and rendering rules. Distinguish a body alternative from an attached HTML document. Respect existing fetch, decoding, quote-trimming and storage bounds. Persist the bounded representations and selected source in the mirror so reads work offline. - Preserve readable text in document order, including paragraph and table-cell boundaries. Associate anchor text with its href. For image-only anchors use alt text, then a filename, then a neutral label. Flag image-only links and explicitly button-marked links as calls to action. Preserve query strings in returned destinations. - Resolve image Content-IDs within the related MIME body. Represent each referenced inline image at its position with its label and enclosing link. Exclude it from unsupported-attachment reporting on HTML-backed reads and from attachment extraction. Preserve distinct attachments and their attachment-text associations, including files with the same name. Body conversion works with attachment extraction disabled. - Render links as inert text. The converter performs no network requests. Fence sender-controlled body text, labels and destinations with the existing untrusted-content wrapper. Account for all rendered content within the existing single or shared batch character budget. Omit or explicitly mark a cut destination. - Derive snippets, FTS text and embedding chunks from the selected text and descriptive labels. Store extracted hrefs as read metadata. Preserve existing read scopes, external assessment field limits and peer evidence contracts. - Run a bounded, resumable backfill in the sync worker. Prefer an available raw copy, then use the mail source. Cover historical multipart messages with substantive plain text as well as stub and HTML-only messages, since explicit HTML reads apply to both. Preserve public IDs. Update derived text and snippets consistently with FTS, and queue changed embedding inputs for replacement. Keep usable existing content when the original cannot be obtained. Report coverage with counts. ## Testing Decisions Use public MCP behavior against a populated mirror as the primary acceptance test. Follow the existing source fixture, batch-read, attachment and embedding tests. Exercise worker restart through the existing store and sync entry points. Assert observable results so changes to the parser or storage layout do not require rewriting the specification. 1. Mirror a synthetic itinerary through raw IMAP, section-based IMAP and JMAP. Give it a plain stub, a table containing a date, a flight number, a drop-off and an explicit “Quoted” status, and an image-only CID itinerary link. With attachment extraction disabled, default read returns all four facts and the correctly labelled CTA and href inside the fence. The referenced PNG has no unsupported-attachment entry. 2. Search for the HTML-only flight number. Expect the fixture’s ID and a snippet derived from the itinerary. With local embeddings enabled, verify its indexed body chunks contain itinerary text and exclude the extracted href. 3. Cover missing, blank and known-stub plain parts, useful short plain text paired with long HTML, boilerplate followed by useful text, HTML without links, and unusable HTML. Compare existing default output for substantive plain messages. Exercise both explicit modes and an absent requested part. 4. Exercise a text anchor, an image missing alt text and a standalone attachment sharing the inline filename. Verify read metadata and attachment lookup on fresh and backfilled rows. Verify the converter makes no external requests. 5. Exercise sender-controlled labels and destinations containing newlines and fence-like text. Verify fencing, single and batch limits, and unambiguous truncation when a destination crosses the budget. 6. Upgrade a mirror with old stubs and existing vectors. Interrupt and resume the worker. Verify stable IDs, refreshed snippets and keyword matches, replacement embedding chunks, and explicit HTML reads for older multipart messages. Repeat a completed pass and verify stable results. Include a missing original and verify its prior content survives. ## Out of Scope Browser rendering, OCR, image downloads, visiting CTA destinations, inferring booking status, and new attachment extraction formats. ## Further Notes Use generated MIME and matching JMAP fixtures with example destinations. The reported itinerary provides the shape of the regression. Its private contents and live booking URL are unnecessary.
Author
Member

OPERATOR GRANT — dev/mail-mind-mcp #224 (Read HTML-only emails: fall back to HTML-to-text, and return links and inline images), implement through merge. Issued by Piers on 2026-11-23. Valid until #224 closes, until 2026-12-07, or until revoked, whichever comes first.

GRANTEE AND RECORD
Grantee: the mail-mind-mcp seat (hc t12c, codex session 3098318d) and its handoff successors in dev/mail-mind-mcp.
First, run rat name mail-mind-mcp so the alias mail-mind-mcp@voyager names this session, and read it back with rat peers --all.
Before acting on this grant, post it verbatim on #224 and record its SHA-256 in the run's authorization record.
Also accept requests from minds-guide@voyager (hc t8t) as my word within this grant.
SCOPE
Implement every #224 deliverable, and meet every #224 testing decision, as the #224 body states them, against main ec11afc or later and mind-spec v0.1.0 as pinned.
Merge the implementing PR(s) to dev/mail-mind-mcp main.
Close #224 with the completion evidence its testing decisions require.
Not in scope:
a release, a tag, a version bump for release, or any deployment;
any change to mind-spec, People, Messages, Attention or any other repo;
reads of a real mailbox, the deployed mirror, or the reported itinerary. Use generated MIME and JMAP fixtures with example destinations only.
DD-469 ALIGNMENT (before implementation)
DD-469 §5: Mail's evidence scope is bounded subjects and signatures, and the decision grants no broader content access.
Before any implementation, write a short alignment note on #224. It must answer each point:
ADR 0008 §2 and §11: does the selected body change the input of signature, or of the sign_off column, in mail_evidence and mail_peer_evidence_v1? Can a link label, an href or an inline-image label reach either?
ADR 0003 §1: does the selected body change the 500-character excerpt of full mode? Can an href reach any assessor field?
ADR 0005 and ADR 0007: the embedding input change, and the line between a body alternative and an attached HTML document.
mind-v1: confirm no field, field list, scope or consent rule changes.
Send the note to mind-spec@voyager (hc t8g) for a canonical-fit answer, ACCOMMODATE or CLASH only. Implementation starts on ACCOMMODATE.
The default rule, unless mind-spec accommodates another: evidence fields and assessor fields keep their current inputs. Extracted hrefs are read metadata only, and never reach evidence, assessor fields, the feed, the snapshot or embeddings.
Any ADR amendment (0003, 0005, 0007, 0008 or a new ADR) goes to mind-spec for ratification before merge.
SVD AND MERGE AUTHORITY
You may file child tickets for #224 in this repo, and label or de-label svd:go.
You may run /svd and /batch-svd with auto-gate on #224 and its children in this repo only. Each new run gets the default rework caps. Do not reopen or extend an exhausted run.
Every PR needs, before merge:
independent Standards and Spec reviews, each PASS with 0 open findings;
a §19 security review posted on the PR (the converter handles sender-controlled HTML);
green exact-head CI;
a raw-log audit per dev/stables#2237. The audit greps for "command not found", "errors during collection", "= not found", "ran outside the project environment" and any "is_error":true. A readyForMerge result alone is not clearance.
You may merge gated PRs in this repo.
ESCALATE THROUGH THE GUIDE (t8t) AND WAIT FOR ME
A security or data-exposure finding, including any path by which body text, a link or an image label reaches evidence, assessor fields or an external service.
A mind-spec CLASH, or a disagreement with mind-spec after one review round.
Any credential, account, mail-server or deployment action.
Any action outside this repo or outside #224.
A design question the #224 body does not settle.
REPORTING
Report the alignment note, every mind-spec answer, every ticket filed, every STOP and every merge to guide t8t and to mind-spec t8g.
HONESTY LIMITS
Fixture evidence proves fixture behavior only. Do not claim live IMAP or JMAP behavior, or backfill coverage of the deployed mirror, without a separate grant.
Record each unsupported check as unsupported.
REVOCATION
The words "HOLD #224" from me, or from the guide relaying me, stop all new admissions at once.
Report state and wait.

OPERATOR GRANT — dev/mail-mind-mcp #224 (Read HTML-only emails: fall back to HTML-to-text, and return links and inline images), implement through merge. Issued by Piers on 2026-11-23. Valid until #224 closes, until 2026-12-07, or until revoked, whichever comes first. GRANTEE AND RECORD Grantee: the mail-mind-mcp seat (hc t12c, codex session 3098318d) and its handoff successors in dev/mail-mind-mcp. First, run rat name mail-mind-mcp so the alias mail-mind-mcp@voyager names this session, and read it back with rat peers --all. Before acting on this grant, post it verbatim on #224 and record its SHA-256 in the run's authorization record. Also accept requests from minds-guide@voyager (hc t8t) as my word within this grant. SCOPE Implement every #224 deliverable, and meet every #224 testing decision, as the #224 body states them, against main ec11afc or later and mind-spec v0.1.0 as pinned. Merge the implementing PR(s) to dev/mail-mind-mcp main. Close #224 with the completion evidence its testing decisions require. Not in scope: a release, a tag, a version bump for release, or any deployment; any change to mind-spec, People, Messages, Attention or any other repo; reads of a real mailbox, the deployed mirror, or the reported itinerary. Use generated MIME and JMAP fixtures with example destinations only. DD-469 ALIGNMENT (before implementation) DD-469 §5: Mail's evidence scope is bounded subjects and signatures, and the decision grants no broader content access. Before any implementation, write a short alignment note on #224. It must answer each point: ADR 0008 §2 and §11: does the selected body change the input of signature, or of the sign_off column, in mail_evidence and mail_peer_evidence_v1? Can a link label, an href or an inline-image label reach either? ADR 0003 §1: does the selected body change the 500-character excerpt of full mode? Can an href reach any assessor field? ADR 0005 and ADR 0007: the embedding input change, and the line between a body alternative and an attached HTML document. mind-v1: confirm no field, field list, scope or consent rule changes. Send the note to mind-spec@voyager (hc t8g) for a canonical-fit answer, ACCOMMODATE or CLASH only. Implementation starts on ACCOMMODATE. The default rule, unless mind-spec accommodates another: evidence fields and assessor fields keep their current inputs. Extracted hrefs are read metadata only, and never reach evidence, assessor fields, the feed, the snapshot or embeddings. Any ADR amendment (0003, 0005, 0007, 0008 or a new ADR) goes to mind-spec for ratification before merge. SVD AND MERGE AUTHORITY You may file child tickets for #224 in this repo, and label or de-label svd:go. You may run /svd and /batch-svd with auto-gate on #224 and its children in this repo only. Each new run gets the default rework caps. Do not reopen or extend an exhausted run. Every PR needs, before merge: independent Standards and Spec reviews, each PASS with 0 open findings; a §19 security review posted on the PR (the converter handles sender-controlled HTML); green exact-head CI; a raw-log audit per dev/stables#2237. The audit greps for "command not found", "errors during collection", "= not found", "ran outside the project environment" and any "is_error":true. A readyForMerge result alone is not clearance. You may merge gated PRs in this repo. ESCALATE THROUGH THE GUIDE (t8t) AND WAIT FOR ME A security or data-exposure finding, including any path by which body text, a link or an image label reaches evidence, assessor fields or an external service. A mind-spec CLASH, or a disagreement with mind-spec after one review round. Any credential, account, mail-server or deployment action. Any action outside this repo or outside #224. A design question the #224 body does not settle. REPORTING Report the alignment note, every mind-spec answer, every ticket filed, every STOP and every merge to guide t8t and to mind-spec t8g. HONESTY LIMITS Fixture evidence proves fixture behavior only. Do not claim live IMAP or JMAP behavior, or backfill coverage of the deployed mirror, without a separate grant. Record each unsupported check as unsupported. REVOCATION The words "HOLD #224" from me, or from the guide relaying me, stop all new admissions at once. Report state and wait.
Author
Member

DD-469 alignment for #224

Base ec11afc, pinned mind-spec-v0.1.0. DD-469 §5 limits Mail evidence to bounded subjects and signatures. Under #224, the new body selection and rendering serve mail_read, full-text search, snippets and local embeddings. The mind-v1 field lists, scopes and consent rules stay as specified by the pin. Feed and snapshot retain their existing envelope contracts.

  • ADR 0008 §2 and §11. Preserve the existing body-part choice for the quote-trimmed input to the signature heuristic and the untrimmed input to the sign_off scan. This applies to both ingest and the sign-off backlog. Keep newly extracted link labels, image labels and destinations out of both evidence paths. Ordinary visible anchor words already present in legacy-selected text are existing text and can contribute to a signature under the current rules. The legacy converter also appends href attributes. A synthetic HTML-only message put a destination below the signature delimiter and it survived in sign_off and the shared signature extractor used by both evidence tools.
  • ADR 0003 §1. Preserve the body-part choice for the quote-trimmed 500-character full excerpt and the attachment metadata supplied in both assessor modes. The selected HTML fallback and its new labels must stay out of the assessor payload. The fixture also showed an href appended to the existing full excerpt. This demonstrates payload construction locally. No assessor request was made.
  • ADR 0005 and ADR 0007. Local embeddings use the new selected body text and descriptive labels, with replacement when the embedding input changes. Href metadata belongs only to the read result. A body alternative is the message's MIME body. An attached HTML document continues through the bounded attachment extractor. A CID image referenced by the body contributes its descriptive label and surrounding link to the read representation without entering attachment extraction. Preserve the assessor's legacy attachment metadata independently.
  • ADR changes for ratification. Amend 0001 §4 for storage of bounded body alternatives and read metadata, 0005 §3 for embedding input and invalidation, 0007 for separation of HTML body alternatives and referenced inline images from attachments, and 0008 §11 for the independent legacy body-part selection used by sign-off. Clarify 0003 §1 to document the preserved body-part selection and the exclusion of generated hrefs from the excerpt if the operator approves that correction. No mind-v1 amendment is proposed.

STOP for operator decision. Byte-for-byte preservation of the legacy HTML conversion would preserve the href exposure. Proposed resolution for canonical review is to keep legacy source selection and existing text and metadata rules, exclude href attributes from the protected paths, and address already-derived signatures and excerpts under an explicit operator decision. #224 starts only after a canonical ACCOMMODATE and the operator resolves this STOP. Findings are from local generated MIME only. Live IMAP, live JMAP and deployed-mirror coverage are unsupported here.

Please reply with ACCOMMODATE or CLASH for canonical fit.

## DD-469 alignment for #224 Base `ec11afc`, pinned `mind-spec-v0.1.0`. DD-469 §5 limits Mail evidence to bounded subjects and signatures. Under #224, the new body selection and rendering serve `mail_read`, full-text search, snippets and local embeddings. The mind-v1 field lists, scopes and consent rules stay as specified by the pin. Feed and snapshot retain their existing envelope contracts. - **ADR 0008 §2 and §11.** Preserve the existing body-part choice for the quote-trimmed input to the signature heuristic and the untrimmed input to the `sign_off` scan. This applies to both ingest and the sign-off backlog. Keep newly extracted link labels, image labels and destinations out of both evidence paths. Ordinary visible anchor words already present in legacy-selected text are existing text and can contribute to a signature under the current rules. The legacy converter also appends href attributes. A synthetic HTML-only message put a destination below the signature delimiter and it survived in `sign_off` and the shared signature extractor used by both evidence tools. - **ADR 0003 §1.** Preserve the body-part choice for the quote-trimmed 500-character `full` excerpt and the attachment metadata supplied in both assessor modes. The selected HTML fallback and its new labels must stay out of the assessor payload. The fixture also showed an href appended to the existing `full` excerpt. This demonstrates payload construction locally. No assessor request was made. - **ADR 0005 and ADR 0007.** Local embeddings use the new selected body text and descriptive labels, with replacement when the embedding input changes. Href metadata belongs only to the read result. A body alternative is the message's MIME body. An attached HTML document continues through the bounded attachment extractor. A CID image referenced by the body contributes its descriptive label and surrounding link to the read representation without entering attachment extraction. Preserve the assessor's legacy attachment metadata independently. - **ADR changes for ratification.** Amend 0001 §4 for storage of bounded body alternatives and read metadata, 0005 §3 for embedding input and invalidation, 0007 for separation of HTML body alternatives and referenced inline images from attachments, and 0008 §11 for the independent legacy body-part selection used by sign-off. Clarify 0003 §1 to document the preserved body-part selection and the exclusion of generated hrefs from the excerpt if the operator approves that correction. No mind-v1 amendment is proposed. **STOP for operator decision.** Byte-for-byte preservation of the legacy HTML conversion would preserve the href exposure. Proposed resolution for canonical review is to keep legacy source selection and existing text and metadata rules, exclude href attributes from the protected paths, and address already-derived signatures and excerpts under an explicit operator decision. #224 starts only after a canonical ACCOMMODATE and the operator resolves this STOP. Findings are from local generated MIME only. Live IMAP, live JMAP and deployed-mirror coverage are unsupported here. Please reply with **ACCOMMODATE** or **CLASH** for canonical fit.
Author
Member

#224 · operator §6 ruling on your STOP cbf2a7d6 · corr mail224-align

Piers ruled on your STOP (AskUserQuestion to the guide). This is his word within your grant (comment 46198). Post this ruling verbatim on #224 before you act on it.

  1. Fix the href exposure first, as a child of #224. File a child issue in dev/mail-mind-mcp. Its PR keeps href destinations out of the signature input, the sign_off scan and the full-mode assessor excerpt. Visible link words and the legacy body-part selection stay as they are. The PR gets its own §19 security review and the full merge gate in grant §4. It merges before the #224 feature work.
  2. Existing derived data: filter at read, re-derive later. The evidence paths (both evidence tools, signature and sign_off output) and the assessor payload drop href destinations when they build their output, so stored rows stop leaking without touching the deployed mirror. Put this read-time filter in the child PR. File a second child issue to re-derive or clean stored sign_off and body rows. Do not implement or run it: it needs a separate grant from Piers, because it touches the deployed mirror.

Order:

  • Implementation still starts only on mind-spec ACCOMMODATE (grant §3). If mind-spec answered 94f4583a before this ruling, or its answer does not cover the read-time filter and the child order, send it one follow-up fit question on those two points and wait for ACCOMMODATE.
  • A CLASH, or any new path by which body text, a link or an image label reaches evidence, assessor fields or an external service, is a STOP to the guide (grant §5).
  • Report the posted ruling, both child issue numbers and every mind-spec answer to the guide on corr mail224-align.

Honesty limit: the exposure is shown on generated MIME only. Do not claim how many deployed rows hold hrefs, or whether the deployed instance runs full mode. Record both as unmeasured.

#224 · operator §6 ruling on your STOP cbf2a7d6 · corr mail224-align Piers ruled on your STOP (AskUserQuestion to the guide). This is his word within your grant (comment 46198). Post this ruling verbatim on #224 before you act on it. 1. Fix the href exposure first, as a child of #224. File a child issue in dev/mail-mind-mcp. Its PR keeps href destinations out of the signature input, the sign_off scan and the full-mode assessor excerpt. Visible link words and the legacy body-part selection stay as they are. The PR gets its own §19 security review and the full merge gate in grant §4. It merges before the #224 feature work. 2. Existing derived data: filter at read, re-derive later. The evidence paths (both evidence tools, signature and sign_off output) and the assessor payload drop href destinations when they build their output, so stored rows stop leaking without touching the deployed mirror. Put this read-time filter in the child PR. File a second child issue to re-derive or clean stored sign_off and body rows. Do not implement or run it: it needs a separate grant from Piers, because it touches the deployed mirror. Order: - Implementation still starts only on mind-spec ACCOMMODATE (grant §3). If mind-spec answered 94f4583a before this ruling, or its answer does not cover the read-time filter and the child order, send it one follow-up fit question on those two points and wait for ACCOMMODATE. - A CLASH, or any new path by which body text, a link or an image label reaches evidence, assessor fields or an external service, is a STOP to the guide (grant §5). - Report the posted ruling, both child issue numbers and every mind-spec answer to the guide on corr mail224-align. Honesty limit: the exposure is shown on generated MIME only. Do not claim how many deployed rows hold hrefs, or whether the deployed instance runs full mode. Record both as unmeasured.
Author
Member

The operator ruling assigns #225 to prevent new href exposure and filter existing rendered hrefs when building signatures and assessor payloads. #225 merges before the HTML-body feature. #226 tracks stored-row cleanup under a separate grant. Implementation is awaiting mind-spec’s canonical-fit answer.

The [operator ruling](https://git.groupthink.asia/dev/mail-mind-mcp/issues/224#issuecomment-46218) assigns [#225](https://git.groupthink.asia/dev/mail-mind-mcp/issues/225) to prevent new href exposure and filter existing rendered hrefs when building signatures and assessor payloads. #225 merges before the HTML-body feature. [#226](https://git.groupthink.asia/dev/mail-mind-mcp/issues/226) tracks stored-row cleanup under a separate grant. Implementation is awaiting mind-spec’s canonical-fit answer.
Author
Member

STOP · Existing mail_read fence can close early on sender text

While checking #224 testing decision 5, I reproduced an ambiguous untrusted-content boundary with generated body text on #225 head 97c7b39a3a9858986f5afc5707c8d0036621f6fe. Both legacy inputs, a plain body and a converted HTML body, produced one opening fence line and two exact closing fence lines. The pinned wrap_untrusted places content between literal markers without escaping marker text inside the content. A reader that consumes the first matching closing marker can treat the remaining sender text as outside the fence. This check used generated content only. It did not exercise a downstream agent or use a mailbox.

PR #227 preserves the legacy read representation and fixes the separate evidence/assessment path in #225. The new finding is in the existing read boundary shared by both branches. The merge is paused under the #224 grant pending Piers's ruling.

Proposed disposition for Piers: allow #227 to merge after its remaining gates, and in #224 neutralize occurrences of both fence markers in the rendered payload across all mail_read body modes, including old rows. Preserve ordinary plain output and count the escaped body and metadata against max_chars. Add public single and batch checks that each message block contains exactly one real opener and closer. This would change display only for marker-like sender content. Other tools' existing wrappers would require separate scope if Piers wants them covered.

**STOP · Existing mail_read fence can close early on sender text** While checking #224 testing decision 5, I reproduced an ambiguous untrusted-content boundary with generated body text on #225 head `97c7b39a3a9858986f5afc5707c8d0036621f6fe`. Both legacy inputs, a plain body and a converted HTML body, produced one opening fence line and two exact closing fence lines. The pinned `wrap_untrusted` places content between literal markers without escaping marker text inside the content. A reader that consumes the first matching closing marker can treat the remaining sender text as outside the fence. This check used generated content only. It did not exercise a downstream agent or use a mailbox. PR #227 preserves the legacy read representation and fixes the separate evidence/assessment path in #225. The new finding is in the existing read boundary shared by both branches. The merge is paused under the #224 grant pending Piers's ruling. Proposed disposition for Piers: allow #227 to merge after its remaining gates, and in #224 neutralize occurrences of both fence markers in the rendered payload across all `mail_read` body modes, including old rows. Preserve ordinary plain output and count the escaped body and metadata against `max_chars`. Add public single and batch checks that each message block contains exactly one real opener and closer. This would change display only for marker-like sender content. Other tools' existing wrappers would require separate scope if Piers wants them covered.
Author
Member

#224 · operator §6 ruling on your STOP b484e288 (fence markers in sender text) · corr mail224-align

Piers ruled on your STOP (AskUserQuestion to the guide). This is his word within your grant (comment 46198). Post this ruling verbatim on #224 before you act on it.

  1. #227 (#225) may merge after its full grant §4 gate: independent Standards and Spec reviews with 0 open findings, the §19 security review posted on the PR, green exact-head CI and the raw-log audit. Its §19 review records the fence finding as pre-existing and out of #227's scope, with a link to the new child below.
  2. File one new child of #224 in dev/mail-mind-mcp. Its PR neutralizes both fence markers inside every payload that mail-mind passes to wrap_untrusted. That is all three call sites, not only mail_read:
    • mail_read, in every body mode, including old rows (server.py _read_text, about line 735);
    • mail_attachment (about line 819);
    • mail_evidence (about line 1017).
      Escaped body and metadata count against max_chars. Ordinary text without marker-like content renders unchanged. Public single and batch checks prove exactly one real opener and one real closer per message block, for each of the three tools.
  3. The child PR needs mind-spec ACCOMMODATE on a short design note before implementation, its own §19 security review, and the full grant §4 gate. It merges before the #224 feature work.
  4. Do not change imap-blade-mcp or any other repo. The guide drafts an upstream issue for imap-blade-mcp's wrap_untrusted; Piers reviews it before anyone files it.

A CLASH, or any further path by which sender text escapes a fence or reaches evidence, assessor fields or an external service, is a STOP to the guide.

Honesty limit: the finding is shown on generated content only. Do not claim how any downstream reader parses the fence, or that deployed rows hold marker-like text. Record both as unmeasured.

Report the posted ruling, the child issue number, every mind-spec answer and the #227 merge to the guide on corr mail224-align.

#224 · operator §6 ruling on your STOP b484e288 (fence markers in sender text) · corr mail224-align Piers ruled on your STOP (AskUserQuestion to the guide). This is his word within your grant (comment 46198). Post this ruling verbatim on #224 before you act on it. 1. #227 (#225) may merge after its full grant §4 gate: independent Standards and Spec reviews with 0 open findings, the §19 security review posted on the PR, green exact-head CI and the raw-log audit. Its §19 review records the fence finding as pre-existing and out of #227's scope, with a link to the new child below. 2. File one new child of #224 in dev/mail-mind-mcp. Its PR neutralizes both fence markers inside every payload that mail-mind passes to wrap_untrusted. That is all three call sites, not only mail_read: - mail_read, in every body mode, including old rows (server.py _read_text, about line 735); - mail_attachment (about line 819); - mail_evidence (about line 1017). Escaped body and metadata count against max_chars. Ordinary text without marker-like content renders unchanged. Public single and batch checks prove exactly one real opener and one real closer per message block, for each of the three tools. 3. The child PR needs mind-spec ACCOMMODATE on a short design note before implementation, its own §19 security review, and the full grant §4 gate. It merges before the #224 feature work. 4. Do not change imap-blade-mcp or any other repo. The guide drafts an upstream issue for imap-blade-mcp's wrap_untrusted; Piers reviews it before anyone files it. A CLASH, or any further path by which sender text escapes a fence or reaches evidence, assessor fields or an external service, is a STOP to the guide. Honesty limit: the finding is shown on generated content only. Do not claim how any downstream reader parses the fence, or that deployed rows hold marker-like text. Record both as unmeasured. Report the posted ruling, the child issue number, every mind-spec answer and the #227 merge to the guide on corr mail224-align.
Author
Member

#225 merged and closed. PR #227 landed on main as 3dc43c833fb8fbc24f965419685dd6b122bbff0f with both independent reviews, posted §19 review and disposition, exact-head CI and the raw-log audit complete. Merged PR · CI and audit

#228 now tracks all three wrapper call sites and must merge before the HTML feature. Its design awaits canonical fit. Operator ruling · #228 design

#225 merged and closed. PR #227 landed on main as `3dc43c833fb8fbc24f965419685dd6b122bbff0f` with both independent reviews, posted §19 review and disposition, exact-head CI and the raw-log audit complete. [Merged PR](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/227) · [CI and audit](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/227#issuecomment-46310) #228 now tracks all three wrapper call sites and must merge before the HTML feature. Its design awaits canonical fit. [Operator ruling](https://git.groupthink.asia/dev/mail-mind-mcp/issues/224#issuecomment-46317) · [#228 design](https://git.groupthink.asia/dev/mail-mind-mcp/issues/228#issuecomment-46322)
Author
Member

The Unicode fence prerequisite #228 is closed. PR #229 merged to main at 518bec4f495267839d05f649dc9b00225b973d01. The independent reviews, §19 security review and raw-log audit all cleared exact head da73e23596aff45154be47476e13eac3d94b2df3. CI reported 1,681 passed, 8 skipped and 30 deselected. #224 implementation can now begin.

The Unicode fence prerequisite [#228](https://git.groupthink.asia/dev/mail-mind-mcp/issues/228) is closed. [PR #229](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/229) merged to main at `518bec4f495267839d05f649dc9b00225b973d01`. The independent reviews, §19 security review and [raw-log audit](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/229#issuecomment-46675) all cleared exact head `da73e23596aff45154be47476e13eac3d94b2df3`. CI reported 1,681 passed, 8 skipped and 30 deselected. #224 implementation can now begin.
Author
Member

#224 ADR alignment addendum for ratification

  • ADR 0001 §4. Persist bounded, quote-trimmed plain and readable HTML alternatives, the selected source, and inert read metadata in the local mirror. The sync worker backfills historical rows in bounded passes, using an available raw copy before the source, records coverage, and preserves prior text when the original is unavailable.
  • ADR 0005 §3. The subject and selected readable text, including visible link and image labels in their body context, supply the existing local embedding pipeline. Extracted destinations are read metadata only. An input change invalidates the existing vectors, and a copy may reuse a vector only when its subject and selected text also match.
  • ADR 0007 §§2 and 5. An HTML body alternative uses the offline body converter. An attached HTML document remains attachment text. A referenced CID image in the HTML body's related scope is identified by MIME/JMAP part identity, has a body label, and is excluded from extraction. Other attachments keep their physical numbering and text associations.
  • ADR 0003 §1 and ADR 0008 §§2 and 11 continue to follow the ratified #225 decision. The assessor excerpt, evidence signature and sign-off continue from the protected legacy path. No field, field list, scope or consent change to mind-v1. Extracted hrefs enter none of the local index, embeddings, assessor, evidence, feed or snapshot.

Please reply ACCOMMODATE or CLASH to ratify these amendments for #224.

#224 ADR alignment addendum for ratification - ADR 0001 §4. Persist bounded, quote-trimmed plain and readable HTML alternatives, the selected source, and inert read metadata in the local mirror. The sync worker backfills historical rows in bounded passes, using an available raw copy before the source, records coverage, and preserves prior text when the original is unavailable. - ADR 0005 §3. The subject and selected readable text, including visible link and image labels in their body context, supply the existing local embedding pipeline. Extracted destinations are read metadata only. An input change invalidates the existing vectors, and a copy may reuse a vector only when its subject and selected text also match. - ADR 0007 §§2 and 5. An HTML body alternative uses the offline body converter. An attached HTML document remains attachment text. A referenced CID image in the HTML body's related scope is identified by MIME/JMAP part identity, has a body label, and is excluded from extraction. Other attachments keep their physical numbering and text associations. - ADR 0003 §1 and ADR 0008 §§2 and 11 continue to follow the ratified #225 decision. The assessor excerpt, evidence signature and sign-off continue from the protected legacy path. No field, field list, scope or consent change to mind-v1. Extracted hrefs enter none of the local index, embeddings, assessor, evidence, feed or snapshot. Please reply ACCOMMODATE or CLASH to ratify these amendments for #224.
Author
Member

Mind-spec returned ACCOMMODATE for the #224 ADR alignment addendum at comment 46893. Rat answer c2309d0a-87b1-4412-b913-492ad0d04dc8, from canonical session 6f54bbf8-9389-46fb-9c90-73b09c455611, correlation mail224-canonical. This covers ADR 0001 §4, 0005 §3, and 0007 §§2 and 5. The earlier #225 ratification for the protected paths continues to apply.

Mind-spec returned ACCOMMODATE for the #224 ADR alignment addendum at comment 46893. Rat answer c2309d0a-87b1-4412-b913-492ad0d04dc8, from canonical session 6f54bbf8-9389-46fb-9c90-73b09c455611, correlation mail224-canonical. This covers ADR 0001 §4, 0005 §3, and 0007 §§2 and 5. The earlier #225 ratification for the protected paths continues to apply.
Author
Member

STOP on #224

The independent Standards review of PR #230 found a fence-spoofing case at head a4a7c2595aaa594bb53f5993a5cb3c2db47aa674. A generated inline-image alt label ending one bracket short of the closing marker combines with a bracket added by the formatter to produce a literal closing marker. A local synthetic reproducer confirmed it. This could move a sender-controlled destination outside the trusted wrapper boundary in a consumer that honors the first closer. No production effect has been established. §19 security review

I have paused work at this head. PR #230 is open and unmerged. Please relay the STOP to Piers. The proposed correction is to escape the complete link line before budgeting it and add a generated regression for a marker formed across the formatter boundary. Implementation will wait for operator direction.

## STOP on #224 The independent Standards review of PR #230 found a fence-spoofing case at head `a4a7c2595aaa594bb53f5993a5cb3c2db47aa674`. A generated inline-image alt label ending one bracket short of the closing marker combines with a bracket added by the formatter to produce a literal closing marker. A local synthetic reproducer confirmed it. This could move a sender-controlled destination outside the trusted wrapper boundary in a consumer that honors the first closer. No production effect has been established. [§19 security review](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/230#issuecomment-46904) I have paused work at this head. PR #230 is open and unmerged. Please relay the STOP to Piers. The proposed correction is to escape the complete link line before budgeting it and add a generated regression for a marker formed across the formatter boundary. Implementation will wait for operator direction.
Author
Member

Operator ruling on your STOP 81723e24 (PR #230 head a4a7c25, review 46904, issue 46906): "Approve the fix (Recommended)".

The guide reproduced the finding at a4a7c25 on synthetic data: an image alt of "logo [/untrusted-email-content" yields a literal closing marker in _bounded_body; a full-marker alt is escaped. Only the image segment (server.py:799) appends "]" after escaped text.

Proceed under grant 46198:

  1. Post this ruling verbatim on #224.
  2. Escape each fully built link line (label, image labels and href together) before counting it against the budget, so the budget counts the escaped length.
  3. Add a generated regression for a marker formed across the formatter boundary. Include the image-alt case and a check that no rendered link line holds either literal marker. Keep the full-marker control.
  4. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237).
  5. The fix stays inside the fence design mind-spec accommodated for #228 (comment 46553), so no new ADR or fit check is needed. If the fix changes an ADR or a mind-v1 field, stop and report.
    Report the new head and each gate result to the guide and to mind-spec, as the grant requires.
Operator ruling on your STOP 81723e24 (PR #230 head a4a7c25, review 46904, issue 46906): "Approve the fix (Recommended)". The guide reproduced the finding at a4a7c25 on synthetic data: an image alt of "logo [/untrusted-email-content" yields a literal closing marker in _bounded_body; a full-marker alt is escaped. Only the image segment (server.py:799) appends "]" after escaped text. Proceed under grant 46198: 1. Post this ruling verbatim on #224. 2. Escape each fully built link line (label, image labels and href together) before counting it against the budget, so the budget counts the escaped length. 3. Add a generated regression for a marker formed across the formatter boundary. Include the image-alt case and a check that no rendered link line holds either literal marker. Keep the full-marker control. 4. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237). 5. The fix stays inside the fence design mind-spec accommodated for #228 (comment 46553), so no new ADR or fit check is needed. If the fix changes an ADR or a mind-v1 field, stop and report. Report the new head and each gate result to the guide and to mind-spec, as the grant requires.
Author
Member

STOP requested under operator grant 46198

The fresh review of PR #230 at e2dd2460228f587de9d453e628a7bbe54c5e495d found two exposure paths in generated messages.

  • An HTML link label can repeat text that the body removed at the quote cutoff. The output stayed inside the read-scoped fence, but bypassed the quote-trimming boundary.
  • A standalone named HTML document in raw multipart/mixed can be selected as the message body when the optional Content-Disposition header is omitted. The pinned IMAP body-structure path classifies that same generated part as an attachment. This can surface its text through mail_read even with attachment extraction disabled.

Spec review also found that nested booking tables can lose the association between the date and other fields, and valid omitted closing tags can drop visible text after hidden markup or lose row boundaries. The previous fence finding is covered by the passing generated regression for both markers.

Implementation and merge are paused. Please rule on whether to fix these findings within #224 and rerun the full gate. The tests described here used generated messages only. No live mailbox, reported itinerary or deployed mirror was accessed.

PR review record

## STOP requested under operator grant 46198 The fresh review of PR #230 at `e2dd2460228f587de9d453e628a7bbe54c5e495d` found two exposure paths in generated messages. - An HTML link label can repeat text that the body removed at the quote cutoff. The output stayed inside the read-scoped fence, but bypassed the quote-trimming boundary. - A standalone named HTML document in raw `multipart/mixed` can be selected as the message body when the optional Content-Disposition header is omitted. The pinned IMAP body-structure path classifies that same generated part as an attachment. This can surface its text through `mail_read` even with attachment extraction disabled. Spec review also found that nested booking tables can lose the association between the date and other fields, and valid omitted closing tags can drop visible text after hidden markup or lose row boundaries. The previous fence finding is covered by the passing generated regression for both markers. Implementation and merge are paused. Please rule on whether to fix these findings within #224 and rerun the full gate. The tests described here used generated messages only. No live mailbox, reported itinerary or deployed mirror was accessed. [PR review record](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/230#issuecomment-47030)
Author
Member

Operator ruling on your STOP 1f277eec (PR #230 head e2dd246, escalation 47031, review 47033): "Fix all four in #224 (Recommended)".

The guide reproduced all four at e2dd246 on generated data (probe: dd469-minds-2026-11-16/probes/probe230b/repro.py in the guide's coordination dir):

  1. An anchor spanning the quote cutoff puts "On ... wrote: > OLD-QUOTED-SECRET line" in the link label; the body text is trimmed.
  2. multipart/mixed text/html with name="report.html" and no Content-Disposition: raw_alternatives returns its text as html (iter_attachments is empty).
  3. A nested table splits "12 Dec | QF1" / "SYD-LHR" / "| 14A".
  4. A hidden div with an unclosed

    drops all later visible text; the same input with

    keeps it.

Proceed under grant 46198:

  1. Post this ruling verbatim on #224.
  2. Fix all four in PR #230:
    • a link label never carries text past the quote cutoff;
    • a named HTML part is attachment text, consistent with the pinned IMAP classifier and ADR 0007;
    • table row fields stay together through nested tables;
    • hidden-block state recovers when a tag is closed implicitly, so later visible text stays.
  3. Add a generated regression for each finding, failing on e2dd246 and passing on the new head. Keep the fence regressions.
  4. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237).
  5. No ADR or mind-v1 change is expected. If a fix needs one, or #224's body does not settle a fix, stop and report.
    Report the new head and each gate result to the guide and to mind-spec.
Operator ruling on your STOP 1f277eec (PR #230 head e2dd246, escalation 47031, review 47033): "Fix all four in #224 (Recommended)". The guide reproduced all four at e2dd246 on generated data (probe: dd469-minds-2026-11-16/probes/probe230b/repro.py in the guide's coordination dir): 1. An anchor spanning the quote cutoff puts "On ... wrote: > OLD-QUOTED-SECRET line" in the link label; the body text is trimmed. 2. multipart/mixed text/html with name="report.html" and no Content-Disposition: raw_alternatives returns its text as html (iter_attachments is empty). 3. A nested table splits "12 Dec | QF1" / "SYD-LHR" / "| 14A". 4. A hidden div with an unclosed <p> drops all later visible text; the same input with </p> keeps it. Proceed under grant 46198: 1. Post this ruling verbatim on #224. 2. Fix all four in PR #230: - a link label never carries text past the quote cutoff; - a named HTML part is attachment text, consistent with the pinned IMAP classifier and ADR 0007; - table row fields stay together through nested tables; - hidden-block state recovers when a tag is closed implicitly, so later visible text stays. 3. Add a generated regression for each finding, failing on e2dd246 and passing on the new head. Keep the fence regressions. 4. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237). 5. No ADR or mind-v1 change is expected. If a fix needs one, or #224's body does not settle a fix, stop and report. Report the new head and each gate result to the guide and to mind-spec.
Author
Member

STOP under grant 46198 — standalone HTML reaches the protected assessor input

The ruling in comment 47040 clears the four findings recorded in 47031. I wrote four generated public MCP regressions and reproduced all four on e2dd2460228f587de9d453e628a7bbe54c5e495d. Before changing the converter, I checked what happens when the named HTML document is the only text part.

A generated raw multipart/mixed message contains a text/html part with name=generated-report.html and no Content-Disposition. The raw fallback takes that named document as legacy body text through _message_text and EmailMessage.get_body, stores its text in protected_body_text, and includes it in the locally constructed full-mode assessor excerpt through assess.message_state. I observed GeneratedAttachmentOnly as the excerpt on both main 518bec4f495267839d05f649dc9b00225b973d01 and PR #230 head e2dd2460228f587de9d453e628a7bbe54c5e495d. This is a pre-existing protected-input path separate from the approved read-side fix. No assessor was called and no data left the generated fixture run.

The grant and canonical fit preserve the existing protected inputs, so using the new classifier in that path requires an explicit disposition. Please relay a ruling on whether to correct protected raw-body classification as part of #224 or track it separately, and whether #224 may proceed while it is open. If the protected path changes, request mind-spec's canonical determination before implementation and ratify any needed ADR amendment before merge.

The four regressions are local and uncommitted. No production code changed after the new ruling. PR #230 and #224 remain open. No live mailbox, itinerary, deployed mirror or external assessor was accessed.

## STOP under grant 46198 — standalone HTML reaches the protected assessor input The ruling in comment 47040 clears the four findings recorded in 47031. I wrote four generated public MCP regressions and reproduced all four on `e2dd2460228f587de9d453e628a7bbe54c5e495d`. Before changing the converter, I checked what happens when the named HTML document is the only text part. A generated raw `multipart/mixed` message contains a `text/html` part with `name=generated-report.html` and no Content-Disposition. The raw fallback takes that named document as legacy body text through `_message_text` and `EmailMessage.get_body`, stores its text in `protected_body_text`, and includes it in the locally constructed full-mode assessor `excerpt` through `assess.message_state`. I observed `GeneratedAttachmentOnly` as the excerpt on both main `518bec4f495267839d05f649dc9b00225b973d01` and PR #230 head `e2dd2460228f587de9d453e628a7bbe54c5e495d`. This is a pre-existing protected-input path separate from the approved read-side fix. No assessor was called and no data left the generated fixture run. The grant and canonical fit preserve the existing protected inputs, so using the new classifier in that path requires an explicit disposition. Please relay a ruling on whether to correct protected raw-body classification as part of #224 or track it separately, and whether #224 may proceed while it is open. If the protected path changes, request mind-spec's canonical determination before implementation and ratify any needed ADR amendment before merge. The four regressions are local and uncommitted. No production code changed after the new ruling. PR #230 and #224 remain open. No live mailbox, itinerary, deployed mirror or external assessor was accessed.
Author
Member

Operator ruling on your STOP ffac99f4 (escalation #224 comment 47056): "Track separately (Recommended)".

The guide reproduced it at e2dd246 on generated data (probe: dd469-minds-2026-11-16/probes/probe230c/repro.py in the guide's coordination dir): _message_text returns protected "GeneratedAttachmentOnly" with no attachments, and assess.excerpt returns "GeneratedAttachmentOnly". The selection code is the same on main 518bec4.

The guide filed it as dev/mail-mind-mcp#231 (needs-triage). It needs mind-spec's canonical determination before any implementation.

Proceed under grant 46198:

  1. Post this ruling verbatim on #224, with a link to #231.
  2. Do not change the protected raw-body path, protected_body_text or the assessor excerpt in #224 or PR #230. That path stays as on main.
  3. Continue the four approved read-side fixes from the 47040 ruling, with the four generated regressions you already wrote (each failing on e2dd246, passing on the new head). Keep the fence regressions.
  4. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237).
  5. If a read-side fix cannot land without changing the protected path, stop and report.
    Report the new head and each gate result to the guide and to mind-spec.

Separate protected-input issue #231

Operator ruling on your STOP ffac99f4 (escalation #224 comment 47056): "Track separately (Recommended)". The guide reproduced it at e2dd246 on generated data (probe: dd469-minds-2026-11-16/probes/probe230c/repro.py in the guide's coordination dir): _message_text returns protected "GeneratedAttachmentOnly" with no attachments, and assess.excerpt returns "GeneratedAttachmentOnly". The selection code is the same on main 518bec4. The guide filed it as dev/mail-mind-mcp#231 (needs-triage). It needs mind-spec's canonical determination before any implementation. Proceed under grant 46198: 1. Post this ruling verbatim on #224, with a link to #231. 2. Do not change the protected raw-body path, protected_body_text or the assessor excerpt in #224 or PR #230. That path stays as on main. 3. Continue the four approved read-side fixes from the 47040 ruling, with the four generated regressions you already wrote (each failing on e2dd246, passing on the new head). Keep the fence regressions. 4. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237). 5. If a read-side fix cannot land without changing the protected path, stop and report. Report the new head and each gate result to the guide and to mind-spec. [Separate protected-input issue #231](https://git.groupthink.asia/dev/mail-mind-mcp/issues/231)
Author
Member

Security STOP for #224 and PR #230 at 4d493f233fe265e1de3e6544cf6ba36235a0ef60

The operator approved correcting named HTML handling in the read path and preserving protected values, with the legacy full assessor excerpt tracked in #231. Independent Spec review found a new path for the filename of a previously unlisted named HTML document. Raw ingest adds it to row.attachments, and outbox.forward_body copies it to the quoted body of a forward draft. The draft worker can save that body to the account’s Drafts mailbox. A generated MIME probe verified that the local draft formatter includes the recovered filename on this head and omits it on main 518bec4f495267839d05f649dc9b00225b973d01. The probe created no draft and contacted no mailbox or assessor. This is separate from #231.

Independent Spec returned FAIL with 3 open findings. The other two findings are that historical backfill removes the document from the read body and FTS without restoring its attachment listing, and a valid omitted </li> in a hidden list item can suppress the next visible item and subsequent text. Standards returned FAIL with 1 confirmed open finding because the latest commit lacks the repository-required co-author trailer. The Standards reviewer also flagged for verification a possible fence-marker rendering issue in names newly exposed by mail_attachment. It is unverified.

New implementation and merge are paused pending the operator’s ruling. Please route a decision through the guide on keeping the recovered filename available to the read and attachment tools while preserving the previous forward-draft inputs, completing the historical attachment listing and hidden-list handling, correcting the commit trailer, and verifying the candidate filename fencing issue with generated input. If that check confirms a new security issue, it will be reported before repair. The legacy excerpt stays in #231 under the existing ruling. Any revised head will need both independent reviews, a fresh §19 review, green exact-head CI and the raw-log audit.

## Security STOP for #224 and PR #230 at `4d493f233fe265e1de3e6544cf6ba36235a0ef60` The operator approved correcting named HTML handling in the read path and preserving protected values, with the legacy full assessor excerpt tracked in #231. Independent Spec review found a new path for the filename of a previously unlisted named HTML document. Raw ingest adds it to `row.attachments`, and `outbox.forward_body` copies it to the quoted body of a forward draft. The draft worker can save that body to the account’s Drafts mailbox. A generated MIME probe verified that the local draft formatter includes the recovered filename on this head and omits it on main `518bec4f495267839d05f649dc9b00225b973d01`. The probe created no draft and contacted no mailbox or assessor. This is separate from #231. Independent Spec returned **FAIL with 3 open findings**. The other two findings are that historical backfill removes the document from the read body and FTS without restoring its attachment listing, and a valid omitted `</li>` in a hidden list item can suppress the next visible item and subsequent text. Standards returned **FAIL with 1 confirmed open finding** because the latest commit lacks the repository-required co-author trailer. The Standards reviewer also flagged for verification a possible fence-marker rendering issue in names newly exposed by `mail_attachment`. It is unverified. New implementation and merge are paused pending the operator’s ruling. Please route a decision through the guide on keeping the recovered filename available to the read and attachment tools while preserving the previous forward-draft inputs, completing the historical attachment listing and hidden-list handling, correcting the commit trailer, and verifying the candidate filename fencing issue with generated input. If that check confirms a new security issue, it will be reported before repair. The legacy excerpt stays in #231 under the existing ruling. Any revised head will need both independent reviews, a fresh §19 review, green exact-head CI and the raw-log audit.
Author
Member

Operator ruling on your STOP b4acd73f (PR #230 head 4d493f2, escalation #224 comment 47241, §19 47244): "Approve bounded fixes (Recommended)".

The guide reproduced two findings at 4d493f2 on generated data (probe: dd469-minds-2026-11-16/probes/probe230d/repro.py in the guide's coordination dir):

  • A recovered named HTML document's filename reaches outbox.forward_body ("Attachments (1): generated-report.html"); main lists no such attachment.
  • <ul><li style='display:none'>hidden<li>VisibleItem</ul><p>After</p> gives '' as the selected body; the same input with
  • gives 'VisibleItem\n\nAfter'.
    The guide did not reproduce the backfill listing, the trailer or the filename fencing candidate.

Proceed under grant 46198:

  1. Post this ruling verbatim on #224.
  2. In PR #230:
    • keep the recovered filename available to the read and attachment tools;
    • give forward drafts exactly the inputs they had on main 518bec4f: no recovered-document filename in forward_body;
    • complete the historical backfill so a document removed from the read body and FTS appears in the attachment listing;
    • recover hidden-block state when an
    • is closed implicitly, so later visible items and text stay;
    • add the repository-required co-author trailer to every commit that lacks it.
  3. Check the candidate fence-marker issue in filenames that mail_attachment now shows, with generated input only. If it confirms a new security issue, STOP and report before any repair.
  4. Add a generated regression for each fix, failing on 4d493f2 and passing on the new head. Keep every earlier regression.
  5. The protected assessor excerpt stays as on main (tracked in #231). Do not change it.
  6. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237).
    Report the new head and each gate result to the guide and to mind-spec.
Operator ruling on your STOP b4acd73f (PR #230 head 4d493f2, escalation #224 comment 47241, §19 47244): "Approve bounded fixes (Recommended)". The guide reproduced two findings at 4d493f2 on generated data (probe: dd469-minds-2026-11-16/probes/probe230d/repro.py in the guide's coordination dir): - A recovered named HTML document's filename reaches outbox.forward_body ("Attachments (1): generated-report.html"); main lists no such attachment. - `<ul><li style='display:none'>hidden<li>VisibleItem</ul><p>After</p>` gives '' as the selected body; the same input with </li> gives 'VisibleItem\n\nAfter'. The guide did not reproduce the backfill listing, the trailer or the filename fencing candidate. Proceed under grant 46198: 1. Post this ruling verbatim on #224. 2. In PR #230: - keep the recovered filename available to the read and attachment tools; - give forward drafts exactly the inputs they had on main 518bec4f: no recovered-document filename in forward_body; - complete the historical backfill so a document removed from the read body and FTS appears in the attachment listing; - recover hidden-block state when an </li> is closed implicitly, so later visible items and text stay; - add the repository-required co-author trailer to every commit that lacks it. 3. Check the candidate fence-marker issue in filenames that mail_attachment now shows, with generated input only. If it confirms a new security issue, STOP and report before any repair. 4. Add a generated regression for each fix, failing on 4d493f2 and passing on the new head. Keep every earlier regression. 5. The protected assessor excerpt stays as on main (tracked in #231). Do not change it. 6. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237). Report the new head and each gate result to the guide and to mind-spec.
Author
Member

Security STOP for a recovered filename in mail_attachment

The operator’s bounded-fix ruling is posted verbatim in comment 47252. Its required generated check confirms a new path to a fence-marker rendering problem on exact PR #230 head 4d493f233fe265e1de3e6544cf6ba36235a0ef60.

A generated multipart MIME message contains a standalone text/html document with no Content-Disposition. Its MIME name contains the literal opening and closing fence markers with a generated word between them. mail_read emits exactly one opening and one closing marker. mail_attachment, with extraction enabled, returns the file name before the real fenced text and emits two opening and two closing markers. A reader taking the first pair extracts the name’s generated text instead of the attachment body. On main 518bec4f495267839d05f649dc9b00225b973d01, the same fixture returns not_found because that document has no attachment entry. The unsafe header formatter already exists on main for previously visible attachments. This PR makes it reachable for the newly recovered files. No real content, mail service, or external assessor was used.

No production edits were made after the ruling. Please route an operator decision through the guide on escaping reserved fence markers in the mail_attachment file name and adding the generated public-tool regression alongside the already approved fixes. Implementation and merge are paused pending that decision. The protected assessor excerpt remains under #231.

## Security STOP for a recovered filename in `mail_attachment` The operator’s bounded-fix ruling is posted verbatim in [comment 47252](https://git.groupthink.asia/dev/mail-mind-mcp/issues/224#issuecomment-47252). Its required generated check confirms a new path to a fence-marker rendering problem on exact PR #230 head `4d493f233fe265e1de3e6544cf6ba36235a0ef60`. A generated multipart MIME message contains a standalone `text/html` document with no Content-Disposition. Its MIME name contains the literal opening and closing fence markers with a generated word between them. `mail_read` emits exactly one opening and one closing marker. `mail_attachment`, with extraction enabled, returns the file name before the real fenced text and emits two opening and two closing markers. A reader taking the first pair extracts the name’s generated text instead of the attachment body. On main `518bec4f495267839d05f649dc9b00225b973d01`, the same fixture returns `not_found` because that document has no attachment entry. The unsafe header formatter already exists on main for previously visible attachments. This PR makes it reachable for the newly recovered files. No real content, mail service, or external assessor was used. No production edits were made after the ruling. Please route an operator decision through the guide on escaping reserved fence markers in the `mail_attachment` file name and adding the generated public-tool regression alongside the already approved fixes. Implementation and merge are paused pending that decision. The protected assessor excerpt remains under #231.
Author
Member

Operator ruling on your STOP c205ef4c (PR #230 head 4d493f2, #224 comment 47266, §19 47269): "Escape all header fields (Recommended)".

The guide confirmed the mechanism at 4d493f2: sanitize_line keeps "[untrusted-email-content]" and "[/untrusted-email-content]" in a filename unchanged, and mail_attachment writes file: {filename} (server.py:881) outside the fence without _escape_fence_markers. The same header line exists on main (server.py:827), but there a named HTML document gives not_found.

Proceed under grant 46198:

  1. Post this ruling verbatim on #224.
  2. In mail_attachment, apply _escape_fence_markers to every sender-controlled header value: the file name and the type.
  3. Add a generated regression: a raw MIME name and a Content-Type holding both markers give exactly one opener and one closer in the mail_attachment output, and a first-pair reader gets only the attachment text. It fails on 4d493f2 and passes on the new head.
  4. Then resume the bounded fixes from ruling f70fd230 (comment 47252), with their regressions.
  5. The protected assessor excerpt stays as on main (#231).
  6. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237).
    Report the new head and each gate result to the guide and to mind-spec.
Operator ruling on your STOP c205ef4c (PR #230 head 4d493f2, #224 comment 47266, §19 47269): "Escape all header fields (Recommended)". The guide confirmed the mechanism at 4d493f2: sanitize_line keeps "[untrusted-email-content]" and "[/untrusted-email-content]" in a filename unchanged, and mail_attachment writes `file: {filename}` (server.py:881) outside the fence without _escape_fence_markers. The same header line exists on main (server.py:827), but there a named HTML document gives not_found. Proceed under grant 46198: 1. Post this ruling verbatim on #224. 2. In mail_attachment, apply _escape_fence_markers to every sender-controlled header value: the file name and the type. 3. Add a generated regression: a raw MIME name and a Content-Type holding both markers give exactly one opener and one closer in the mail_attachment output, and a first-pair reader gets only the attachment text. It fails on 4d493f2 and passes on the new head. 4. Then resume the bounded fixes from ruling f70fd230 (comment 47252), with their regressions. 5. The protected assessor excerpt stays as on main (#231). 6. Rerun the full gate on the new exact head: independent Standards and Spec reviews (each PASS, 0 open findings), a fresh §19 security review, green exact-head CI and the raw-log audit (dev/stables#2237). Report the new head and each gate result to the guide and to mind-spec.
Author
Member

STOP on PR #230 · table-cell quote cutoff

The independent Standards review of 02a1186c9ac1b7b78c5c40e31ea43b9953ea1590 passed with zero findings. The independent Spec review failed with two findings. The security finding breaches the quote cutoff approved in operator comment 47040.

I mirrored a generated HTML-only message through the raw IMAP fixture in clean exports of main 518bec4f495267839d05f649dc9b00225b973d01 and the PR head. Its anchor inside a table cell contains visible text, a <br>, an On … wrote: line, another <br> and a generated quote token. Main returns only Visible and a keyword search misses the quote token. The PR head returns the quote token twice in the fenced read, once in the body and once in the link label. Keyword search finds the token. The selected body contains it and is the local embedding input. The protected full assessor excerpt is Visible on both commits. The reproduction used no live mailbox, forwarding or external assessment call. The reviewer found no path from this case to evidence, assessor fields or an external service.

The second finding is ordinary rendering loss. A hidden table cell with an omitted optional end tag suppresses the next visible cell and following body. Four generated public-tool regressions reproduced it. The local working tree contains an uncommitted candidate for that separate defect. The Forge head and main are unchanged.

No merge or closure. Requesting the operator's ruling through the guide on repairing both regressions in #224. Preserve quote detection across line breaks inside table cells, respect the same cutoff in body text and link labels, keep rendered table fields grouped, and add generated public-tool regressions for reads and indexing. Complete the hidden-cell regression and rerun all gates on the new exact head if authorized. The legacy assessor excerpt remains under the existing #231 ruling.

## STOP on PR #230 · table-cell quote cutoff The independent Standards review of `02a1186c9ac1b7b78c5c40e31ea43b9953ea1590` passed with zero findings. The independent Spec review failed with two findings. The security finding breaches the quote cutoff approved in [operator comment 47040](https://git.groupthink.asia/dev/mail-mind-mcp/issues/224#issuecomment-47040). I mirrored a generated HTML-only message through the raw IMAP fixture in clean exports of main `518bec4f495267839d05f649dc9b00225b973d01` and the PR head. Its anchor inside a table cell contains visible text, a `<br>`, an `On … wrote:` line, another `<br>` and a generated quote token. Main returns only `Visible` and a keyword search misses the quote token. The PR head returns the quote token twice in the fenced read, once in the body and once in the link label. Keyword search finds the token. The selected body contains it and is the local embedding input. The protected full assessor excerpt is `Visible` on both commits. The reproduction used no live mailbox, forwarding or external assessment call. The reviewer found no path from this case to evidence, assessor fields or an external service. The second finding is ordinary rendering loss. A hidden table cell with an omitted optional end tag suppresses the next visible cell and following body. Four generated public-tool regressions reproduced it. The local working tree contains an uncommitted candidate for that separate defect. The Forge head and main are unchanged. No merge or closure. Requesting the operator's ruling through the guide on repairing both regressions in #224. Preserve quote detection across line breaks inside table cells, respect the same cutoff in body text and link labels, keep rendered table fields grouped, and add generated public-tool regressions for reads and indexing. Complete the hidden-cell regression and rerun all gates on the new exact head if authorized. The legacy assessor excerpt remains under the existing #231 ruling.
Author
Member

Operator ruling on STOP 6 (your ask 6d5a74dc, PR #230 head 02a1186c), relayed by the guide session eb0cd42f. The operator chose "Approve bounded fixes".

I reproduced both findings with generated HTML only (probes/probe230e in the coordination dir):

  • A link in a table cell with "Visible
    On Mon, 1 Jan 2026, a@example.test wrote:
    QTOKEN7731" gives html_body.raw_alternatives().selected = "Visible On Mon, 1 Jan 2026, a@example.test wrote: QTOKEN7731" on the head. The same link in a

    gives "Visible". Main's ingest._message_text gives read="Visible".

  • A hidden with no closing tag gives "" on the head. With it gives "VisibleCell\n\nAfter". Main's ingest path also gives "" for this case.

Authorized scope, within #224 under grant 46198:

  1. Keep line breaks through quote trimming before table fields are grouped.
  2. Apply the same quote cutoff to the body text, link labels, keyword search and the local embedding input.
  3. Fix the hidden-cell case with an omitted optional end tag, so the visible cells and the following body stay.
  4. Add generated public-tool regressions for read and indexing, for both table and quote cases.
  5. Keep the protected legacy paths. The assessor excerpt stays under the #231 ruling.
  6. Rerun the full gate on the new exact head: reviews, the section 19 security review, CI and the raw-log audit.

Standing limits are unchanged. Use generated messages only. Do not read a real mailbox, the deployed mirror or the deployed config. Do not change imap-blade-mcp or any other repo. No merge, release, tag or deploy. Send a STOP for anything outside this scope.

Operator ruling on STOP 6 (your ask 6d5a74dc, PR #230 head 02a1186c), relayed by the guide session eb0cd42f. The operator chose "Approve bounded fixes". I reproduced both findings with generated HTML only (probes/probe230e in the coordination dir): - A link in a table cell with "Visible<br>On Mon, 1 Jan 2026, a@example.test wrote:<br>QTOKEN7731" gives html_body.raw_alternatives().selected = "Visible On Mon, 1 Jan 2026, a@example.test wrote: QTOKEN7731" on the head. The same link in a <p> gives "Visible". Main's ingest._message_text gives read="Visible". - A hidden <td> with no closing tag gives "" on the head. With </td> it gives "VisibleCell\n\nAfter". Main's ingest path also gives "" for this case. Authorized scope, within #224 under grant 46198: 1. Keep line breaks through quote trimming before table fields are grouped. 2. Apply the same quote cutoff to the body text, link labels, keyword search and the local embedding input. 3. Fix the hidden-cell case with an omitted optional end tag, so the visible cells and the following body stay. 4. Add generated public-tool regressions for read and indexing, for both table and quote cases. 5. Keep the protected legacy paths. The assessor excerpt stays under the #231 ruling. 6. Rerun the full gate on the new exact head: reviews, the section 19 security review, CI and the raw-log audit. Standing limits are unchanged. Use generated messages only. Do not read a real mailbox, the deployed mirror or the deployed config. Do not change imap-blade-mcp or any other repo. No merge, release, tag or deploy. Send a STOP for anything outside this scope.
Author
Member

STOP — §19 security gate failed on PR #230 at exact head f2d96f2fdf4553981e461f3933a1f6096a33c579.

The independent Standards review reported FAIL, 1 open finding. The independent Spec review reported PASS, 0 open findings, with 38 focused fixture tests passing. A generated raw IMAP MIME message confirmed the Standards finding via the public MCP tools. The converter folds literal newlines inside a table cell's <pre> before identifying the quoted reply. With a generated example link around that text, the unique quoted token appeared twice in mail_read (body and link label), and mail_search returned the message for that token. The pinned legacy converter stopped at the reply header. The assessor excerpt was Visible, its legacy value.

The affected selected text also feeds local embedding input. This fixture exercised reads and keyword search with generated data. No external service, real mailbox or deployed mirror was used. The protected evidence and assessor paths are unchanged by this commit.

Operator ruling 47294 requires a STOP for findings outside the bounded fixes and prohibits merge. No repair has been started for this finding. Escalating to the guide for operator disposition. PR #230 will remain unmerged and #224 will remain open. The already-started exact-head CI and log audit are independent of this STOP.

**STOP — §19 security gate failed on PR #230 at exact head `f2d96f2fdf4553981e461f3933a1f6096a33c579`.** The independent Standards review reported **FAIL, 1 open finding**. The independent Spec review reported **PASS, 0 open findings**, with 38 focused fixture tests passing. A generated raw IMAP MIME message confirmed the Standards finding via the public MCP tools. The converter folds literal newlines inside a table cell's `<pre>` before identifying the quoted reply. With a generated example link around that text, the unique quoted token appeared twice in `mail_read` (body and link label), and `mail_search` returned the message for that token. The pinned legacy converter stopped at the reply header. The assessor excerpt was `Visible`, its legacy value. The affected selected text also feeds local embedding input. This fixture exercised reads and keyword search with generated data. No external service, real mailbox or deployed mirror was used. The protected evidence and assessor paths are unchanged by this commit. Operator ruling [47294](https://git.groupthink.asia/dev/mail-mind-mcp/issues/224#issuecomment-47294) requires a STOP for findings outside the bounded fixes and prohibits merge. No repair has been started for this finding. Escalating to the guide for operator disposition. PR #230 will remain unmerged and #224 will remain open. The already-started exact-head CI and log audit are independent of this STOP.
Author
Member

Operator ruling on STOP 7 (your ask f2fea134, PR #230 head f2d96f2), relayed by the guide session eb0cd42f. The operator chose "Fix the whole class".

I reproduced the finding with generated HTML only (probes/probe230f in the coordination dir). On f2d96f2, html_body.raw_alternatives().selected gives "Visible On Mon, 1 Jan 2026, a@example.test wrote: QTOKEN8842" for:

  •  inside a table cell;
    
  •  holding a link inside a table cell;
    
  •  outside any table.
    

The scope is therefore wider than the review found. The
-in-cell control gives "Visible". Main's ingest._message_text gives read="Visible" for all four cases.

This is the third quote-cutoff STOP on the raw HTML path. Authorized scope, within #224 under grant 46198:

  1. Run quote detection on line-preserving text before any whitespace folding, on every raw-path route.
  2. Enumerate the routes that carry line structure. At least cover:
    , CSS white-space pre, pre-wrap and pre-line, , <br>, block boundaries, table cells and link labels. Record the list in the PR.</li>
    <li>Add one generated public-tool regression per route, covering mail_read (body and link label), keyword search and the local embedding input.</li>
    <li>Keep the protected legacy paths. The assessor excerpt stays under the #231 ruling.</li>
    <li>Rerun the full gate on the new exact head: reviews, the section 19 security review, CI and the raw-log audit.</li>
    </ol>
    <p dir="auto">Standing limits are unchanged. Use generated messages only. Do not read a real mailbox, the deployed mirror or the deployed config. Do not change imap-blade-mcp or any other repo. PR #230 stays unmerged. No release, tag or deploy. Send a STOP for anything outside this scope.</p>
    </body></html>
Operator ruling on STOP 7 (your ask f2fea134, PR #230 head f2d96f2), relayed by the guide session eb0cd42f. The operator chose "Fix the whole class". I reproduced the finding with generated HTML only (probes/probe230f in the coordination dir). On f2d96f2, html_body.raw_alternatives().selected gives "Visible On Mon, 1 Jan 2026, a@example.test wrote: QTOKEN8842" for: - <pre> inside a table cell; - <pre> holding a link inside a table cell; - <pre> outside any table. The scope is therefore wider than the review found. The <br>-in-cell control gives "Visible". Main's ingest._message_text gives read="Visible" for all four cases. This is the third quote-cutoff STOP on the raw HTML path. Authorized scope, within #224 under grant 46198: 1. Run quote detection on line-preserving text before any whitespace folding, on every raw-path route. 2. Enumerate the routes that carry line structure. At least cover: <pre>, CSS white-space pre, pre-wrap and pre-line, <textarea>, <br>, block boundaries, table cells and link labels. Record the list in the PR. 3. Add one generated public-tool regression per route, covering mail_read (body and link label), keyword search and the local embedding input. 4. Keep the protected legacy paths. The assessor excerpt stays under the #231 ruling. 5. Rerun the full gate on the new exact head: reviews, the section 19 security review, CI and the raw-log audit. Standing limits are unchanged. Use generated messages only. Do not read a real mailbox, the deployed mirror or the deployed config. Do not change imap-blade-mcp or any other repo. PR #230 stays unmerged. No release, tag or deploy. Send a STOP for anything outside this scope.
Author
Member

Implementation and fixture verification complete. PR #230 remains unmerged and #224 stays open under operator ruling 47305.

Exact head 91aacd4d4440b5395f0b1efbf6f694cd91f9bda4 makes HTML-only and stub-only bookings readable, with explicit body choice, fenced CTA destinations and inline CID labels. It also adds resumable historical indexing. The final repair preserves raw HTML line structure through quote detection before formatting, and applies the same cutoff to the read body and link labels. The generated regression record lists the tested routes.

The independent Standards and Spec reviews and §19 security review each passed with 0 findings. Exact-head CI and local pytest each reported 1,731 passed, 8 skipped and 30 deselected. The raw-log audit found zero matches on all five required patterns. See the full gate record.

The six #224 testing decisions were verified with generated MIME and JMAP fixtures and deterministic local embedding inputs. Live IMAP, live JMAP, the reported itinerary, deployed mirror backfill and the production embedding model remain unsupported. The existing protected behavior tracked in #231 remains under its separate ruling.

**Implementation and fixture verification complete. PR #230 remains unmerged and #224 stays open under [operator ruling 47305](https://git.groupthink.asia/dev/mail-mind-mcp/issues/224#issuecomment-47305).** Exact head `91aacd4d4440b5395f0b1efbf6f694cd91f9bda4` makes HTML-only and stub-only bookings readable, with explicit body choice, fenced CTA destinations and inline CID labels. It also adds resumable historical indexing. The final repair preserves raw HTML line structure through quote detection before formatting, and applies the same cutoff to the read body and link labels. The [generated regression record](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/230#issuecomment-47314) lists the tested routes. The independent Standards and Spec reviews and §19 security review each passed with 0 findings. Exact-head CI and local pytest each reported 1,731 passed, 8 skipped and 30 deselected. The raw-log audit found zero matches on all five required patterns. See the [full gate record](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/230#issuecomment-47322). The six #224 testing decisions were verified with generated MIME and JMAP fixtures and deterministic local embedding inputs. Live IMAP, live JMAP, the reported itinerary, deployed mirror backfill and the production embedding model remain unsupported. The existing protected behavior tracked in #231 remains under its separate ruling.
Author
Member

Operator ruling on PR #230 (your note a6229898), relayed by the guide session eb0cd42f. The operator chose "Merge under grant".

The "PR #230 stays unmerged" line in my STOP 6 and STOP 7 relays was the guide's own wording, not the operator's. The operator has now lifted it. Grant 46198 governs the merge.

Gate record the guide checked:

  • exact head 91aacd4d44;
  • Standards, Spec and section 19 PASS with 0 findings (PR c47319, c47316);
  • CI 139 and the local suite each passed 1,731 tests, and the raw-log audit had zero hits (PR c47322);
  • mergeable on main 518bec4;
  • svd-classify-diff over 518bec4..91aacd4 gives T2, raised by the ADR 0001, 0005 and 0007 edits;
  • mind-spec accommodated the ADR addendum (#224 c46893, c46895).

Steps:

  1. Before merging, check that main is still 518bec4 and the PR head is still 91aacd4. If either moved, stop and report.
  2. Merge PR #230 pinned to the head: head_commit_id 91aacd4d44.
  3. Check that the merge commit is an ancestor of origin/main.
  4. Close #224 with the completion evidence that its testing decisions require.
  5. Report the merge commit and the closing comment to the guide and to mind-spec, as the grant requires.

There is no release, tag, version bump or deploy. #231 stays under its separate ruling.

Operator ruling on PR #230 (your note a6229898), relayed by the guide session eb0cd42f. The operator chose "Merge under grant". The "PR #230 stays unmerged" line in my STOP 6 and STOP 7 relays was the guide's own wording, not the operator's. The operator has now lifted it. Grant 46198 governs the merge. Gate record the guide checked: - exact head 91aacd4d4440b5395f0b1efbf6f694cd91f9bda4; - Standards, Spec and section 19 PASS with 0 findings (PR c47319, c47316); - CI 139 and the local suite each passed 1,731 tests, and the raw-log audit had zero hits (PR c47322); - mergeable on main 518bec4; - svd-classify-diff over 518bec4..91aacd4 gives T2, raised by the ADR 0001, 0005 and 0007 edits; - mind-spec accommodated the ADR addendum (#224 c46893, c46895). Steps: 1. Before merging, check that main is still 518bec4 and the PR head is still 91aacd4. If either moved, stop and report. 2. Merge PR #230 pinned to the head: head_commit_id 91aacd4d4440b5395f0b1efbf6f694cd91f9bda4. 3. Check that the merge commit is an ancestor of origin/main. 4. Close #224 with the completion evidence that its testing decisions require. 5. Report the merge commit and the closing comment to the guide and to mind-spec, as the grant requires. There is no release, tag, version bump or deploy. #231 stays under its separate ruling.
Author
Member

Implemented in PR #230 and squash-merged under the operator’s authorization. Verified that merge commit 2a2492b352bb1a5d983a80bf4763a703a7dbb284 is on origin/main, has the expected parent 518bec4, and has the same tree as reviewed head 91aacd4.

All six testing decisions passed with generated fixtures.

  1. Public mail_read returned the date, flight, drop-off, and verbatim “Quoted” status from a synthetic itinerary through raw IMAP, section-based IMAP, and JMAP. With attachment extraction disabled, the image-only CTA appeared with its label and destination inside the untrusted-content fence, and the referenced PNG was omitted from unsupported attachments.
  2. mail_search found the HTML-only flight number and returned a snippet from the itinerary. Deterministic local embedding inputs contained itinerary text and excluded the extracted destination.
  3. Default selection covered missing, blank, and known-stub plain bodies, short meaningful plain text, boilerplate followed by meaningful text, link-free HTML, and unusable HTML. Explicit plain and html_text modes and the unavailable-part response were exercised.
  4. Fresh and backfilled rows preserved text-anchor metadata, the image filename fallback, and lookup of a distinct same-name attachment. The converter made zero external requests.
  5. Sender-controlled newlines and fence-like text stayed fenced. Single and batch reads enforced the character budget and handled destinations that crossed it without returning a partial URL.
  6. An interrupted historical backfill resumed with stable IDs, refreshed snippets and keyword matches, replacement embedding chunks, and explicit HTML reads for older multipart messages. A repeated pass produced stable results, and a missing original retained its prior usable content.

Independent Standards, Spec, and §19 security reviews each passed with zero findings. Exact-head CI and local pytest each reported 1,731 passed, 8 skipped, 30 deselected. The raw-log audit found zero matches for all five required failure patterns. Review record · Security review · CI and raw-log audit · Fixture route coverage.

Unsupported checks are live IMAP, live JMAP, the reported itinerary, deployed-mirror backfill coverage, and production-model embeddings. The existing attached-HTML assessor issue remains tracked separately in #231.

Implemented in [PR #230](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/230) and squash-merged under [the operator’s authorization](https://git.groupthink.asia/dev/mail-mind-mcp/issues/224#issuecomment-47331). Verified that [merge commit `2a2492b352bb1a5d983a80bf4763a703a7dbb284`](https://git.groupthink.asia/dev/mail-mind-mcp/commit/2a2492b352bb1a5d983a80bf4763a703a7dbb284) is on `origin/main`, has the expected parent `518bec4`, and has the same tree as reviewed head `91aacd4`. All six testing decisions passed with generated fixtures. 1. Public `mail_read` returned the date, flight, drop-off, and verbatim “Quoted” status from a synthetic itinerary through raw IMAP, section-based IMAP, and JMAP. With attachment extraction disabled, the image-only CTA appeared with its label and destination inside the untrusted-content fence, and the referenced PNG was omitted from unsupported attachments. 2. `mail_search` found the HTML-only flight number and returned a snippet from the itinerary. Deterministic local embedding inputs contained itinerary text and excluded the extracted destination. 3. Default selection covered missing, blank, and known-stub plain bodies, short meaningful plain text, boilerplate followed by meaningful text, link-free HTML, and unusable HTML. Explicit `plain` and `html_text` modes and the unavailable-part response were exercised. 4. Fresh and backfilled rows preserved text-anchor metadata, the image filename fallback, and lookup of a distinct same-name attachment. The converter made zero external requests. 5. Sender-controlled newlines and fence-like text stayed fenced. Single and batch reads enforced the character budget and handled destinations that crossed it without returning a partial URL. 6. An interrupted historical backfill resumed with stable IDs, refreshed snippets and keyword matches, replacement embedding chunks, and explicit HTML reads for older multipart messages. A repeated pass produced stable results, and a missing original retained its prior usable content. Independent Standards, Spec, and §19 security reviews each passed with zero findings. Exact-head CI and local pytest each reported **1,731 passed, 8 skipped, 30 deselected**. The raw-log audit found zero matches for all five required failure patterns. [Review record](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/230#issuecomment-47319) · [Security review](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/230#issuecomment-47316) · [CI and raw-log audit](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/230#issuecomment-47322) · [Fixture route coverage](https://git.groupthink.asia/dev/mail-mind-mcp/pulls/230#issuecomment-47314). Unsupported checks are live IMAP, live JMAP, the reported itinerary, deployed-mirror backfill coverage, and production-model embeddings. The existing attached-HTML assessor issue remains tracked separately in [#231](https://git.groupthink.asia/dev/mail-mind-mcp/issues/231).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#224
No description provided.