The Mail peer feed carries no message date or owner flag: rule on mail-people/1.1 #184

Closed
opened 2026-11-04 06:34:12 +00:00 by svc-agent-writer · 4 comments

What happened

People Mind dates every mail interaction at the time Mail Mind recorded the change, not at the time the message was sent. In the live cross-check on 2026-11-04, 83,368 of 83,376 mail interactions carry 2026-11-03T21:13:17Z, the Mail Mind v16 initialisation time (dev/people-mind-mcp#68). People Mind also shows that time as "last seen" for every person it got from mail.

Cause

Two things combine:

  • People Mind reads at as a send date. The contract says it is not one: "A change's at is its mirror mutation time, not a claim about the original send time" (contracts/mind-v1/README.md:30). That consumer defect is dev/people-mind-mcp#68.
  • The mail-people/1.0 feed and snapshot carry no message date. The add envelope holds only from, to and cc (peer.py:345, contracts/mind-v1/README.md:38), and the objects are closed. A consumer has no way to get the sent date from the feed.

A second gap has the same shape (see the comment of 2026-11-04): the envelope does not say which messages the owner sent. People Mind falls back to its own [owner] emails list, which misses owner addresses outside that list and every Exchange X.500 sender, whose from is empty.

Rules that already bind the fix

  • Versioning. "Additive fields are introduced in a new negotiated minor version; old negotiated shapes stay available through an announced migration window" (contracts/mind-v1/README.md:13). A new field means mail-people/1.1, not an amended 1.0.
  • No read-time lookup. "Reading an old add MUST NOT look up today's mutable message row" (contracts/mind-v1/README.md:40). Events already in peer_events can not gain a date at read time. The contract's route for existing rows is a new history boundary: a new epoch whose initialisation takes the date from the rows that exist, then one fresh consumer snapshot. dev/people-mind-mcp#68 already plans that snapshot.
  • The owner rule. Any From seen in the Sent or Drafts role of the same account is the owner's (ADR 0008 §4).

Directions (not decided)

  1. mail-people/1.1 with date, and optionally from_owner.
    • date: the stored date_utc (store.py:131) as a Z timestamp, or null when it is ''.
    • from_owner: a boolean from the ADR 0008 §4 rule. It names no mailbox.
    • Both go on the add envelope and the snapshot row. Consumers migrate once.
    • Cost: a contract change in contracts/mind-v1/ with fixtures and tests/test_peer_contract.py, amendments to ADR 0012 rule 3 and ADR 0008 §9 and §10, a new epoch at upgrade, and a migration window in which 1.0 stays served.
  2. Keep mail-people/1.0. People Mind dates "first seen" and "last seen" from the received and sent date spans that mail_peer_evidence_v1 already returns (contracts/mind-v1/README.md:54). Interactions have no exact date of their own, and owner direction stays a consumer config list. This is the cheaper option to reverse.

Questions for the ruling

  1. Direction 1 or direction 2.
  2. If from_owner ships: the owner set grows when a new From appears in Sent or Drafts, but an event is immutable. Is the flag the owner status when the event was written, or must a consumer re-snapshot when the owner set grows?

Human act

ruling: the operator picks direction 1 or 2 and the from_owner semantics (CONV-40)

Acceptance criteria

  1. The ruling is recorded in ADR 0012, and in contracts/mind-v1/ when direction 1 is chosen.
  2. If direction 1: every add event and snapshot row for a message with a parseable date carries that date, and a message with no parseable date carries null. A contract fixture covers both cases. mail-people/1.0 stays served through the announced migration window. After the upgrade, existing rows reach consumers with dates through the new epoch's snapshot.
  3. If direction 1 with from_owner: a fixture covers an owner message, a non-owner message and an owner message with an empty from.
  4. If direction 2: the issue closes with a pointer to the consumer change in dev/people-mind-mcp#68.
  5. make check stays green.
  • Consumer change: dev/people-mind-mcp#68 (blocked by this issue).
  • The other People Mind cross-check findings (blank-organisation links, duplicate persons, the sources table) are not part of this issue.

Filed under: operator word "file date gap" sha256:e417d968967b

## What happened People Mind dates every mail interaction at the time Mail Mind recorded the change, not at the time the message was sent. In the live cross-check on 2026-11-04, 83,368 of 83,376 mail interactions carry `2026-11-03T21:13:17Z`, the Mail Mind v16 initialisation time (dev/people-mind-mcp#68). People Mind also shows that time as "last seen" for every person it got from mail. ## Cause Two things combine: - **People Mind reads `at` as a send date.** The contract says it is not one: "A change's `at` is its mirror mutation time, not a claim about the original send time" (`contracts/mind-v1/README.md:30`). That consumer defect is dev/people-mind-mcp#68. - **The `mail-people/1.0` feed and snapshot carry no message date.** The `add` envelope holds only `from`, `to` and `cc` (`peer.py:345`, `contracts/mind-v1/README.md:38`), and the objects are closed. A consumer has no way to get the sent date from the feed. A second gap has the same shape (see the comment of 2026-11-04): the envelope does not say which messages the owner sent. People Mind falls back to its own `[owner] emails` list, which misses owner addresses outside that list and every Exchange X.500 sender, whose `from` is empty. ## Rules that already bind the fix - **Versioning.** "Additive fields are introduced in a new negotiated minor version; old negotiated shapes stay available through an announced migration window" (`contracts/mind-v1/README.md:13`). A new field means `mail-people/1.1`, not an amended 1.0. - **No read-time lookup.** "Reading an old `add` MUST NOT look up today's mutable message row" (`contracts/mind-v1/README.md:40`). Events already in `peer_events` can not gain a date at read time. The contract's route for existing rows is a new history boundary: a new epoch whose initialisation takes the date from the rows that exist, then one fresh consumer snapshot. dev/people-mind-mcp#68 already plans that snapshot. - **The owner rule.** Any From seen in the Sent or Drafts role of the same account is the owner's (ADR 0008 §4). ## Directions (not decided) 1. **`mail-people/1.1` with `date`, and optionally `from_owner`.** - `date`: the stored `date_utc` (`store.py:131`) as a `Z` timestamp, or null when it is `''`. - `from_owner`: a boolean from the ADR 0008 §4 rule. It names no mailbox. - Both go on the `add` envelope and the snapshot row. Consumers migrate once. - Cost: a contract change in `contracts/mind-v1/` with fixtures and `tests/test_peer_contract.py`, amendments to ADR 0012 rule 3 and ADR 0008 §9 and §10, a new epoch at upgrade, and a migration window in which 1.0 stays served. 2. **Keep `mail-people/1.0`.** People Mind dates "first seen" and "last seen" from the received and sent date spans that `mail_peer_evidence_v1` already returns (`contracts/mind-v1/README.md:54`). Interactions have no exact date of their own, and owner direction stays a consumer config list. This is the cheaper option to reverse. ## Questions for the ruling 1. Direction 1 or direction 2. 2. If `from_owner` ships: the owner set grows when a new From appears in Sent or Drafts, but an event is immutable. Is the flag the owner status when the event was written, or must a consumer re-snapshot when the owner set grows? ## Human act ruling: the operator picks direction 1 or 2 and the from_owner semantics (CONV-40) ## Acceptance criteria 1. The ruling is recorded in ADR 0012, and in `contracts/mind-v1/` when direction 1 is chosen. 2. If direction 1: every `add` event and snapshot row for a message with a parseable date carries that date, and a message with no parseable date carries null. A contract fixture covers both cases. `mail-people/1.0` stays served through the announced migration window. After the upgrade, existing rows reach consumers with dates through the new epoch's snapshot. 3. If direction 1 with `from_owner`: a fixture covers an owner message, a non-owner message and an owner message with an empty `from`. 4. If direction 2: the issue closes with a pointer to the consumer change in dev/people-mind-mcp#68. 5. `make check` stays green. ## Related - Consumer change: dev/people-mind-mcp#68 (blocked by this issue). - The other People Mind cross-check findings (blank-organisation links, duplicate persons, the sources table) are not part of this issue. Filed under: operator word "file date gap" sha256:e417d968967b
Collaborator

This was generated by AI during triage.

A second gap of the same shape: the feed does not say which messages are the owner's

The People Mind cross-check on 2026-11-04 found a second consumer gap with the same cause as this issue. Mail Mind knows which messages the owner sent, and the mail-people/1.0 envelope does not say so.

Live evidence (read-only queries on starbase-syd, mode=ro):

  • People Mind classifies a message as outgoing only when from is in its configured [owner] emails. The deployment lists 3 addresses.
  • Mail Mind's Sent and Drafts roles hold about 25 owner From values, for example piersdd@ssl-mail.com (1,720), piers@tasmanet.com.au (1,436) and piers@groupthink.asia (980).
  • For one correspondent, People Mind's 443 outgoing interactions are exactly the messages from the two configured addresses that appear (431 + 12). Mail Mind's evidence counts 599. The 156 missing messages came from three unlisted owner addresses.
  • Two senders are Exchange X.500 values, not addresses (/o=tasmanet/…, 567 messages; /o=exchangelabs/…, 260). The envelope carries an empty from for them, so People Mind cannot see that these messages were sent by the owner, whatever its config says.

Ask: decide this with direction 1 of this issue. Mail Mind already holds the owner rule: any From seen in the Sent or Drafts role of the same account (ADR 0008 §4). A boolean such as from_owner on the add envelope and snapshot row carries that fact without naming any mailbox. If the contract changes for date, the same minor version could carry from_owner, so consumers migrate once. The same questions apply: the fixtures, ADR 0012 rule 3, and rows already in peer_events, which the read can derive from messages.

The People Mind consumer change is dev/people-mind-mcp#68.

> *This was generated by AI during triage.* ## A second gap of the same shape: the feed does not say which messages are the owner's The People Mind cross-check on 2026-11-04 found a second consumer gap with the same cause as this issue. Mail Mind knows which messages the owner sent, and the `mail-people/1.0` envelope does not say so. **Live evidence** (read-only queries on starbase-syd, `mode=ro`): - People Mind classifies a message as outgoing only when `from` is in its configured `[owner] emails`. The deployment lists 3 addresses. - Mail Mind's Sent and Drafts roles hold about 25 owner From values, for example `piersdd@ssl-mail.com` (1,720), `piers@tasmanet.com.au` (1,436) and `piers@groupthink.asia` (980). - For one correspondent, People Mind's 443 outgoing interactions are exactly the messages from the two configured addresses that appear (431 + 12). Mail Mind's evidence counts 599. The 156 missing messages came from three unlisted owner addresses. - Two senders are Exchange X.500 values, not addresses (`/o=tasmanet/…`, 567 messages; `/o=exchangelabs/…`, 260). The envelope carries an empty `from` for them, so People Mind cannot see that these messages were sent by the owner, whatever its config says. **Ask: decide this with direction 1 of this issue.** Mail Mind already holds the owner rule: any From seen in the Sent or Drafts role of the same account (ADR 0008 §4). A boolean such as `from_owner` on the `add` envelope and snapshot row carries that fact without naming any mailbox. If the contract changes for `date`, the same minor version could carry `from_owner`, so consumers migrate once. The same questions apply: the fixtures, ADR 0012 rule 3, and rows already in `peer_events`, which the read can derive from `messages`. The People Mind consumer change is dev/people-mind-mcp#68.
svc-agent-writer changed title from The Mail peer feed carries no message date, so People Mind dates interactions at import time to The Mail peer feed carries no message date or owner flag: rule on mail-people/1.1 2026-11-04 06:40:46 +00:00
Author
Member

This was generated by AI during triage.

Ruling (2026-11-04)

The operator accepted these leans. They answer the two questions under ## Human act.

  1. Direction 1. Mail Mind adds a new negotiated minor version, mail-people/1.1, with two fields on the add envelope and on the snapshot row. Consumers migrate once.
    • Direction 2 is rejected. Evidence spans date a person, not a message, so people_recent rows would have no date. A consumer owner-address list can not match an X.500 sender, whose from is empty.
    • mail-people/1.0 stays served through an announced migration window (contracts/mind-v1/README.md:13). People Mind is the only consumer, so the window can be short.
  2. date. The stored date_utc (store.py:131) as an RFC 3339 Z timestamp: the Date header, else the internal date. Null when neither parses (date_utc = '').
  3. from_owner semantics: (a), the owner status when the event is written. A boolean from the ADR 0008 §4 rule: the From was seen in the Sent or Drafts role of the same account. It names no address and no mailbox.
    • A message in the Sent or Drafts role is the owner's at write time. This covers owner addresses outside the consumer's list and X.500 senders.
    • Accepted gap: a message outside Sent and Drafts from an owner address not yet seen in Sent stays false until the next epoch re-derives it. ADR 0012 records this gap.
    • Rejected (b): a consumer re-snapshot whenever the owner set grows. It conflicts with immutable events and the no-read-time-lookup rule (contracts/mind-v1/README.md:40).
  4. Existing rows. The upgrade starts a new epoch. Its initialisation takes date and from_owner from the rows that exist. Old events are never given the new fields at read time.
  5. Disclosure. Neither field gives an evidence token a new kind of data. ADR 0008 §3 already allows a row's own date on mail_changes, and evidence already returns dated subjects and sent and received counts and spans.

Scope for SVD

The Mail Mind half only: the contracts/mind-v1/ 1.1 profile with its schemas, fixtures and tests/test_peer_contract.py; the stored envelope and schema bump; the new epoch at upgrade; serving both 1.0 and 1.1; amendments to ADR 0012 rule 3 and ADR 0008 §9 and §10. The People Mind consumer change stays in dev/people-mind-mcp#68, which this issue blocks.

The operator approved running SVD past CONV-40 rule 3 for this scope.

Filed under: operator word "accept" sha256:c125d0397b60

> *This was generated by AI during triage.* ## Ruling (2026-11-04) The operator accepted these leans. They answer the two questions under `## Human act`. 1. **Direction 1.** Mail Mind adds a new negotiated minor version, `mail-people/1.1`, with two fields on the `add` envelope and on the snapshot row. Consumers migrate once. - Direction 2 is rejected. Evidence spans date a person, not a message, so `people_recent` rows would have no date. A consumer owner-address list can not match an X.500 sender, whose `from` is empty. - `mail-people/1.0` stays served through an announced migration window (`contracts/mind-v1/README.md:13`). People Mind is the only consumer, so the window can be short. 2. **`date`.** The stored `date_utc` (`store.py:131`) as an RFC 3339 `Z` timestamp: the Date header, else the internal date. Null when neither parses (`date_utc = ''`). 3. **`from_owner` semantics: (a), the owner status when the event is written.** A boolean from the ADR 0008 §4 rule: the From was seen in the Sent or Drafts role of the same account. It names no address and no mailbox. - A message in the Sent or Drafts role is the owner's at write time. This covers owner addresses outside the consumer's list and X.500 senders. - Accepted gap: a message outside Sent and Drafts from an owner address not yet seen in Sent stays `false` until the next epoch re-derives it. ADR 0012 records this gap. - Rejected (b): a consumer re-snapshot whenever the owner set grows. It conflicts with immutable events and the no-read-time-lookup rule (`contracts/mind-v1/README.md:40`). 4. **Existing rows.** The upgrade starts a new epoch. Its initialisation takes `date` and `from_owner` from the rows that exist. Old events are never given the new fields at read time. 5. **Disclosure.** Neither field gives an evidence token a new kind of data. ADR 0008 §3 already allows a row's own date on `mail_changes`, and evidence already returns dated subjects and sent and received counts and spans. ## Scope for SVD The Mail Mind half only: the `contracts/mind-v1/` 1.1 profile with its schemas, fixtures and `tests/test_peer_contract.py`; the stored envelope and schema bump; the new epoch at upgrade; serving both 1.0 and 1.1; amendments to ADR 0012 rule 3 and ADR 0008 §9 and §10. The People Mind consumer change stays in dev/people-mind-mcp#68, which this issue blocks. The operator approved running SVD past CONV-40 rule 3 for this scope. Filed under: operator word "accept" sha256:c125d0397b60
Collaborator

⏸ SVD architect gate: dev/mail-mind-mcp#184 the-mail-peer-feed-carries-no-message-date-or-owner-flag-rul

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: 20261104T064444Z-886de0fa

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

Open risks:

  1. The ruling's scope says 'stored envelope and schema bump'. This spec instead triggers one upgrade epoch with an atomic meta marker (peer_profile=mail-people/1.1) and does not set SCHEMA_VERSION=18. Reasons: there is no table DDL change; ADR 0012:31 and ADR 0008 §9/§10 kept the version for idempotent peer changes; and a bump rewrites schema_version()==17 in 11 test files, which pushes the written set past the 16-file ceiling. Trade-off: the API does not wait for the rotation, so until it commits a 1.1 request returns retryable 'unavailable' while 1.0 is unaffected. Question: accept the meta marker, or require v18 via a mechanical follow-up slice? [decision]
  2. mail_peer_info will advertise ['mail-people/1.0','mail-people/1.1']. The pinned 1.0 info schema (schema.json:634-642) allows only one item, const 1.0. A People Mind build that validates info strictly against its pinned 1.0 kit would reject the new document during the migration window; dev/people-mind-mcp is not readable from this sandbox. Lean: advertise both (contract README:13) and deploy Mail Mind with or after dev/people-mind-mcp#68. Question: accept that deploy ordering, or keep info at 1.0 until #68 lands? [decision]
  3. The ruling says the 1.0 migration window 'can be short' but sets no length. Lean: the contract README announces that 1.0 is served until the first Mail Mind release after dev/people-mind-mcp#68 is deployed and reading 1.1, and that its removal is a separate issue. Question: accept, or fix a calendar date? [decision]
  4. Snapshot rule 5 takes a row's envelope at H from peer_entities, which holds the latest add's envelope. Suppose an entity is deleted and re-added after H and the owner set changed between the two adds. The snapshot row at H then shows the re-add's from_owner, while the earlier feed add carried the old value. date is unaffected because headers are immutable. Lean: accept and record it in ADR 0012 Consequences. Question: accept, or require per-event values (a projection-history change outside this scope)? [decision]
  5. Per-add cost of the owner probe: for a heavy non-owner sender it walks every messages_from row for that sender on each add. Post-merge check on the host: build a 210k-row synthetic store with the scripts/bench_feed.py builder, then time upsert_messages of 5,000 adds from one non-owner sender before and after the change and report the delta in the PR. If it is material, add a messages(account, from_addr, mailbox) index in a follow-up. [verification]
  6. Live proof after deploy: call mail_peer_info and confirm contracts lists both versions. Then take one mail_peer_snapshot_v1 page with contract='mail-people/1.1' and confirm two things: the rows' date values are not all equal (the defect was 83,368 of 83,376 sharing the v16 initialisation time), and at least one row has from_owner true. Report counts only, never addresses. [verification]

Change: Store date and from_owner inside the immutable add envelope JSON. In store.py, _emit (:998-1071) keeps its positional signature and headers becomes (from, to, cc, date_utc). For add and repair, from_owner is computed in the emitting tx with a nested-EXISTS statement: the message's own mailbox is Sent/Drafts, OR a non-empty from_addr is seen in Sent/Drafts of the same account. It uses PK and messages_from SEARCH only, so the no-SCAN guard in test_store.py:637-641 stays green. _rebuild_peer (:950-979) loads the owner box and sender sets once, using the uncorrelated _SELF_SENDERS pattern at :2642-2644, and writes meta peer_profile=mail-people/1.1 atomically. Store.init routes a store missing that marker through _check_continuity with reason contract_upgrade, which gives one new epoch, keeps source_id and honours the marker (DD-271); there is no SCHEMA_VERSION bump. _peer_envelope gains an optional facts arg and _peer_date converts the date_utc datetime() form to Z. _peer_capped caps only from/to/cc and passes other keys through. peer.py adds CONTRACT_1_1/CONTRACTS and threads contract (default 1.0) through scope_id, both seal/open cursor pairs and render. PeerChanges/PeerSnapshot gain a trailing contract field. A new served_envelope() projects to {from,to,cc} for 1.0 (byte-identical) and requires date and from_owner for 1.1, else PeerError('unavailable'), never a lookup. Schema literals mirror the contract files. schema.json keeps its root def names and adds envelope_1_1/event_1_1/snapshot_row_1_1, selected by an if contract==1.1 allOf branch in changes and snapshot, copying the event if/then pattern at schema.json:312-336. The contract enum covers requests, evidence and info (maxItems 2). conformance.check_envelope iterates from/to/cc only. server.py handlers accept in peer.CONTRACTS and pass contract through. ADR 0012 rule 3/4/12 and ADR 0008 §9/§10, plus README/SECURITY docs, are amended.

Files: contracts/mind-v1/README.md · contracts/mind-v1/schema.json · contracts/mind-v1/requests.schema.json · contracts/mind-v1/conformance.py · contracts/mind-v1/fixtures/changes-1.1.json · tests/test_peer_contract.py · src/mail_mind_mcp/peer.py · src/mail_mind_mcp/store.py · src/mail_mind_mcp/server.py · docs/adr/0012-mail-peer-feed-implementation.md · docs/adr/0008-evidence-scope.md · tests/test_peer_changes.py · tests/test_peer_snapshot.py · tests/test_store.py · README.md · SECURITY.md

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

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

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

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-04-the-mail-peer-feed-carries-no-message-date-or-owner-flag-rul.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-04-the-mail-peer-feed-carries-no-message-date-or-owner-flag-rul.md

### ⏸ SVD architect gate: dev/mail-mind-mcp#184 the-mail-peer-feed-carries-no-message-date-or-owner-flag-rul **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:** `20261104T064444Z-886de0fa` **Held because:** CLEAN but 6 open risk(s) (2 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. The ruling's scope says 'stored envelope and schema bump'. This spec instead triggers one upgrade epoch with an atomic meta marker (peer_profile=mail-people/1.1) and does not set SCHEMA_VERSION=18. Reasons: there is no table DDL change; ADR 0012:31 and ADR 0008 §9/§10 kept the version for idempotent peer changes; and a bump rewrites schema_version()==17 in 11 test files, which pushes the written set past the 16-file ceiling. Trade-off: the API does not wait for the rotation, so until it commits a 1.1 request returns retryable 'unavailable' while 1.0 is unaffected. Question: accept the meta marker, or require v18 via a mechanical follow-up slice? [decision] 2. mail_peer_info will advertise ['mail-people/1.0','mail-people/1.1']. The pinned 1.0 info schema (schema.json:634-642) allows only one item, const 1.0. A People Mind build that validates info strictly against its pinned 1.0 kit would reject the new document during the migration window; dev/people-mind-mcp is not readable from this sandbox. Lean: advertise both (contract README:13) and deploy Mail Mind with or after dev/people-mind-mcp#68. Question: accept that deploy ordering, or keep info at 1.0 until #68 lands? [decision] 3. The ruling says the 1.0 migration window 'can be short' but sets no length. Lean: the contract README announces that 1.0 is served until the first Mail Mind release after dev/people-mind-mcp#68 is deployed and reading 1.1, and that its removal is a separate issue. Question: accept, or fix a calendar date? [decision] 4. Snapshot rule 5 takes a row's envelope at H from peer_entities, which holds the latest add's envelope. Suppose an entity is deleted and re-added after H and the owner set changed between the two adds. The snapshot row at H then shows the re-add's from_owner, while the earlier feed add carried the old value. date is unaffected because headers are immutable. Lean: accept and record it in ADR 0012 Consequences. Question: accept, or require per-event values (a projection-history change outside this scope)? [decision] 5. Per-add cost of the owner probe: for a heavy non-owner sender it walks every messages_from row for that sender on each add. Post-merge check on the host: build a 210k-row synthetic store with the scripts/bench_feed.py builder, then time upsert_messages of 5,000 adds from one non-owner sender before and after the change and report the delta in the PR. If it is material, add a messages(account, from_addr, mailbox) index in a follow-up. [verification] 6. Live proof after deploy: call mail_peer_info and confirm contracts lists both versions. Then take one mail_peer_snapshot_v1 page with contract='mail-people/1.1' and confirm two things: the rows' date values are not all equal (the defect was 83,368 of 83,376 sharing the v16 initialisation time), and at least one row has from_owner true. Report counts only, never addresses. [verification] **Change:** Store date and from_owner inside the immutable add envelope JSON. In store.py, _emit (:998-1071) keeps its positional signature and headers becomes (from, to, cc, date_utc). For add and repair, from_owner is computed in the emitting tx with a nested-EXISTS statement: the message's own mailbox is Sent/Drafts, OR a non-empty from_addr is seen in Sent/Drafts of the same account. It uses PK and messages_from SEARCH only, so the no-SCAN guard in test_store.py:637-641 stays green. _rebuild_peer (:950-979) loads the owner box and sender sets once, using the uncorrelated _SELF_SENDERS pattern at :2642-2644, and writes meta peer_profile=mail-people/1.1 atomically. Store.__init__ routes a store missing that marker through _check_continuity with reason contract_upgrade, which gives one new epoch, keeps source_id and honours the marker (DD-271); there is no SCHEMA_VERSION bump. _peer_envelope gains an optional facts arg and _peer_date converts the date_utc datetime() form to Z. _peer_capped caps only from/to/cc and passes other keys through. peer.py adds CONTRACT_1_1/CONTRACTS and threads contract (default 1.0) through scope_id, both seal/open cursor pairs and render. PeerChanges/PeerSnapshot gain a trailing contract field. A new served_envelope() projects to {from,to,cc} for 1.0 (byte-identical) and requires date and from_owner for 1.1, else PeerError('unavailable'), never a lookup. Schema literals mirror the contract files. schema.json keeps its root def names and adds envelope_1_1/event_1_1/snapshot_row_1_1, selected by an if contract==1.1 allOf branch in changes and snapshot, copying the event if/then pattern at schema.json:312-336. The contract enum covers requests, evidence and info (maxItems 2). conformance.check_envelope iterates from/to/cc only. server.py handlers accept `in peer.CONTRACTS` and pass contract through. ADR 0012 rule 3/4/12 and ADR 0008 §9/§10, plus README/SECURITY docs, are amended. **Files:** `contracts/mind-v1/README.md` · `contracts/mind-v1/schema.json` · `contracts/mind-v1/requests.schema.json` · `contracts/mind-v1/conformance.py` · `contracts/mind-v1/fixtures/changes-1.1.json` · `tests/test_peer_contract.py` · `src/mail_mind_mcp/peer.py` · `src/mail_mind_mcp/store.py` · `src/mail_mind_mcp/server.py` · `docs/adr/0012-mail-peer-feed-implementation.md` · `docs/adr/0008-evidence-scope.md` · `tests/test_peer_changes.py` · `tests/test_peer_snapshot.py` · `tests/test_store.py` · `README.md` · `SECURITY.md` **Decision:** accept the 6 open risk(s) above and dispatch this spec (`svd:go`), or park (`svd:skip`) / re-spec (`svd:respec`)? **Your call** (when this issue is held at the gate via `svd:hold`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-04-the-mail-peer-feed-carries-no-message-date-or-owner-flag-rul.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-04-the-mail-peer-feed-carries-no-message-date-or-owner-flag-rul.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/mail-mind-mcp#184 the-mail-peer-feed-carries-no-message-date-or-owner-flag-rul completed integration verify.

  • PR: #185
  • Branch: feat/svd-dev-mail-mind-mcp-184-the-mail-peer-feed-carries-no-9840c573
  • Commit: 1610e8065b
  • 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/62/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: The subagent deviations are stale. They describe commit 3944ec1. The PR head is 1610e80, and it fixes each one: the peer_profile key is in tests/test_peer_evidence.py, the E501 lint errors are gone, the five docs carry the 1.1 contract, and the 3 failing tests now pass. The remaining self-review entry is the Sent mailbox role in the two owner tests, which stays advisory. The tests pass, and this lens did not check that role.
  • Warning: The spec's open risks 5 and 6 (post-merge and post-deploy verification) are not covered here. The deploy order is a hard rule: People Mind #68 must accept the two-item contracts list and deploy first.
  • Warning: make check logs 'Logging error ... I/O operation on closed file' noise during the test run. It does not fail any test.
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Rework: 1 round(s), outcome converged
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261104T075152Z-9840c573 --confirm-merge)
spec-verify-dispatch Half B for dev/mail-mind-mcp#184 the-mail-peer-feed-carries-no-message-date-or-owner-flag-rul completed integration verify. - PR: https://git.groupthink.asia/dev/mail-mind-mcp/pulls/185 - Branch: feat/svd-dev-mail-mind-mcp-184-the-mail-peer-feed-carries-no-9840c573 - Commit: 1610e8065b1fe61794682e66b985fef2ff09a5f2 - 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/62/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: The subagent deviations are stale. They describe commit 3944ec1. The PR head is 1610e80, and it fixes each one: the peer_profile key is in tests/test_peer_evidence.py, the E501 lint errors are gone, the five docs carry the 1.1 contract, and the 3 failing tests now pass. The remaining self-review entry is the Sent mailbox role in the two owner tests, which stays advisory. The tests pass, and this lens did not check that role. - Warning: The spec's open risks 5 and 6 (post-merge and post-deploy verification) are not covered here. The deploy order is a hard rule: People Mind #68 must accept the two-item contracts list and deploy first. - Warning: make check logs 'Logging error ... I/O operation on closed file' noise during the test run. It does not fail any test. - CI wait: ci/woodpecker/pr/validation -> pass - Rework: 1 round(s), outcome converged - Decision: review the PR and merge? (`codex-svd ship --run-id 20261104T075152Z-9840c573 --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#184
No description provided.