Owner config: attach newly added owner addresses to the Owner Person #73
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#73
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
An address added to
[owner] emailsjoins the Owner Person, and no other Person keeps a Handle or a Mail-sourced link for it.Context
#69 (
9f583ea) makes a change to[owner] emailsrebuild the Mail peer projection. After that rebuild, a new owner address no longer produces support rows (_mail_allowed,sync.py). Two gaps stay:graph.ensure_owner(graph.py:169-187) returns at once when an Owner Person exists. It never adds new config addresses as Handles of the Owner. Callers:cli.py:50andsync.py:664.source_linksrow. After the rebuild retracts its interactions, it is an orphan.Live case (starbase-syd, 2026-11-04): Mail Mind's Sent role holds about 25 owner From values, and the config lists 3. When the operator adds the missing addresses, about 22 of these orphans can appear.
Ruling (operator, 2026-11-04)
Merge the other Person into the Owner. ADR 0002 already decides this:
docs/adr/0002-identity-and-merge.md:16): "The Owner's Handles come from the[owner]config block, never from a Source." Soensure_ownermust add every config address to an existing Owner. The early return is a defect against rule 6.:12): a Handle belongs to exactly one Person. So the address cannot stay on the other Person.:13): an exact shared Handle merges silently. A config address is an exact Handle, so nopeople_linkis needed.merge_personsalready keeps the Owner as the survivor (RANK_SURVIVORSorders byis_owner DESC,graph.py:119). Use it; do not write a second merge path.Accepted trade-off: this merge is not a
people_linkaction, sopeople_undocannot reverse it. A wrong address in[owner] emailsmerges a real Person into the Owner silently. The repair is a manualpeople_linksplit.Scope
ensure_owner: for an existing Owner, add each normalised config email and phone that the Owner lacks as aconfig/ownerHandle, in the same way as the create path (_record_handles,_insert_handle).merge_personswith the Owner, and emit themergechange as usual.retract_record: no support and no Evidence). Prove this with a test; change the drain only if the test fails.Out of scope: removing Handles for addresses deleted from
[owner] emails, and any change to name matching.Acceptance criteria
message:interactions from it.make checkpasses.Blocked by
Filed under: operator word "leans" sha256:351a2e1b4b7a (dev/people-mind-mcp #69 gate)
⏸ SVD architect gate: dev/people-mind-mcp#73 owner-config-attach-newly-added-owner-addresses-to-the-owner
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:
20261104T104557Z-a9aa707aHeld because: CLEAN but 4 open risk(s) (1 verification · 3 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
cf32ff2it fails: activation's _mail_enqueue filters owner addresses out (sync.py:232-242, :340), and the drain's disallowed branch deletes pending/support without calling retract_record (:500-503). The spec therefore adds a LIVE_LINKS → retract_record loop to snapshot activation (sync.py between :327 and :328) and records it as ADR 0010 Amendment 3. The drain stays unchanged, so no Evidence request is ever sent for an owner address. Question: is retracting in activation, rather than enqueuing the owner address for the drain, the accepted form of 'change the drain'? Lean: yes. [decision]Change: (1) graph.ensure_owner (graph.py:179-195): replace the early return for an existing Owner with a reconcile loop over _record_handles(SourceRecord('owner', emails, phones), region). For each matchable handle held by another Person (FIND_EXACT_HANDLE), call merge_persons(conn, owner, holder). RANK_SURVIVORS is_owner DESC (graph.py:117-120) keeps the Owner as survivor, with the redirect and merge change. Merge before insert so the handles_exact unique index (store.py:55) never raises. Then run a new CLAIM_OWNER_HANDLE UPDATE that re-attributes the handle to config/owner (guarded so an already-config handle changes 0 rows), then _insert_handle. Emit UPDATE_PERSON_TIME + _change('update') only when conn.total_changes moved, mirroring ingest_record graph.py:341-344,390-392. The create path is unchanged. (2) sync._mail_snapshot_page activation: after the message: interaction DELETE (sync.py:320-327) and before DELETE FROM mail_support (:328), loop over LIVE_LINKS (sync.py:50) and call graph.retract_record for each address _mail_allowed rejects. Premise correction: _mail_enqueue (sync.py:232-242) never enqueues owner addresses, and the drain's disallowed branch (:500-503) never retracts, so the issue's 'drain retracts it' test would fail. The drain and _mail_enqueue stay unchanged, so no Evidence request is ever sent for an owner address. (3) Append ADR 0010 Amendment 3 (the #69 gate ruled amendments, not edits) plus one README:137 sentence about the silent merge.
Files:
src/people_mind_mcp/graph.py·src/people_mind_mcp/sync.py·docs/adr/0010-mail-peer-v1-consumer-implementation.md·README.md·tests/test_identity.py·tests/test_mailpeer.pyDecision: 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-owner-config-attach-newly-added-owner-addresses-to-the-owner.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-04-owner-config-attach-newly-added-owner-addresses-to-the-owner.mdspec-verify-dispatch Half B for dev/people-mind-mcp#73 owner-config-attach-newly-added-owner-addresses-to-the-owner completed integration verify.
4ff2c5c982codex-svd ship --run-id 20261104T110103Z-7cb7b962 --confirm-merge)