Split mistaken identities and move Handles durably #109
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.
Depends on
#107 Compare identities and apply merge or alias from a card
dev/people-mind-mcp
#108 Decide durable separation and shared-endpoint identity
dev/people-mind-mcp
Reference
dev/people-mind-mcp#109
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
Repair an incorrect merge by selecting Handles and records to move, and remember explicit separation decisions.
Acceptance criteria
Blocked by
Filed under: operator word "ok" sha256:2689367b205c
⏸ SVD architect gate: dev/people-mind-mcp#109 split-mistaken-identities-and-move-handles-durably
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:
20261106T004823Z-bbe33bf0Held because: CLEAN but 7 open risk(s) (2 verification · 5 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
96f0dd8(#134) and64df4fe(#126, ADR 0002 Am.2). Check at the gate: both issues are closed on git.groupthink.asia, or #108's remaining scope is ADR-only. [verification]Change: Add three links-bucket kinds: link.split (carve into a new Person), handle.move (carve into an existing Person) and identity.separate (record that two Persons are different). Both the preview and the worker use one read-only graph.split_plan.
Allocation rules: links are named by hashed refs, never raw source_record. Handles are named, or follow their origin link. Rows keyed to a link move with it, using the per-link UPDATE loop of graph.unmerge:588-602. Unnamed local rows stay with the remainder. A decided Suggestion must be named, or the split is refused as ambiguous.
Refusals mirror merge undo's would-remerge check at graph.py:905-913: a split is refused when a live link's claim on a Handle would cross sides. Guard order mirrors link.merge at graph.py:705-723 (redirected, owner, revision).
carve() creates C (feed add) or uses target T, moves rows, refreshes Suggestions, repairs display names, writes a separations row and emits update. It never touches person_redirects.
Undo of a split uses _merge_ranked(P, C) with P forced as survivor, giving a C→P redirect and a merge feed row. Undo of a move uses unmerge-style move-back with the alias evidence-joined check. Undo of a separate deletes the separation row.
Ingest (graph.py:359-398) gets a SEPARATED query that resolves redirects. A linked record's Handle that collides with a separated holder is held in handle_holds (FK cascade to the holder's Handle). An unlinked bridging record returns the new Outcome.held_separated and writes nothing.
Schema 13 is additive through store.TABLES/INDEXES and the open_writer upgrade block (store.py:189-217). forget gains a separations delete. people_link and people_card_link widen their action Literal and add handles/links/items lists. Two new read tools: people_split_preview and the app-only people_card_split. The card.html compare view gets a Split… flow; the Card gets held and separated rows; compare gets a separated cell.
Files:
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/card.html·README.md·tests/test_split.py·tests/test_actions.py·tests/test_server.py·tests/test_card_app.py·tests/test_mailpeer.py·tests/test_identity.pyDecision: accept the 7 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-06-split-mistaken-identities-and-move-handles-durably.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-06-split-mistaken-identities-and-move-handles-durably.mdSVD gate record: #109, HOLD (architect gate 2026-11-06, 12:06 AEDT)
Measured facts
20261106T004823Z-bbe33bf0: CLEAN, 0 blocking defects, 13 primary files, anchored atmain297468f.store.py, Approach §A). The bump is forward-only: a revert needs a backup restore.Buckets
endpoint.shareand the ADR 0002 Amendment 2 ruling 10 migration flag belong to #110. ADR 0005 Amendment 3 ruling 4: split undo "moves them back by source link".people_find <address>returns the carved id withmerged=0on that pass.merge(P,C)), ordel Cplusupdate Pwith no redirect, refusing withreason=contributionswhen C gained later rows.identity.separatecarries no revision; (b) an explicitlink.mergeof two separated Persons applies and the separation goes inert until merge undo, instead of refusing withreason=separated; (c) a repeated separate answersalready-separated.handle.moveships in #109 or in its own issue.Ruling
HOLD. Two auto-gate halt rules apply: a schema migration (12 to 13), and design forks (D1 to D5) that no ADR rules. #109 goes to the operator for a grill and an ADR 0005 amendment. After the rulings, re-run Half-A on the then-current
main.Drafted line
None. No
svd:goadded. No Half-B fired.Delegation
"auto-gate" and the einfari queue (gate). The auto-gate halts on a migration or an unruled design fork; those return to the operator.
Spec:
2026-11-06-split-mistaken-identities-and-move-handles-durably.md, Open Risks. Ledger:2026-W45-arch.⏸ SVD architect gate: dev/people-mind-mcp#109 split-mistaken-identities-and-move-handles-durably
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:
20261106T035118Z-f6a49a5cHeld because: CLEAN but 2 open risk(s) (2 verification) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
Change: Build the code the operator ruled in ADR 0005 Amendment 5 rulings 9-15. (1) Schema 14, mirroring #100's schema-13 diff in store.py (:19, :29-60, :71, :223): add a
separationstable, one row per Action keyed by action_id; addhandle_holds, shaped likehandle_claims, pointing at the holder's Handle, with the record's side read through source_links. (2) One read-only graph.split_plan, used by both the worker and views.split_preview. It names links by a hashed ref, never by source_record. Handles follow their origin link (R2), link-keyed rows follow their link with the unmerge loop (graph.py:601-608), and unnamed local rows stay with P (ruling 12).conflict reason=ambiguouscovers only the two Suggestion cases. would-remerge is narrowed to a named Handle whose own source link stays behind, so the ADR 0002 Household split applies. (3) carve() serves both link.split (new Person C: feed add then update) and handle.move (existing T). Guard order mirrors link.merge (graph.py:773-789). carve writes a Separation and runs _reconcile_holds, which turns cross-side claims into holds and collapses holds back into claims. identity.separate is a pure addition and answersfailed reason=already-separatedon a repeat. (4) Undo: a split folds C back with _merge_ranked(P, C) and P forced as survivor (ruling 9). A move moves the set back by source link, as Amendment 3 ruling 4 does. A separate deletes its row. (5) Ingest (graph.py:362-405) gains a redirect-resolving SEPARATED check. A colliding Handle on a linked record is held. An unlinked bridging record returns the new Outcome.held_separated, appended last in the enum, and writes nothing. link.merge is unchanged, so an explicit merge overrides a Separation (ruling 11). (6) forget deletes separations and holds. drain_actions' other_id falls back to record.other_id. The merge-undo superseded lookup also names a later split. people_link widens to split/move/separate with an explicit kind map. Two new read tools: people_split_preview and the app-only people_card_split. The Card gets separated and held rows, compare gets a separated cell, and card.html gets a Split… flow.Files:
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/card.html·README.md·tests/test_split.py·tests/test_actions.py·tests/test_server.py·tests/test_card_app.pyDecision: accept the 2 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-06-split-mistaken-identities-and-move-handles-durably.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-06-split-mistaken-identities-and-move-handles-durably.mdspec-verify-dispatch Half B for dev/people-mind-mcp#109 split-mistaken-identities-and-move-handles-durably completed integration verify.
128cb0245e128cb02. Local make check and the focused pytest run pass.codex-svd ship --run-id 20261106T042128Z-e95ffcd7 --confirm-merge)SVD gate and ship record: #109 (einfari gate 2026-11-06, merge 15:50 AEDT)
Measured facts
20261106T035118Z-f6a49a5c: CLEAN, 0 blocking defects, 11 Primary Files, based9e4df2. Schema 14 adds theseparationsandhandle_holdstables.20261106T041147Z-02f2fa78and20261106T041611Z-4660b06aoncodex/gpt-6.1-terrafailed. The coder stopped after 2 to 3 minutes and reverted its edits. There was no commit and no rate limit.codex/gpt-6.1-sol. Run20261106T042128Z-e95ffcd7committed128cb02and opened PR #139.readyForMergetrue, verified head equal to the dispatch commit, 0 rework rounds, CIci/woodpecker/pr/validationpass.128cb02:make checkgave 617 passed, 5 skipped, 0 failed. The base gave 575 passed..gitor pytest cache.card.htmladds noinnerHTML, nohttp(s)://and noeval(.5ed5f94.Buckets
Already decided: ADR 0005 Amendment 5 rulings 9 to 15 (split undo, Separation, explicit merge over a Separation,
ambiguous,handle.move, Held Handles, schema order). The three gate readings R1 in the spec's Agent Adjustments.Verification:
Both are post-merge operator checks.
Genuinely open: the wording of Amendment 5 ruling 13. Read literally, undoing a move folds T into P. The gate reading is that undo moves the links back by source link. A text fix needs the operator's word.
Ruling
tests/test_server.pynow lets the server importgraph. Before, the test banned it. The import follows from spec §B and invariant I1, which putgraph.split_planon theviewsreader. No ADR rule bans the import. The subprocess check still makes sure no source adapter and novobjectload whenpeople_mind_mcp.serveris imported. Accepted.Drafted line
codex-svd ship --run-id 20261106T042128Z-e95ffcd7 --confirm-merge(run, exit 0).Delegation
"this session is an einfari. you merge through 19:00" (gate,
svd:goand merge). "change dispatch to gpt-6.1-sol" (dispatch model).Spec:
2026-11-06-split-mistaken-identities-and-move-handles-durably.md, Agent Adjustments. Ledger:2026-W45-arch.