Mail peer: rebuild the projection when [owner] emails changes #69
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/people-mind-mcp#69
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
A change to
[owner] emailsre-derives the Mail peer projection, so existing support rows follow the new owner set.Context
_mail_targetsand_mail_allowed(sync.py) readsource.owner_emailswhen a page or snapshot row is applied. The result is stored inmail_support(direction, and which addresses count). Nothing records which owner set produced those rows. After the operator adds an owner address, the old rows keep the old direction until the next snapshot, and only an identity change or a cursor error starts one. There is no command to start a rebuild.Live case (starbase-syd, 2026-11-04): Mail Mind's Sent role holds about 25 owner From values, and the config lists 3. Adding the missing addresses today corrects only events that arrive after the change.
Scope
mail_peer(a migration), or derive it from config at each pass and store it beside the identity._mail_reset_snapshot), and logmailmind-rebuild.[owner] emailstriggers one rebuild.The first pass after the migration has no stored digest. Record it without a rebuild.
Acceptance criteria
Filed under: operator word "file them." sha256:237e55ef9da1 (People Mind mail cross-check, test 6)
⏸ SVD architect gate: dev/people-mind-mcp#69 mail-peer-rebuild-the-projection-when-owner-emails-changes
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:
20261104T064531Z-dffc8edeHeld because: CLEAN but 3 open risk(s) (1 verification · 2 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
SELECT error FROM sync_log WHERE error='mailmind-rebuild'gains exactly one row. After the drain,SELECT direction, COUNT(*) FROM mail_support GROUP BY directionshould show the out count risen. Also check that runningpeople-mind syncwhile serve is up during the schema-8 upgrade leaves both processes running, with no store-unavailable, and thatpeople-mind checkprints schema=8. [verification]Change: store.py open_writer (:130-161): replace the tail at :151-154 with
if version < SCHEMA_VERSION: if version < 7: VACUUM; with transaction(conn): re-read PRAGMA user_version (raise store-schema-ahead if >8); if <8: ALTER only when pragma_table_info lacks owner_digest, then SCHEMA_8. transaction() is BEGIN IMMEDIATE (:226-235), so concurrent writers serialise and the loser re-reads 8 and no-ops. SCHEMA_7 is removed and folded in, so no step can lower user_version. Leave MIGRATIONS unchanged. sync.py: add _mail_owner_digest beside _mail_digest (:192-199), an HMAC-SHA256 under the tombstone salt over the sorted normalised owner_emails. In the _peer_pass identity transaction (:547-556), mirror the identity-change branch: a mismatch against a non-NULL stored digest runs _mail_reset_snapshot plus mailmind-rebuild; a NULL stored digest is recorded without a rebuild.Files:
src/people_mind_mcp/store.py·src/people_mind_mcp/sync.py·README.md·docs/adr/0010-mail-peer-v1-consumer-implementation.md·tests/test_mailpeer.py·tests/test_identity.py·tests/test_config_cli.py·tests/test_embed.py·tests/test_deploy.pyDecision: accept the 3 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-peer-rebuild-the-projection-when-owner-emails-changes.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-04-mail-peer-rebuild-the-projection-when-owner-emails-changes.mdspec-verify-dispatch Half B for dev/people-mind-mcp#69 mail-peer-rebuild-the-projection-when-owner-emails-changes completed integration verify.
0b4c913bddcodex-svd ship --run-id 20261104T081621Z-8e6243c8 --confirm-merge)