The Mail peer feed carries no message date or owner flag: rule on mail-people/1.1 #184
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp#184
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
atas a send date. The contract says it is not one: "A change'satis 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.mail-people/1.0feed and snapshot carry no message date. Theaddenvelope holds onlyfrom,toandcc(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] emailslist, which misses owner addresses outside that list and every Exchange X.500 sender, whosefromis empty.Rules that already bind the fix
contracts/mind-v1/README.md:13). A new field meansmail-people/1.1, not an amended 1.0.addMUST NOT look up today's mutable message row" (contracts/mind-v1/README.md:40). Events already inpeer_eventscan 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.Directions (not decided)
mail-people/1.1withdate, and optionallyfrom_owner.date: the storeddate_utc(store.py:131) as aZtimestamp, or null when it is''.from_owner: a boolean from the ADR 0008 §4 rule. It names no mailbox.addenvelope and the snapshot row. Consumers migrate once.contracts/mind-v1/with fixtures andtests/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.mail-people/1.0. People Mind dates "first seen" and "last seen" from the received and sent date spans thatmail_peer_evidence_v1already 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
from_ownerships: 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
contracts/mind-v1/when direction 1 is chosen.addevent 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.0stays served through the announced migration window. After the upgrade, existing rows reach consumers with dates through the new epoch's snapshot.from_owner: a fixture covers an owner message, a non-owner message and an owner message with an emptyfrom.make checkstays green.Related
Filed under: operator word "file date gap" sha256:e417d968967b
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.0envelope does not say so.Live evidence (read-only queries on starbase-syd,
mode=ro):fromis in its configured[owner] emails. The deployment lists 3 addresses.piersdd@ssl-mail.com(1,720),piers@tasmanet.com.au(1,436) andpiers@groupthink.asia(980)./o=tasmanet/…, 567 messages;/o=exchangelabs/…, 260). The envelope carries an emptyfromfor 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_owneron theaddenvelope and snapshot row carries that fact without naming any mailbox. If the contract changes fordate, the same minor version could carryfrom_owner, so consumers migrate once. The same questions apply: the fixtures, ADR 0012 rule 3, and rows already inpeer_events, which the read can derive frommessages.The People Mind consumer change is dev/people-mind-mcp#68.
The Mail peer feed carries no message date, so People Mind dates interactions at import timeto The Mail peer feed carries no message date or owner flag: rule on mail-people/1.1Ruling (2026-11-04)
The operator accepted these leans. They answer the two questions under
## Human act.mail-people/1.1, with two fields on theaddenvelope and on the snapshot row. Consumers migrate once.people_recentrows would have no date. A consumer owner-address list can not match an X.500 sender, whosefromis empty.mail-people/1.0stays served through an announced migration window (contracts/mind-v1/README.md:13). People Mind is the only consumer, so the window can be short.date. The storeddate_utc(store.py:131) as an RFC 3339Ztimestamp: the Date header, else the internal date. Null when neither parses (date_utc = '').from_ownersemantics: (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.falseuntil the next epoch re-derives it. ADR 0012 records this gap.contracts/mind-v1/README.md:40).dateandfrom_ownerfrom the rows that exist. Old events are never given the new fields at read time.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 andtests/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
⏸ 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 efforthighRun:
20261104T064444Z-886de0faHeld because: CLEAN but 6 open risk(s) (2 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
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.CONTRACTSand 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.mdDecision: 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):svd:go— approve; Half-B dispatch accepts exactly this spec (open risks accepted)svd:firebesidesvd:go— approve AND authorise the Half-B fire from the phone; never on its ownsvd:skip— park it; dispatch refuses it and the issue stays for a humansvd:respec— discard this spec; the next Half-A run re-produces it with this record as prior-attempt contextSpec:
/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.mdspec-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.
1610e8065b3944ec1. The PR head is1610e80, 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.codex-svd ship --run-id 20261104T075152Z-9840c573 --confirm-merge)