Compare identities and apply merge or alias from a card #107
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.
Blocks
Depends on
#109 Split mistaken identities and move Handles durably
dev/people-mind-mcp
#110 Represent shared phones and mailboxes without merging people
dev/people-mind-mcp
#98 Accept or edit an enrichment suggestion from an MCP card
dev/people-mind-mcp
Reference
dev/people-mind-mcp#107
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?
Parent
#96
What to build
Compare two Persons with their Handles and provenance and invoke #78’s merge/alias/undo commands.
Acceptance criteria
Blocked by
Filed under: operator word "ok" sha256:2689367b205c
⏸ SVD architect gate: dev/people-mind-mcp#107 compare-identities-and-apply-merge-or-alias-from-a-card
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:
20261105T230152Z-612e114eHeld because: CLEAN but 5 open risk(s) (3 verification · 2 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
726d113,eebbd86and4c4776d. Check: confirm dev/people-mind-mcp#98 is closed before dispatch. [verification]eebbd86, before the first edit, run uv run python3 -m pytest tests/test_card_app.py tests/test_actions.py tests/test_review.py tests/test_server.py -q and assert the post-change failure set (with tests/test_compare.py added) equals the baseline set. [verification]Change: Move RANK_SURVIVORS (graph.py:126-129) into identity.py as identity.survivor(), and have graph._rank (graph.py:253-255) delegate to it, so the comparison and link_merge share one survivor rule. views.py and server.py may not import graph (tests/test_server.py:444-479). Add views.compare() / compare_text() as a pure reader shaped like card_suggestions and card (views.py:203-302). It resolves ids through _person_id, sets blocked=owner|same-person to mirror graph.py:698-701, and returns both Person revisions, names, handles with Source, fields with Author or Source and confidence (same RESTRICTED filter, with the card field loop factored so card output stays byte-identical), Suggestions with a shared flag, and resolves rows (the merged id plus its redirects mapped to the survivor). In server.py add public people_compare (read, bound to CARD_URI) and app-only people_card_compare (JSON plus writable flags), mirroring people_card / people_card_suggestions (server.py:129-144, 241-263). Move the people_link and people_undo bodies (server.py:296-325, 381-396) into _link(via) and _undo(via) helpers, and add app-only people_card_link and people_card_undo with via=app, mirroring the people_review / people_card_review / _review split (server.py:328-378). Register them in build_app (server.py:450-466). The worker (_apply_action, link_merge, unmerge) is unchanged. Extend card.html with a compare mode, entered from tool-input other_id or a 'compare |' tool-result line. It renders both sides, survivor and old ids, offers Merge with the loaded revisions (a conflict shows stale-view plus Reload), Undo via people_card_undo, and an Attach-handle alias whose handle-owned failure offers Compare with the holder. Text goes in through textContent only. Document the tools in README.
Files:
src/people_mind_mcp/identity.py·src/people_mind_mcp/graph.py·src/people_mind_mcp/views.py·src/people_mind_mcp/server.py·src/people_mind_mcp/card.html·tests/test_compare.py·tests/test_card_app.py·tests/test_server.py·tests/test_actions.py·README.mdDecision: accept the 5 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-compare-identities-and-apply-merge-or-alias-from-a-card.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-05-compare-identities-and-apply-merge-or-alias-from-a-card.mdspec-verify-dispatch Half B for dev/people-mind-mcp#107 compare-identities-and-apply-merge-or-alias-from-a-card completed integration verify.
3cf252fae5codex-svd ship --run-id 20261105T231425Z-22b1e722 --confirm-merge)