Write tools: people_link merge and alias, so deprecated addresses can join a Person #78
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.
Blocks
#98 Accept or edit an enrichment suggestion from an MCP card
dev/people-mind-mcp
Reference
dev/people-mind-mcp#78
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 mounts the
people_linkwrite tool with themergeandaliasactions,people_undofor links, andpeople_actions. The Owner or an agent can then merge two Persons, or attach a deprecated email address to a Person as an Attached Handle, without putting that address on a contact card.Contract
Build to ADR 0005 as amended. Amendment 1 is the shared write-action contract (#97, merged in #121). Amendment 2 is the links contract from the #78 grill of 2026-11-05 (PR #122). Where this body and the ADR differ, the ADR wins.
Context
src/people_mind_mcp/server.pymounts read tools only. Awritescope and a singleauth.write_token_filewith one label exist (config.py:61-73,auth.py:51-64). No outbox, Action table, undo record or revision exists yet.people_link. Today the only way to join two Persons is to put both addresses on one contact card, so the exact-Handle ingest path merges them (graph.py:333-357).robert.fisher0pair.graph.py:428-438).merge_personsdeletes the merged-away Person and keeps nothing an undo could use (graph.py:235-265). The primary email is the lowest-id matchable Handle (views.py:14).Scope
In scope, from ADR 0005 Amendment 1 (the shared foundation, built once here):
viaon every Action (rulings 5 to 7);queued,applied,conflictandfailed, and charging when an Action is queued (rulings 4 and 11);people_actionswith the ruling 17 columns and filters.In scope, from ADR 0005 Amendment 2:
link.alias(rulings 1 to 4) andlink.merge(rulings 5 to 6);would-remergeandsupersededrefusals, and its feed entries (rulings 7 to 11);Out of scope:
link.splitandhandle.move(#109);people_note;people_forget, which stays unmounted until #55 and #114 land;Acceptance criteria
viaastool.people_link action=aliasattaches an unowned email Handle to a named Person. The next contacts pass, and a Mail peer rebuild, keep it on that Person, and a mail record from that address resolves to that Person.aliasof a Handle another Person holds endsfailedwith reasonhandle-owned, names that Person, and changes nothing.conflictwith reasonevidence-joined.people_link action=mergemerges two Persons.people_undowithinwrites.undo_daysrestores the merged-away Person under its original id, including field rows that a re-sync rewrote after the merge. The feed showsaddfor the restored Person andupdatefor the survivor.conflictwith reasonwould-remergewhen the two sides now share an exact Handle, and with reasonsupersededafter a later merge moved the same links.mergewith the Owner, andaliasonto the Owner, endfailedwith reasonowner.Error: idempotency-conflict.conflictand changes nothing.rate_limitedand queues nothing.people_actionslists each Action withid | kind | state | author | via | requested | applied | detail, filters by id and state, and shows ids only indetail.Blocked by
main(PR #122) before dispatch.Ruling (2026-11-05)
Grilled 2026-11-05: 16 questions over two rounds; the operator accepted every lean. The rulings are ADR 0005 Amendment 2. Token deployment moved to starbase/iac#345, which keeps the credential act with a human.
Filed under: operator word "accept" sha256:c125d0397b60 (dev/people-mind-mcp #70 deprecated addresses); grill words "accept", "acc", "go"
⏸ SVD architect gate: dev/people-mind-mcp#78 write-tools-people-link-merge-and-alias-so-deprecated-addres
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:
20261105T112934Z-82b0c5b7Held because: CLEAN but 10 open risk(s) (2 verification · 8 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
Error: idempotency-conflict/rate_limited, but the house format isError: code=<code>(rows.py:16, server.py:92). Lean: keep the house format. Accept, or special-case these two lines to the ADR text? [decision]sync --oncedoes not drain the outbox: cli.py left the write set to fit tests/test_embed.py under the ceiling. Deployed sync runs without --once (compose.yaml:5, deployment.yaml:59), so run_forever's action worker applies Actions. Lean: accept, and file a follow-up that adds actions.drain to cli._sync. Accept, or re-slice (e.g. README to its own PR) to bring cli.py back? [decision]Change: New src/people_mind_mcp/actions.py outbox. It mirrors graph.py's SQL-constant and transaction() style, store.open_positions (store.py:206-233) for the authorizer-limited open_outbox, embed_worker (sync.py:756-770) for the action worker, and server._render (server.py:82-96) for the Error: code= answers. Schema 11 follows the schema-10 precedent through the idempotent UPGRADES/TABLES/INDEXES upgrade block (store.py:163-175), not MIGRATIONS. Rework change: cli.py leaves the write set (sync --once does not drain; the deployed run_forever drains). tests/test_embed.py:64 joins the set for its hardcoded user_version == 10, so the set stays at 16 files.
Files:
src/people_mind_mcp/config.py·src/people_mind_mcp/auth.py·src/people_mind_mcp/store.py·src/people_mind_mcp/graph.py·src/people_mind_mcp/actions.py·src/people_mind_mcp/server.py·src/people_mind_mcp/views.py·src/people_mind_mcp/sync.py·tests/test_actions.py·tests/test_auth.py·tests/test_identity.py·tests/test_config_cli.py·tests/test_deploy.py·tests/test_mailpeer.py·tests/test_embed.py·README.mdWrite-set divergence: present table wins. structured return named src/people_mind_mcp/config.py, src/people_mind_mcp/auth.py, src/people_mind_mcp/store.py, src/people_mind_mcp/graph.py, src/people_mind_mcp/actions.py, src/people_mind_mcp/server.py, src/people_mind_mcp/views.py, src/people_mind_mcp/sync.py, tests/test_actions.py, tests/test_auth.py, tests/test_identity.py, tests/test_config_cli.py, tests/test_deploy.py, tests/test_mailpeer.py, tests/test_embed.py, README.md, src/people_mind_mcp/cli.py; table names src/people_mind_mcp/config.py, src/people_mind_mcp/auth.py, src/people_mind_mcp/store.py, src/people_mind_mcp/graph.py, src/people_mind_mcp/actions.py, src/people_mind_mcp/server.py, src/people_mind_mcp/views.py, src/people_mind_mcp/sync.py, tests/test_actions.py, tests/test_auth.py, tests/test_identity.py, tests/test_config_cli.py, tests/test_deploy.py, tests/test_mailpeer.py, tests/test_embed.py, README.md.
Decision: accept the 10 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-05-write-tools-people-link-merge-and-alias-so-deprecated-addres.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-05-write-tools-people-link-merge-and-alias-so-deprecated-addres.mdspec-verify-dispatch Half B for dev/people-mind-mcp#78 write-tools-people-link-merge-and-alias-so-deprecated-addres completed integration verify.
f29439f8bapython3 -m pytestlacks phonenumbers; collection and tests ran throughuv run, as the spec prescribes.codex-svd ship --run-id 20261105T195711Z-0892ca50 --confirm-merge)