Implement the structured Mail peer evidence query #151

Closed
opened 2026-11-03 00:19:15 +00:00 by svc-agent-writer · 7 comments

Outcome

Implement the first independently usable slice of the approved shared mind contract: a structured, evidence-scoped mail_peer_evidence_v1 query. Preserve the existing agent-facing tools and text results. This work can proceed now; #148 landed in main and its release is not a code dependency. People Mind #45 is now merged as PR #46 and is not a blocker for this provider work.

Decision substrate

Operator approved the shared contract/recovery model and instructed “proceed now” on 2026-11-03. Mail ADR 0010 owns the architecture; ADR 0008 owns the evidence field/privacy boundary. The implementation target is contracts/mind-v1/ at commit 21e279da85eab618ef8c76bc8211daaa23e0ca52, with executable schemas/fixtures and recovery cases. This is implementation of that approved direction, not a decision to add a broker or broaden evidence access.

Scope

  • Implement only mail_peer_evidence_v1, using its request definition and evidence-result/error definitions. Return MCP structuredContent and a correct outputSchema. Keep old mail_evidence byte-compatible; do not parse its text to construct machine data.
  • Preserve ADR 0008 fields, redaction, owner exclusion, account selection, sampling and signature character-budget rules. Add an explicit ADR 0008 tool-list amendment for this structured equivalent with unchanged authority; do not add body, Bcc, attachment, per-signature attribution or other payload fields.
  • Persist source identity/epoch through the writer's normal store initialization/migration, never a new mirror-table writer in the API. The result's through is the existing committed change watermark from the same read view as evidence; it is an observation, not a feed cursor. Routine restart preserves identity. Missing initialization fails explicitly. No change-feed or snapshot operation is advertised in this slice.
  • Capture counts/newest rows/watermark consistently, then perform bounded rendering/extraction outside the read transaction. Return honest partial/freshness metadata and the exact agreed schema, including empty evidence versus actual unavailable/auth errors.
  • Bound actual server work and resource use, not merely the client wait. Specify/test request and database-work budgets, cancellation and interactive responsiveness using existing architecture. #148's diagnostics are not proof that arbitrary evidence work is bounded. If fulfilling this requires a distinct provider-execution prerequisite, report that dependency at the spec gate rather than quietly dropping the acceptance criterion.

Acceptance criteria

  1. Existing evidence/read/write tokens retain their current reach; the new tool requires evidence, rejects insufficient/revoked authority, and returns no fields outside the closed profile. No arguments or personal content appear in logs.
  2. A FastMCP client sees the correct outputSchema and structuredContent; validate_exchange from the pinned conformance kit accepts real synthetic-store results. Reject wrong versions and excessive bounds explicitly. No silent downgrade or human-text parsing.
  3. Query observation is consistent under a concurrent writer; source/epoch survive routine writer/API restart; read-only API startup cannot invent/write identity. Counts and role/date spans agree; unknown/stale/current metadata is honest.
  4. Empty/owner-excluded evidence, redaction adversaries, Unicode/size limits, 50-message/4,000-character maxima and smaller requested budgets are tested. Preserve the existing signature rule and newline-per-line budget.
  5. Demonstrate finite server work/cancellation and continued health/query service under a slow synthetic evidence request; return a bounded explicit error when budget is exceeded. Do not claim #148 has diagnosed or fixed every stall.
  6. Existing tool/text compatibility tests and make check pass. Include P08/P09 and the evidence-applicable I02/I03 observations from the recovery matrix; do not mark full v1 recovery certified.

Non-goals

No change-feed/snapshot implementation, event-log migration, consumer edits, message bus, shared runtime library, image publication or live deployment. Do not advertise full v1 capability until the provider recovery work is implemented. No dependency on #148 issue closure: its landed diagnostic code is the baseline even if live observation remains open.

SVD verification notes

Spec from clean main at the origin tip, using the pinned contract as normative input and current implementation for locations. Use python3 -m pytest, not bare pytest. Keep test temp trees outside the checkout, with a real mktemp path when needed. Mail has no enforced CI yet (#132); report actual local checks and remote status rather than fabricating CI green. Do not publish or merge as part of this work item.

## Outcome Implement the first independently usable slice of the approved shared mind contract: a structured, evidence-scoped `mail_peer_evidence_v1` query. Preserve the existing agent-facing tools and text results. This work can proceed now; #148 landed in main and its release is not a code dependency. People Mind #45 is now merged as PR #46 and is not a blocker for this provider work. ## Decision substrate Operator approved the shared contract/recovery model and instructed “proceed now” on 2026-11-03. Mail ADR 0010 owns the architecture; ADR 0008 owns the evidence field/privacy boundary. The implementation target is `contracts/mind-v1/` at commit `21e279da85eab618ef8c76bc8211daaa23e0ca52`, with executable schemas/fixtures and recovery cases. This is implementation of that approved direction, not a decision to add a broker or broaden evidence access. ## Scope - Implement only `mail_peer_evidence_v1`, using its request definition and evidence-result/error definitions. Return MCP structuredContent and a correct outputSchema. Keep old `mail_evidence` byte-compatible; do not parse its text to construct machine data. - Preserve ADR 0008 fields, redaction, owner exclusion, account selection, sampling and signature character-budget rules. Add an explicit ADR 0008 tool-list amendment for this structured equivalent with unchanged authority; do not add body, Bcc, attachment, per-signature attribution or other payload fields. - Persist source identity/epoch through the writer's normal store initialization/migration, never a new mirror-table writer in the API. The result's `through` is the existing committed change watermark from the same read view as evidence; it is an observation, not a feed cursor. Routine restart preserves identity. Missing initialization fails explicitly. No change-feed or snapshot operation is advertised in this slice. - Capture counts/newest rows/watermark consistently, then perform bounded rendering/extraction outside the read transaction. Return honest partial/freshness metadata and the exact agreed schema, including empty evidence versus actual unavailable/auth errors. - Bound actual server work and resource use, not merely the client wait. Specify/test request and database-work budgets, cancellation and interactive responsiveness using existing architecture. #148's diagnostics are not proof that arbitrary evidence work is bounded. If fulfilling this requires a distinct provider-execution prerequisite, report that dependency at the spec gate rather than quietly dropping the acceptance criterion. ## Acceptance criteria 1. Existing evidence/read/write tokens retain their current reach; the new tool requires evidence, rejects insufficient/revoked authority, and returns no fields outside the closed profile. No arguments or personal content appear in logs. 2. A FastMCP client sees the correct outputSchema and structuredContent; `validate_exchange` from the pinned conformance kit accepts real synthetic-store results. Reject wrong versions and excessive bounds explicitly. No silent downgrade or human-text parsing. 3. Query observation is consistent under a concurrent writer; source/epoch survive routine writer/API restart; read-only API startup cannot invent/write identity. Counts and role/date spans agree; unknown/stale/current metadata is honest. 4. Empty/owner-excluded evidence, redaction adversaries, Unicode/size limits, 50-message/4,000-character maxima and smaller requested budgets are tested. Preserve the existing signature rule and newline-per-line budget. 5. Demonstrate finite server work/cancellation and continued health/query service under a slow synthetic evidence request; return a bounded explicit error when budget is exceeded. Do not claim #148 has diagnosed or fixed every stall. 6. Existing tool/text compatibility tests and `make check` pass. Include P08/P09 and the evidence-applicable I02/I03 observations from the recovery matrix; do not mark full v1 recovery certified. ## Non-goals No change-feed/snapshot implementation, event-log migration, consumer edits, message bus, shared runtime library, image publication or live deployment. Do not advertise full v1 capability until the provider recovery work is implemented. No dependency on #148 issue closure: its landed diagnostic code is the baseline even if live observation remains open. ## SVD verification notes Spec from clean main at the origin tip, using the pinned contract as normative input and current implementation for locations. Use `python3 -m pytest`, not bare pytest. Keep test temp trees outside the checkout, with a real `mktemp` path when needed. Mail has no enforced CI yet (#132); report actual local checks and remote status rather than fabricating CI green. Do not publish or merge as part of this work item.
Collaborator

⏸ SVD architect gate: dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity substrate · dispatch effort high

Run: 20261103T002028Z-89577546

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

Open risks:

  1. Which error code should an exceeded server budget (DB deadline or render deadline) return? The lean returns busy (retryable, retry_after_seconds=5), because the contract's closed error enum has no budget-exceeded code and unavailable reads as an outage. A deterministically over-budget request will keep getting busy. Is that acceptable, or should a later contract minor version add a code? [decision]
  2. Should structured subjects[].subject keep the text layout's '|'→'¦' substitution? The lean drops it (cut at 120 with '…', pipe kept) because the substitution is only pipe-row escaping. A People Mind migration comparing old text to new JSON would then see '¦' versus '|'. [decision]
  3. What should an account selector that names no configured account return? The lean returns available=false with freshness state unknown (honest and discloses nothing), because the closed error enum has no invalid-argument code. The alternative is a validation refusal. [decision]
  4. Is it acceptable for this slice that a byte-copied or restored database file keeps the same peer_source_id/peer_epoch? contracts/mind-v1/README.md:21-22 wants distinct identities for clones and a new epoch after a restore without continuity (recovery case P04, out of scope). The lean says yes, because mail_peer_info is not implemented and v1 is not advertised; the P04 slice must add continuity detection. [decision]
  5. Two FastMCP 3.4.11 behaviours could not be probed in this sandbox (venv execution was denied). (a) Pydantic argument validation must reject unknown keys and excess bounds before the body runs. (b) The overridden Tool.parameters must only be advertised, not used for server validation, so that contract='mail-people/2.0' reaches the body and gets a structured unsupported_version. Check on the host: test_excess_bounds_and_unknown_fields_are_refused and test_wrong_contract_is_unsupported_version must pass. Fallback for (a): an on_call_tool middleware key guard in server.py. Fallback for (b): an explicit validation refusal, recorded in the PR. [verification]
  6. The I02 observation (health p50/p95/p99, evidence throughput, peak RSS under a synthetic writer loop) is only meaningful on the host. Check: run python3 -m pytest tests/test_peer_evidence.py -q -s -k i02 on the host and quote the output in the PR against the budget declared in the test (healthz p99 ≤ 500 ms, zero non-200). It is an observation, not v1 recovery certification. [verification]
  7. make check includes audit (uvx pip-audit, which needs the network), and Mail has no enforced CI (#132). Check: run make check on the host and report its actual result and the remote status in the PR. Never claim CI green. [verification]

Change: New pure module src/mail_mind_mcp/peer.py holds literal copies of the contract's request and response schema subsets (pinned to contracts/mind-v1 by an equality test, because the wheel and image ship only src/), the budget constants, WorkBudget, and the freshness, scope_id, error and result builders. store.py: the writer init (store.py:568-584) wraps an INSERT OR IGNORE of meta peer_source_id/peer_epoch plus the existing schema_version upsert in one _tx (store.py:666-677). SCHEMA_VERSION is not bumped (DD-271; about 20 v14 assertions in tests). The Store.evidence body (store.py:2081-2146) moves verbatim into _sender_evidence(conn,…). A new Store.peer_evidence opens a dedicated read-only connection (the last_ok_sync shape, store.py:2294-2303) and never takes Store._lock. It sets a progress handler for the budget and cancel flag, and reads identity, MAX(seq), sync_log and evidence inside one BEGIN…COMMIT. evidence.py: signatures_bounded returns a truncation flag and takes a cooperative check; signatures wraps it, so its output is unchanged. server.py: an async mail_peer_evidence_v1 is registered via FunctionTool.from_function(auth=require_scopes(SCOPE_EVIDENCE), annotations=READ_ONLY, output_schema=peer.OUTPUT_SCHEMA), with parameters overridden to peer.INPUT_SCHEMA. Its contract parameter is a str, so a wrong version returns a structured unsupported_version. A non-blocking BoundedSemaphore slot is released only in the worker thread's finally. The work runs via anyio.to_thread.run_sync(abandon_on_cancel=True); cancellation sets the budget's cancel flag. Rendering happens after COMMIT. Errors are returned as ToolResult(is_error=True, structured_content=err). The whole call runs inside _tool_call (server.py:279-294), mirroring mail_evidence at server.py:957-1003. The ADR 0008 §1/§2 amendment and the docs that list evidence tools are updated.

Files: src/mail_mind_mcp/peer.py · src/mail_mind_mcp/store.py · src/mail_mind_mcp/evidence.py · src/mail_mind_mcp/server.py · tests/test_peer_evidence.py · tests/test_evidence.py · tests/test_server.py · docs/adr/0008-evidence-scope.md · CLAUDE.md · README.md · SECURITY.md

Decision: accept the 7 open risk(s) above and dispatch this spec (svd:go), or park (svd:skip) / re-spec (svd:respec)?

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

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

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md

### ⏸ SVD architect gate: dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `substrate` · dispatch effort `high` **Run:** `20261103T002028Z-89577546` **Held because:** CLEAN but 7 open risk(s) (3 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. Which error code should an exceeded server budget (DB deadline or render deadline) return? The lean returns busy (retryable, retry_after_seconds=5), because the contract's closed error enum has no budget-exceeded code and unavailable reads as an outage. A deterministically over-budget request will keep getting busy. Is that acceptable, or should a later contract minor version add a code? [decision] 2. Should structured subjects[].subject keep the text layout's '|'→'¦' substitution? The lean drops it (cut at 120 with '…', pipe kept) because the substitution is only pipe-row escaping. A People Mind migration comparing old text to new JSON would then see '¦' versus '|'. [decision] 3. What should an account selector that names no configured account return? The lean returns available=false with freshness state unknown (honest and discloses nothing), because the closed error enum has no invalid-argument code. The alternative is a validation refusal. [decision] 4. Is it acceptable for this slice that a byte-copied or restored database file keeps the same peer_source_id/peer_epoch? contracts/mind-v1/README.md:21-22 wants distinct identities for clones and a new epoch after a restore without continuity (recovery case P04, out of scope). The lean says yes, because mail_peer_info is not implemented and v1 is not advertised; the P04 slice must add continuity detection. [decision] 5. Two FastMCP 3.4.11 behaviours could not be probed in this sandbox (venv execution was denied). (a) Pydantic argument validation must reject unknown keys and excess bounds before the body runs. (b) The overridden Tool.parameters must only be advertised, not used for server validation, so that contract='mail-people/2.0' reaches the body and gets a structured unsupported_version. Check on the host: test_excess_bounds_and_unknown_fields_are_refused and test_wrong_contract_is_unsupported_version must pass. Fallback for (a): an on_call_tool middleware key guard in server.py. Fallback for (b): an explicit validation refusal, recorded in the PR. [verification] 6. The I02 observation (health p50/p95/p99, evidence throughput, peak RSS under a synthetic writer loop) is only meaningful on the host. Check: run python3 -m pytest tests/test_peer_evidence.py -q -s -k i02 on the host and quote the output in the PR against the budget declared in the test (healthz p99 ≤ 500 ms, zero non-200). It is an observation, not v1 recovery certification. [verification] 7. make check includes audit (uvx pip-audit, which needs the network), and Mail has no enforced CI (#132). Check: run make check on the host and report its actual result and the remote status in the PR. Never claim CI green. [verification] **Change:** New pure module src/mail_mind_mcp/peer.py holds literal copies of the contract's request and response schema subsets (pinned to contracts/mind-v1 by an equality test, because the wheel and image ship only src/), the budget constants, WorkBudget, and the freshness, scope_id, error and result builders. store.py: the writer init (store.py:568-584) wraps an INSERT OR IGNORE of meta peer_source_id/peer_epoch plus the existing schema_version upsert in one _tx (store.py:666-677). SCHEMA_VERSION is not bumped (DD-271; about 20 v14 assertions in tests). The Store.evidence body (store.py:2081-2146) moves verbatim into _sender_evidence(conn,…). A new Store.peer_evidence opens a dedicated read-only connection (the last_ok_sync shape, store.py:2294-2303) and never takes Store._lock. It sets a progress handler for the budget and cancel flag, and reads identity, MAX(seq), sync_log and evidence inside one BEGIN…COMMIT. evidence.py: signatures_bounded returns a truncation flag and takes a cooperative check; signatures wraps it, so its output is unchanged. server.py: an async mail_peer_evidence_v1 is registered via FunctionTool.from_function(auth=require_scopes(SCOPE_EVIDENCE), annotations=READ_ONLY, output_schema=peer.OUTPUT_SCHEMA), with parameters overridden to peer.INPUT_SCHEMA. Its contract parameter is a str, so a wrong version returns a structured unsupported_version. A non-blocking BoundedSemaphore slot is released only in the worker thread's finally. The work runs via anyio.to_thread.run_sync(abandon_on_cancel=True); cancellation sets the budget's cancel flag. Rendering happens after COMMIT. Errors are returned as ToolResult(is_error=True, structured_content=err). The whole call runs inside _tool_call (server.py:279-294), mirroring mail_evidence at server.py:957-1003. The ADR 0008 §1/§2 amendment and the docs that list evidence tools are updated. **Files:** `src/mail_mind_mcp/peer.py` · `src/mail_mind_mcp/store.py` · `src/mail_mind_mcp/evidence.py` · `src/mail_mind_mcp/server.py` · `tests/test_peer_evidence.py` · `tests/test_evidence.py` · `tests/test_server.py` · `docs/adr/0008-evidence-scope.md` · `CLAUDE.md` · `README.md` · `SECURITY.md` **Decision:** accept the 7 open risk(s) above and dispatch this spec (`svd:go`), or park (`svd:skip`) / re-spec (`svd:respec`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md`</sub>
Author
Member

Architect review: HOLD before implementation

The automated Half-A result above is CLEAN, but I have not approved dispatch. The concrete draft needs four technical corrections:

  • Its 15-second request budget reuses a connection with a 30-second SQLite busy timeout. Bound lock waiting, admission, execution and cleanup, not only VM progress.
  • Checks between messages do not establish the cancellation bound for one large stored body. Prove a bounded strategy, or surface the provider-execution prerequisite already required by this issue.
  • Do not advance generated_at into the future to hide clock skew. Keep generation time truthful and use a contract-conforming error if freshness cannot be represented honestly.
  • Preserve structured unsupported_version; framework validation behavior cannot justify the draft's weaker fallback.

These are corrections within the accepted contract, not requests for a new architecture decision. The draft is marked HOLD and must be reworked and verified before implementation approval. The shared contract at 21e279d is delivered; no runtime protocol support is claimed. The seven residual risks in the automatic packet also remain to be reconciled.

### Architect review: HOLD before implementation The automated Half-A result above is CLEAN, but I have not approved dispatch. The concrete draft needs four technical corrections: - Its 15-second request budget reuses a connection with a 30-second SQLite busy timeout. Bound lock waiting, admission, execution and cleanup, not only VM progress. - Checks between messages do not establish the cancellation bound for one large stored body. Prove a bounded strategy, or surface the provider-execution prerequisite already required by this issue. - Do not advance `generated_at` into the future to hide clock skew. Keep generation time truthful and use a contract-conforming error if freshness cannot be represented honestly. - Preserve structured `unsupported_version`; framework validation behavior cannot justify the draft's weaker fallback. These are corrections within the accepted contract, not requests for a new architecture decision. The draft is marked HOLD and must be reworked and verified before implementation approval. The shared contract at `21e279d` is delivered; no runtime protocol support is claimed. The seven residual risks in the automatic packet also remain to be reconciled.
Collaborator

✅ SVD architect gate: dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity unclassified · dispatch effort unclassified

Run: 20261103T002028Z-89577546

Files: src/mail_mind_mcp/peer.py · src/mail_mind_mcp/store.py · src/mail_mind_mcp/evidence.py · src/mail_mind_mcp/server.py · tests/test_peer_evidence.py · tests/test_evidence.py · tests/test_server.py · docs/adr/0008-evidence-scope.md · CLAUDE.md · README.md · SECURITY.md

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

Decision: dispatch this spec (svd:go)?

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

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

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md

### ✅ SVD architect gate: dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `unclassified` · dispatch effort `unclassified` **Run:** `20261103T002028Z-89577546` **Files:** `src/mail_mind_mcp/peer.py` · `src/mail_mind_mcp/store.py` · `src/mail_mind_mcp/evidence.py` · `src/mail_mind_mcp/server.py` · `tests/test_peer_evidence.py` · `tests/test_evidence.py` · `tests/test_server.py` · `docs/adr/0008-evidence-scope.md` · `CLAUDE.md` · `README.md` · `SECURITY.md` **Write-set divergence:** present table wins. 0 sourceHashes vs 34-row table. **Decision:** dispatch this spec (`svd:go`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md`</sub>
Author
Member

Architect gate update: revised #151 spec verified CLEAN, zero blocking defects, no degraded or inconclusive lenses (run 20261103T002028Z-89577546; automatic comment 31201). The original lock-wait, single-body execution, fabricated generation-time and unsupported-version fallback defects are addressed in the operative plan. A synthetic FastMCP probe additionally found validation-value logging; the revised tool-local wrapper preserves validation without exposing rejected values.

No implementation dispatch or approval yet. The operator identified adjacent Rat 4414d294-4fe4-4583-94d9-26697646e5a9 / Half-A batch 99f271b89bb841579629f13b0416a6e1. Local run arguments confirm Mail #142 (20261103T005914Z-373020a9) and imap-blade #3 (20261103T005914Z-a98ad411). #142 and #151 overlap store.py. Keep #151 queued; resolve that lane first, then refresh the base/source hashes and review its final write set. This is dispatch sequencing, not a new protocol dependency. No changes made to either adjacent run.

Remaining verifier advisories to close at the refreshed gate: include config.example.toml's evidence-tool comment in the bounded documentation write set; explicitly cover served-tool call arguments/annotations and fixed-signature _connect test doubles; adjudicate persistent row/byte work-limit exhaustion versus retryable busy (bounded consumer retries prevent an infinite retry loop but do not make a permanent limit transient); document SQLite aggregate-row limits and sync-log retention's unknown freshness. Actual cancellation, RSS, HTTP privacy and PR CI remain implementation acceptance checks. Branch protection cannot be inferred from main's green CI and remains unreadable with this token.

Current source base ff1d246 includes Mail CI PR #153; main validation is green. The normative contract remains pinned to 21e279d. No runtime, release or deployment change is claimed. Next sequence remains #151, #152, People #47 after coordination and the normal implementation gate.

Architect gate update: revised #151 spec verified CLEAN, zero blocking defects, no degraded or inconclusive lenses (run 20261103T002028Z-89577546; automatic comment 31201). The original lock-wait, single-body execution, fabricated generation-time and unsupported-version fallback defects are addressed in the operative plan. A synthetic FastMCP probe additionally found validation-value logging; the revised tool-local wrapper preserves validation without exposing rejected values. No implementation dispatch or approval yet. The operator identified adjacent Rat 4414d294-4fe4-4583-94d9-26697646e5a9 / Half-A batch 99f271b89bb841579629f13b0416a6e1. Local run arguments confirm Mail #142 (20261103T005914Z-373020a9) and imap-blade #3 (20261103T005914Z-a98ad411). #142 and #151 overlap store.py. Keep #151 queued; resolve that lane first, then refresh the base/source hashes and review its final write set. This is dispatch sequencing, not a new protocol dependency. No changes made to either adjacent run. Remaining verifier advisories to close at the refreshed gate: include config.example.toml's evidence-tool comment in the bounded documentation write set; explicitly cover served-tool call arguments/annotations and fixed-signature _connect test doubles; adjudicate persistent row/byte work-limit exhaustion versus retryable busy (bounded consumer retries prevent an infinite retry loop but do not make a permanent limit transient); document SQLite aggregate-row limits and sync-log retention's unknown freshness. Actual cancellation, RSS, HTTP privacy and PR CI remain implementation acceptance checks. Branch protection cannot be inferred from main's green CI and remains unreadable with this token. Current source base ff1d246 includes Mail CI PR #153; main validation is green. The normative contract remains pinned to 21e279d. No runtime, release or deployment change is claimed. Next sequence remains #151, #152, People #47 after coordination and the normal implementation gate.
Collaborator

✅ SVD architect gate: dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity unclassified · dispatch effort unclassified

Run: 20261103T002028Z-89577546

Files: src/mail_mind_mcp/peer.py · src/mail_mind_mcp/store.py · src/mail_mind_mcp/evidence.py · src/mail_mind_mcp/server.py · tests/test_peer_evidence.py · tests/test_evidence.py · tests/test_server.py · docs/adr/0008-evidence-scope.md · CLAUDE.md · README.md · SECURITY.md · config.example.toml

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

Decision: dispatch this spec (svd:go)?

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

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

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md

### ✅ SVD architect gate: dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `unclassified` · dispatch effort `unclassified` **Run:** `20261103T002028Z-89577546` **Files:** `src/mail_mind_mcp/peer.py` · `src/mail_mind_mcp/store.py` · `src/mail_mind_mcp/evidence.py` · `src/mail_mind_mcp/server.py` · `tests/test_peer_evidence.py` · `tests/test_evidence.py` · `tests/test_server.py` · `docs/adr/0008-evidence-scope.md` · `CLAUDE.md` · `README.md` · `SECURITY.md` · `config.example.toml` **Write-set divergence:** present table wins. 0 sourceHashes vs 36-row table. **Decision:** dispatch this spec (`svd:go`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md`</sub>
Collaborator

✅ SVD architect gate: dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query

Status: CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity unclassified · dispatch effort unclassified

Run: 20261103T002028Z-89577546

Files: src/mail_mind_mcp/peer.py · src/mail_mind_mcp/store.py · src/mail_mind_mcp/evidence.py · src/mail_mind_mcp/server.py · tests/test_peer_evidence.py · tests/test_evidence.py · tests/test_server.py · docs/adr/0008-evidence-scope.md · CLAUDE.md · README.md · SECURITY.md · config.example.toml

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

Decision: dispatch this spec (svd:go)?

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

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

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md

### ✅ SVD architect gate: dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query **Status:** CLEAN after 0 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity `unclassified` · dispatch effort `unclassified` **Run:** `20261103T002028Z-89577546` **Files:** `src/mail_mind_mcp/peer.py` · `src/mail_mind_mcp/store.py` · `src/mail_mind_mcp/evidence.py` · `src/mail_mind_mcp/server.py` · `tests/test_peer_evidence.py` · `tests/test_evidence.py` · `tests/test_server.py` · `docs/adr/0008-evidence-scope.md` · `CLAUDE.md` · `README.md` · `SECURITY.md` · `config.example.toml` **Write-set divergence:** present table wins. 0 sourceHashes vs 36-row table. **Decision:** dispatch this spec (`svd:go`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-03-implement-the-structured-mail-peer-evidence-query.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query completed integration verify.

  • PR: #158
  • Branch: feat/svd-dev-mail-mind-mcp-151-implement-the-structured-mail-4e099dea
  • Commit: f5929a338e
  • Build: none
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/72/pipeline/14/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: self-review: unconditional argument-log privacy does not hold at DEBUG -> not fixed: FastMCP logs raw arguments before tool validation and the spec forbids a server-wide filter. Follow-up for the architect.
  • Warning: Bare pytest is unavailable outside the project venv; tests ran through uv run --frozen python -m pytest. The spec's fast-verification file list collects 217 tests and all pass.
  • Warning: The spec's scenario table maps issue ACs, not named tests, so no per-test trace was possible. Test files tests/test_peer_evidence.py and tests/test_peer_contract.py exist and collect.
  • Warning: I02/P08/P09 observations and the full-cap RSS and cleanup evidence were not independently re-run here. Check that the PR body attaches them.
  • Warning: Branch-protection enforcement on main is unreadable per the spec; the operator owns the merge.
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261103T041454Z-4e099dea --confirm-merge)
spec-verify-dispatch Half B for dev/mail-mind-mcp#151 implement-the-structured-mail-peer-evidence-query completed integration verify. - PR: https://git.groupthink.asia/dev/mail-mind-mcp/pulls/158 - Branch: feat/svd-dev-mail-mind-mcp-151-implement-the-structured-mail-4e099dea - Commit: f5929a338e7e9cc5bd105a47b9680335ebe69266 - Build: none - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/72/pipeline/14/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: self-review: unconditional argument-log privacy does not hold at DEBUG -> not fixed: FastMCP logs raw arguments before tool validation and the spec forbids a server-wide filter. Follow-up for the architect. - Warning: Bare `pytest` is unavailable outside the project venv; tests ran through `uv run --frozen python -m pytest`. The spec's fast-verification file list collects 217 tests and all pass. - Warning: The spec's scenario table maps issue ACs, not named tests, so no per-test trace was possible. Test files tests/test_peer_evidence.py and tests/test_peer_contract.py exist and collect. - Warning: I02/P08/P09 observations and the full-cap RSS and cleanup evidence were not independently re-run here. Check that the PR body attaches them. - Warning: Branch-protection enforcement on main is unreadable per the spec; the operator owns the merge. - CI wait: ci/woodpecker/pr/validation -> pass - Decision: review the PR and merge? (`codex-svd ship --run-id 20261103T041454Z-4e099dea --confirm-merge`)
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

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