Accept or edit an enrichment suggestion from an MCP card #98
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
#99 Reject and reconsider suggestions in a persistent review queue
dev/people-mind-mcp
#100 Write context notes and stated personal preferences
dev/people-mind-mcp
#101 Correct current facts and preferred contact details
dev/people-mind-mcp
#102 Edit typed relationships from a Person Card
dev/people-mind-mcp
#103 Create a Person before a contact or email exists
dev/people-mind-mcp
#105 Record and correct calls and meetings
dev/people-mind-mcp
#106 Correct Organisations, aliases and domain associations
dev/people-mind-mcp
#107 Compare identities and apply merge or alias from a card
dev/people-mind-mcp
#112 Archive and restore Persons without losing history
dev/people-mind-mcp
#114 Expose restore-safe Forget across the expanded people model
dev/people-mind-mcp
#116 Preview and publish permitted fields to an existing CardDAV contact
dev/people-mind-mcp
#120 Verify the first correction card in Grok and Claude hosts
dev/people-mind-mcp
#78 Write tools: people_link merge and alias, so deprecated addresses can join a Person
dev/people-mind-mcp
#97 Decide the expanded write-action contract
dev/people-mind-mcp
Reference
dev/people-mind-mcp#98
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
Open one Person's Suggestions, compare current and proposed values, and accept or edit a value through an MCP call. The App view for the same review is #131.
Contract
Build to ADR 0005 Amendment 4 (Suggestions and review), from the #98 grill of 2026-11-06 (PR #130), and to Amendment 1's shared write contract. The glossary term is Suggestion. Where this body and the ADR differ, the ADR wins.
Acceptance criteria
Out of scope
via=app(#131).review.rejectandreview.reconsider(#99).Blocked by
mainbefore dispatch.Ruling (2026-11-06)
Grilled 2026-11-06: 14 questions over three rounds, and the operator accepted every lean. The App view half moved to #131 (Q2). The rulings are ADR 0005 Amendment 4.
Filed under: operator word "ok" sha256:2689367b205c; grill word "Accept"
⏸ SVD architect gate: dev/people-mind-mcp#98 accept-or-edit-an-enrichment-suggestion-from-an-mcp-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:
20261105T202741Z-13f4a5acHeld because: CLEAN but 5 open risk(s) (1 verification · 4 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
ls /Users/piers/src/mailmind-mcpreturns 'Operation not permitted', and nothing is vendored or listed in pyproject.toml. Or should #98 hold whole until that access exists? The PR uses Refs, not Closes. [decision]make checkis green with tests/test_review.py collected;make test-integrationpasses with test_deploy.py seeing 'store=ok schema=12'; and on a live store migrated from schema 11,people_card <id> suggestions=true revisions=truelists backfilled suggestions at revision=1. [verification]Change: MCP-call path only; the App view is deferred. (1) store.py: schema 12. Append a
suggestionstable (durable id, person_id FK ON DELETE CASCADE, name, value, state, revision, digest, decided_by) to TABLES (store.py:27-40) and an index to INDEXES (:41-47). Backfill from derived fields in the upgrade block (:191-200) with digest NULL. (2) graph.py: add_refresh_suggestions(conn, pid, now). It digests the derived support per (name, value), excluding observed_at, and bumps the revision only on that suggestion's own change. Call it from ingest_record's rows_changed block (:398-413), _merge_ranked (MOVE_SUGGESTIONS after MOVE_FIELDS :258; refresh survivor), retract_record (:442-451) and unmerge (:538-579, moving recorded ids back with record.get('suggestions', [])). link_merge (:503-535) records the loser's suggestion ids. (3) _apply_action (:598) gains a review.accept/review.edit branch beforetarget = payload['target'](:641). It checks the revision at apply time, then calls a newassert_fieldseam that mirrors attach_handle (:582-589) and inserts a source='action' asserted field authored by the token label. It inserts no Handle. The undo branch is anelifbefore the mergeelse(:649): conflict when the suggestion revision has moved, else delete the field and reopen the suggestion. (4) actions.py:23-24: KIND_BUCKET/UNDOABLE gain both review kinds in the notes bucket. (5) views.card (:210-234) gainssuggestionsrows comparing current (ASSERTED_FIELD, falling back to PRIMARY_HANDLE for phone/url) with proposed. Default output stays byte-identical. (6) server.py: people_card gainssuggestions: bool; addpeople_review, following people_link (:243-272), mounted in build_app (:344). (7) Tests follow test_actions.py helpers and patterns (:18-61, :177-201, :277-305, :307-357).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·tests/test_review.py·tests/test_actions.py·tests/test_identity.py·tests/test_mailpeer.py·tests/test_config_cli.py·tests/test_deploy.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-accept-or-edit-an-enrichment-suggestion-from-an-mcp-card.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-05-accept-or-edit-an-enrichment-suggestion-from-an-mcp-card.md⏸ SVD architect gate: dev/people-mind-mcp#98 accept-or-edit-an-enrichment-suggestion-from-an-mcp-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:
20261105T210715Z-3182df83Held because: CLEAN but 2 open risk(s) (1 verification · 1 decision) — HOLD-ALL parks everything. The risks, verbatim:
Open risks:
make checkis green with tests/test_review.py collected. (2)make test-integrationpasses, with test_deploy.py matching 'store=ok schema=12'. (3) On a live store migrated from schema 11,people_card <id> suggestions=true revisions=truelists the backfilled Suggestions at revision=1, and a second writer open adds no rows. Changed since the prior attempt: the backfill now computes real support digests instead of NULL. So the check also confirms that the first post-migration sync of an unchanged record leaves every revision at 1. [verification]Change: Build ADR 0005 Amendment 4 over the #78 outbox.
(1) store.py: schema 12 follows the additive shape #78 used (store.py:17-47, :182-200). Add a
suggestionstable (id, person_id FK CASCADE, name, value, state open/accepted/edited/rejected, revision, support digest where '' means withdrawn, decided_by, created_at) and an index. A sharedsuggestion_support()helper digests derived rows per (name, value), excluding observed_at. The writer-open backfill uses that helper and inserts one open row at revision 1 per derived value.(2) graph.py:
refresh_suggestionsbumps a row's revision only when its own support digest changes and never touches state.(3) _apply_action (:598) gains a review.accept/edit branch before
target = payload['target'](:641).assert_fieldseam, mirroring attach_handle (:582-589). The seam inserts a source='action' asserted field authored by the token label: an org name for organisation, never a Handle.elifundo branch before the mergeelse(:649) checks that the created field is unchanged (by value digest) and that decided_by equals the target, never the revision. It then deletes the field and reopens the Suggestion.(4) views: ASSERTED_FIELD orders
source = 'action'last, so an imported value stays first after a re-sync rewrites its id. card gainssuggestions=rows: proposed, current, confidence, state, plus revision and evidence on request.(5) actions.py: KIND_BUCKET and UNDOABLE gain both review kinds in the notes bucket.
(6) server.py: people_card gains
suggestions; people_review follows people_link (:243-272) and is mounted in build_app (:344).(7) Tests follow test_actions.py helpers and patterns.
Files:
src/people_mind_mcp/store.py·src/people_mind_mcp/graph.py·src/people_mind_mcp/actions.py·src/people_mind_mcp/views.py·src/people_mind_mcp/server.py·tests/test_review.py·tests/test_actions.py·tests/test_identity.py·tests/test_mailpeer.py·tests/test_config_cli.py·tests/test_deploy.py·README.mdDecision: 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-05-accept-or-edit-an-enrichment-suggestion-from-an-mcp-card.md— next:codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-05-accept-or-edit-an-enrichment-suggestion-from-an-mcp-card.mdspec-verify-dispatch Half B for dev/people-mind-mcp#98 accept-or-edit-an-enrichment-suggestion-from-an-mcp-card completed integration verify.
03dd0dff98codex-svd ship --run-id 20261105T212159Z-1fdf830d --confirm-merge)