Mail interactions: use the message date and the owner flag, not the mutation time and the config list #68
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:fire
svd:go
svd:hold
svd:respec
svd:skip
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/people-mind-mcp#68
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?
Outcome
People Mind dates each mail interaction with the message's own date, and counts a message as outgoing whenever Mail Mind says the owner sent it.
Context
The cross-check on 2026-11-04 (live, starbase-syd, People
0.1.0-rc.7, Mail0.12.1) found two consumer defects. Both come from what themail-people/1.0envelope lacks:atas the interaction date (sync.py:_mail_snapshot_page,_mail_feed_page, andRESTORE_SUPPORTED). The contract saysatis the mirror mutation time, "not a claim about the original send time" (contracts/mind-v1/README.md:30at the pin). 83,368 of 83,376 mail interactions carry2026-11-03T21:13:17Z, the Mail v16 initialisation time. "Last seen" shows that time for every mail-sourced Person._mail_targetstreats a message as outgoing only whenfromis in[owner] emails. For Kim (p_WDFCNN9WMH), incoming matches Mail (229 against 228), but outgoing is 443 against Mail's 599. The 156 missing messages came from owner addresses outside the config. Messages from X.500 senders have an emptyfromand yield no interaction at all.The fixtures in
tests/test_mailpeer.pyuseatas a send date, so the tests did not catch the first defect.Scope
Wait for the contract ruling on dev/mail-mind-mcp#184 (the date, and
from_ownerin its comment). Then:dateandfrom_owner: consume both, re-snapshot once to re-derive existing support rows, and fix the fixtures;atas an interaction date.Amend ADR 0010 rules 3 and 10 to match.
Acceptance criteria
sentcount, or the ADR records why they differ.Blocked by
Filed under: operator word "file them." sha256:237e55ef9da1 (People Mind mail cross-check, test 6)
Scope addition from the dev/mail-mind-mcp#184 gate (2026-11-04)
The operator ruled dev/mail-mind-mcp#184 as direction 1:
mail-people/1.1addsdateandfrom_owner(owner status when the event is written) to theaddenvelope and the snapshot row, and the upgrade starts a new epoch. See the ruling comment on #184.Deploy order is a hard rule. During the migration window,
mail_peer_inforeturnscontracts: ["mail-people/1.0", "mail-people/1.1"]. The current consumer refuses that document:src/people_mind_mcp/sources/mailpeer.py:75allows exactly one item,Literal["mail-people/1.0"].src/people_mind_mcp/sources/mailpeer.py:333requiresinfo.contracts == [CONTRACT].So this issue must also:
contractslist that contains 1.0 and 1.1, and select 1.1 when it is offered;1.0 window. Mail Mind serves 1.0 until its first release after this issue is deployed and reading 1.1. Removing 1.0 is a separate Mail Mind issue.
Filed under: operator word "accept" sha256:c125d0397b60
Agent Brief
Category: bug
Summary: Consume
mail-people/1.1: date mail interactions with the messagedateand take direction fromfrom_owner, while staying compatible with a Mail Mind that offers only 1.0.Current behavior:
mail-people/1.0(sources/mailpeer.py:CONTRACT, theInfo.contractsfield, thecontractfield, and theinfo.contracts != [CONTRACT]check). A Mail Mind that lists["mail-people/1.0", "mail-people/1.1"]inmail_peer_infois refused.at, the mirror mutation time, as the interaction date (sync.py: the snapshot page, the feed page and the restore statement, throughmail_support). The contract saysatis "not a claim about the original send time". Live: 83,368 of 83,376 mail interactions carry2026-11-03T21:13:17Z.fromis in[owner] emails(sync.py,_mail_targets). Owner addresses outside that list, and X.500 senders whosefromis empty, give no outgoing interaction.21e279d(tests/contracts/mind-v1/ORIGIN,PINintests/test_contract_conformance.py), so it has no 1.1 schema.Decided (do not re-open):
c03472d. Under 1.1, everyaddevent and snapshot row carriesdate(RFC 3339Z, or null when unparsed) andfrom_owner(the ADR 0008 §4 owner status when the event was written). Mail Mind serves 1.0 and 1.1 during the migration window, andmail_peer_infolists both.Operator rulings at this triage (2026-11-04):
mail_peer_infooffers only 1.0. Select 1.1 whenever it is offered. Leaving dates empty under 1.0 was rejected.from_owneris true for a message in the Drafts role, and the envelope carries no role, so a draft can give an outgoing interaction. Accept this and record it in ADR 0010 as the reason the outgoing count can exceed Mail Mind's evidencesentcount.Desired behavior:
contractscontains 1.0, or 1.0 and 1.1. Refuse one that offers neither. Use 1.1 for feed, snapshot and evidence calls when it is offered, and 1.0 otherwise.date. A message with a nulldateis never dated withat. Default: it writes no interaction row, and its address still counts as support for the link. Record the choice in ADR 0010. Under 1.1, direction is outgoing whenfrom_owneris true. Owner exclusion of addresses intoandccstill uses[owner] emails.Key interfaces:
sources/mailpeer.py: contract selection, theInfoand page models, the 1.1 envelope (date,from_owner).sync.py:_mail_targets, the snapshot and feed page writers,mail_support, the restore and interaction statements.store.py:mail_supportgains the message date if needed (schema bump from 8).tests/contracts/mind-v1/: re-pin to Mail Mindc03472d9bfb9eb43981e538a19898f62e660f46e; copyschema.json,requests.schema.jsonand the fixtures byte for byte, and updateORIGIN,PINanddocs/contracts/mail-peer-v1.md.docs/adr/0010-mail-peer-v1-consumer-implementation.md: amend rules 3 and 10 for the 1.1 date and direction, and record the Drafts ruling.Acceptance criteria:
atdiffers fromdateand asserts the interaction date equalsdate.date: it supports the link and writes no dated interaction."from": []andfrom_owner: true: it gives outgoing interactions to thetoandccaddresses.mail_peer_infowith["mail-people/1.0"]keeps today's behaviour, and with both versions selects 1.1. A test covers each, plus a refusal for a list without 1.0 or 1.1.contracts/mind-v1at the new pin, and the conformance test passes.sentcount, or ADR 0010 records why they differ (Drafts, ruling 2). This is a post-deploy check, not a unit test.make checkstays green.Out of scope:
Filed under: operator word "yes" sha256:8a798890fe93
⏸ SVD architect gate: dev/people-mind-mcp#68 mail-interactions-use-the-message-date-and-the-owner-flag-no
Status: CLEAN after 1 rework round(s) · 0 blocking defect(s) · 0 lens(es) INCONCLUSIVE (could not run) · 0 lens(es) DEGRADED (deterministic denial) · complexity
substrate· dispatch efforthighRun:
20261104T093906Z-9b7dead8Held because: CLEAN but 4 open risk(s) (3 verification · 1 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
git -C <mail-mind> diff --stat 21e279d c03472d -- contracts/mind-v1and confirm that only those vendored paths (plus the non-vendored README.md and conformance.py) changed, and that the fixture is named changes-1.1.json. If info.json or any other vendored path changed, stop and report: Primary Files is at the 16-file ceiling, so it needs a re-slice. test_wire_every_fixture_validates_and_round_trips[changes-1.1.json] must pass. [verification]make test-integration. [verification]Change: mailpeer.py: CONTRACT_1_1, Envelope11(Envelope) with date/from_owner, contract-tied after-validators on Changes/Snapshot (Snapshot.completion pattern :157-161), info() selects 1.1 when offered, _contract_call echo check. store.py: SCHEMA_VERSION 9 via a generalised UPGRADES column-presence heal mirroring the #69 block at :153-165 (adds mail_peer.contract DEFAULT 1.0, mail_support.date/mail_staged.date backfilled = at only when absent). sync.py: _mail_date (getattr idiom of _mail_digest :194), from_owner direction in _mail_targets, every interaction writer/comparator switched from
attodate, contract switch folded into the _peer_pass rebuild. Re-pin vendored kit to Mail Mind c03472d. Schema-literal sweep: all 7schema=8/== 8literals (test_config_cli.py:119, test_identity.py:450, test_deploy.py:295/:328, test_mailpeer.py:392, test_embed.py:64, README.md:177) move to 9, each file keeping its literal style.Files:
src/people_mind_mcp/sources/mailpeer.py·src/people_mind_mcp/sync.py·src/people_mind_mcp/store.py·tests/test_mailpeer.py·tests/test_contract_conformance.py·tests/test_identity.py·tests/test_embed.py·tests/test_config_cli.py·tests/test_deploy.py·tests/contracts/mind-v1/ORIGIN·tests/contracts/mind-v1/schema.json·tests/contracts/mind-v1/requests.schema.json·tests/contracts/mind-v1/fixtures/changes-1.1.json·docs/contracts/mail-peer-v1.md·docs/adr/0010-mail-peer-v1-consumer-implementation.md·README.mdWrite-set divergence: present table wins. structured return named src/people_mind_mcp/sources/mailpeer.py, src/people_mind_mcp/sync.py, src/people_mind_mcp/store.py, tests/test_mailpeer.py, tests/test_contract_conformance.py, tests/test_identity.py, tests/test_embed.py, tests/test_config_cli.py, tests/test_deploy.py, tests/contracts/mind-v1/ORIGIN, tests/contracts/mind-v1/schema.json, tests/contracts/mind-v1/requests.schema.json, tests/contracts/mind-v1/fixtures/changes-1.1.json, docs/contracts/mail-peer-v1.md, docs/adr/0010-mail-peer-v1-consumer-implementation.md, README.md, tests/contracts/mind-v1/fixtures/info.json; table names src/people_mind_mcp/sources/mailpeer.py, src/people_mind_mcp/sync.py, src/people_mind_mcp/store.py, tests/test_mailpeer.py, tests/test_contract_conformance.py, tests/test_identity.py, tests/test_embed.py, tests/test_config_cli.py, tests/test_deploy.py, tests/contracts/mind-v1/ORIGIN, tests/contracts/mind-v1/schema.json, tests/contracts/mind-v1/requests.schema.json, tests/contracts/mind-v1/fixtures/changes-1.1.json, docs/contracts/mail-peer-v1.md, docs/adr/0010-mail-peer-v1-consumer-implementation.md, README.md.
Decision: accept the 4 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-mail-interactions-use-the-message-date-and-the-owner-flag-no.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-04-mail-interactions-use-the-message-date-and-the-owner-flag-no.mdspec-verify-dispatch Half B for dev/people-mind-mcp#68 mail-interactions-use-the-message-date-and-the-owner-flag-no completed integration verify.
f0ed8d1588codex-svd ship --run-id 20261104T100203Z-8d3e6264 --confirm-merge)