Link an external follow-up task or calendar item to a Person #119

Closed
opened 2026-11-05 07:53:46 +00:00 by svc-agent-writer · 2 comments

Parent

#96

What to build

Store an attributed reference to an externally managed follow-up in Person context without introducing a scheduler.

Acceptance criteria

  • Add/correct/remove the reference through MCP and the Card with ordinary revisions, attribution and undo.
  • People Mind neither creates a task implicitly nor sends messages/reminders when a reference is attached.
  • Host policy governs opening external references; treat labels and reference content as untrusted data.
  • Tests prove reference persistence and erasure and the absence of scheduling or sending side effects.
  • Run the required repository checks and the focused public-MCP/worker tests for this behaviour; use the existing temporary-store and Source fixtures.
  • For every new mutation, enforce the approved write contract, expected revisions, attribution, idempotent retry and safe undo; extend applicable read projections/change feeds.
  • For every new person-associated value, extend the existing erasure path and tests; keep personal values out of logs/audit detail.

Blocked by

Filed under: operator word "ok" sha256:2689367b205c

## Parent https://git.groupthink.asia/dev/people-mind-mcp/issues/96 ## What to build Store an attributed reference to an externally managed follow-up in Person context without introducing a scheduler. ## Acceptance criteria - [ ] Add/correct/remove the reference through MCP and the Card with ordinary revisions, attribution and undo. - [ ] People Mind neither creates a task implicitly nor sends messages/reminders when a reference is attached. - [ ] Host policy governs opening external references; treat labels and reference content as untrusted data. - [ ] Tests prove reference persistence and erasure and the absence of scheduling or sending side effects. - [ ] Run the required repository checks and the focused public-MCP/worker tests for this behaviour; use the existing temporary-store and Source fixtures. - [ ] For every new mutation, enforce the approved write contract, expected revisions, attribution, idempotent retry and safe undo; extend applicable read projections/change feeds. - [ ] For every new person-associated value, extend the existing erasure path and tests; keep personal values out of logs/audit detail. ## Blocked by - https://git.groupthink.asia/dev/people-mind-mcp/issues/100 Filed under: operator word "ok" sha256:2689367b205c
Collaborator

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 effort high

Run: 20261107T215718Z-71c2b202

Held because: CLEAN but 9 open risk(s) (3 verification · 6 decision) — HOLD-ALL parks everything. The risks, verbatim:

Open risks:

  1. D1 Follow-up model. Lean: a separate followups local item with type ∈ {task, calendar}, label ≤200, ref = absolute URI ≤2048, and no due date, status or reminder field. Question: confirm the fields and type names (would event be better than calendar, which clashes with the Source channel name in ADR 0004), and confirm that no date field ships. [decision]
  2. D2 Correction kind. Lean: add followup.correct (revision-checked, notes bucket, undoable, the corrector becomes the Author) because the issue requires correction with ordinary revisions. Question: approve extending the ADR 0005 Am.1 inventory row (:38, today only followup.link/unlink), or rule that correction is unlink then link, as Preferences do (Am.5 r3). [decision]
  3. D3 Reference validation. Lean: the tool and the worker both require an absolute-URI form with no whitespace or control characters, refuse the schemes javascript/vbscript/data/file/blob, store any other ref verbatim and never fetch or resolve it, and refuse a duplicate ref on the same Person with followup-present. Question: deny-list vs allow-list vs no check, and keep the duplicate refusal? [decision]
  4. D4 Visibility. Lean: never on the default row, in find, in embeddings or in compare; the text Card shows follow-ups only with a new people_card followups=true; the App view always shows them; the split preview labels them by type only. Question: confirm, or fold follow-ups under the existing notes=true flag. [decision]
  5. D5 Opening. Lean: the App shows Open only when ui/initialize returns hostCapabilities.openLinks, and sends ui/open-link {url} only on a click; the text Card shows the ref as an untrusted cell; People Mind never opens or fetches. Question: does this satisfy 'host policy governs opening external references'? [decision]
  6. D6 Undo check. Lean: undo compares the (type,label,ref) digest and the Author, and ignores revision bumps from merge or split (the Am.5 r7 / Am.6 r5 reading of Am.1 r14). Question: confirm for follow-ups. [decision]
  7. V1 Blocker #100 closed on the forge. Git shows its output on main (d9e4df2, PR #138), but the sandbox cannot read issue state. Check: the dev/people-mind-mcp#100 issue page on git.groupthink.asia shows state closed. [verification]
  8. V2 Repository checks after the change. Check: in the dispatch worktree, record make check and the focused pytest command on pristine 6aaedf9 before the first edit. After the change, both pass with an unchanged failure set apart from the new tests. [verification]
  9. V3 Open in a real MCP Apps host (post-merge). Check: with a write token in a host that advertises openLinks, link an https follow-up and click Open; the host applies its own policy. A host without openLinks shows no Open button. A stale Correct shows 'stale-view: This follow-up changed since the view loaded'. [verification]

Change: Add a separate additive followups table at schema 21: store.py TABLES/INDEXES, SCHEMA_21 at :19/:363, SCHEMA_VERSION=21 at :211. Do not reuse notes: its kind CHECK at :166 would need a rebuild, and a rebuild loses the AUTOINCREMENT high-water mark. Add three notes-bucket kinds, followup.link (a pure addition that follows the redirect), followup.correct and followup.unlink (both revision-checked), to actions.py KIND_BUCKET/UNDOABLE, with FOLLOWUP_TYPES=(task, calendar) and a followup_ref validator. The validator follows the shape of event_date at actions.py:136-154: absolute URI, ≤2048 characters, javascript/vbscript/data/file/blob refused. In graph.py, add _apply_followup/_undo_followup mirroring _relation_digest/_apply_relation/_undo_relation (graph.py:1623-1736). Undo checks the content digest and Author, never the revision. Dispatch after the FACT_KINDS line (:2608-2609), before the undo fall-through at :2729; the undo branch goes after :2819-2822. CONV-23 hooks: MOVE_FOLLOWUPS after MOVE_NOTES in _merge_ranked (:439); link_merge record (:1192) and unmerge (:1276-1280); a split_plan loop labelled by type (:610-614); carve items and tables (:799, :802); the _move_allocation revision tuple (:758); the forget $.followup_id undo purge (:1108-1112); the create-undo contributions tuple (:2860). server.py: people_followup and app-only people_card_followup mirroring people_note/_note (:943-1009); a people_card followups=true flag; followup_types in people_card_suggestions; followup in the _allocation grammar (:373); build_app registration and visibility. views.py: FOLLOWUPS beside NOTES (:395), rows in card after the notes block (:935-943), and a followups list in card_suggestions. card.html: followupItem/showFollowup/submitFollowup mirroring noteItem/showNote/submitNote (:122-139, :298-325). Open sends ui/open-link only on a click and only when ui/initialize advertises hostCapabilities.openLinks, so host policy decides. README paragraph plus the Schema 21 sentence. Six design forks (D1–D6) are unruled and carried as gate decisions, following the #101/#112 SVD-gate precedent.

Files: src/people_mind_mcp/store.py · src/people_mind_mcp/actions.py · src/people_mind_mcp/graph.py · src/people_mind_mcp/server.py · src/people_mind_mcp/views.py · src/people_mind_mcp/card.html · README.md · tests/test_followups.py · tests/test_actions.py · tests/test_card_app.py

Decision: accept the 9 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):

  • add label svd:go — approve; Half-B dispatch accepts exactly this spec (open risks accepted)
  • add label svd:fire beside svd:go — approve AND authorise the Half-B fire from the phone; never on its own
  • add label svd:skip — park it; dispatch refuses it and the issue stays for a human
  • add label svd:respec — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context

Spec: /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-07-link-an-external-follow-up-task-or-calendar-item-to-a-person.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-07-link-an-external-follow-up-task-or-calendar-item-to-a-person.md

### ⏸ SVD architect gate: dev/people-mind-mcp#119 link-an-external-follow-up-task-or-calendar-item-to-a-person **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 effort `high` **Run:** `20261107T215718Z-71c2b202` **Held because:** CLEAN but 9 open risk(s) (3 verification · 6 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. D1 Follow-up model. Lean: a separate `followups` local item with type ∈ {task, calendar}, label ≤200, ref = absolute URI ≤2048, and no due date, status or reminder field. Question: confirm the fields and type names (would `event` be better than `calendar`, which clashes with the Source channel name in ADR 0004), and confirm that no date field ships. [decision] 2. D2 Correction kind. Lean: add `followup.correct` (revision-checked, notes bucket, undoable, the corrector becomes the Author) because the issue requires correction with ordinary revisions. Question: approve extending the ADR 0005 Am.1 inventory row (:38, today only followup.link/unlink), or rule that correction is unlink then link, as Preferences do (Am.5 r3). [decision] 3. D3 Reference validation. Lean: the tool and the worker both require an absolute-URI form with no whitespace or control characters, refuse the schemes javascript/vbscript/data/file/blob, store any other ref verbatim and never fetch or resolve it, and refuse a duplicate ref on the same Person with `followup-present`. Question: deny-list vs allow-list vs no check, and keep the duplicate refusal? [decision] 4. D4 Visibility. Lean: never on the default row, in find, in embeddings or in compare; the text Card shows follow-ups only with a new `people_card followups=true`; the App view always shows them; the split preview labels them by type only. Question: confirm, or fold follow-ups under the existing `notes=true` flag. [decision] 5. D5 Opening. Lean: the App shows Open only when ui/initialize returns hostCapabilities.openLinks, and sends ui/open-link {url} only on a click; the text Card shows the ref as an untrusted cell; People Mind never opens or fetches. Question: does this satisfy 'host policy governs opening external references'? [decision] 6. D6 Undo check. Lean: undo compares the (type,label,ref) digest and the Author, and ignores revision bumps from merge or split (the Am.5 r7 / Am.6 r5 reading of Am.1 r14). Question: confirm for follow-ups. [decision] 7. V1 Blocker #100 closed on the forge. Git shows its output on main (d9e4df2, PR #138), but the sandbox cannot read issue state. Check: the dev/people-mind-mcp#100 issue page on git.groupthink.asia shows state closed. [verification] 8. V2 Repository checks after the change. Check: in the dispatch worktree, record `make check` and the focused pytest command on pristine 6aaedf9 before the first edit. After the change, both pass with an unchanged failure set apart from the new tests. [verification] 9. V3 Open in a real MCP Apps host (post-merge). Check: with a write token in a host that advertises openLinks, link an https follow-up and click Open; the host applies its own policy. A host without openLinks shows no Open button. A stale Correct shows 'stale-view: This follow-up changed since the view loaded'. [verification] **Change:** Add a separate additive `followups` table at schema 21: store.py TABLES/INDEXES, SCHEMA_21 at :19/:363, SCHEMA_VERSION=21 at :211. Do not reuse `notes`: its kind CHECK at :166 would need a rebuild, and a rebuild loses the AUTOINCREMENT high-water mark. Add three notes-bucket kinds, followup.link (a pure addition that follows the redirect), followup.correct and followup.unlink (both revision-checked), to actions.py KIND_BUCKET/UNDOABLE, with FOLLOWUP_TYPES=(task, calendar) and a `followup_ref` validator. The validator follows the shape of event_date at actions.py:136-154: absolute URI, ≤2048 characters, javascript/vbscript/data/file/blob refused. In graph.py, add `_apply_followup`/`_undo_followup` mirroring `_relation_digest`/`_apply_relation`/`_undo_relation` (graph.py:1623-1736). Undo checks the content digest and Author, never the revision. Dispatch after the FACT_KINDS line (:2608-2609), before the undo fall-through at :2729; the undo branch goes after :2819-2822. CONV-23 hooks: MOVE_FOLLOWUPS after MOVE_NOTES in _merge_ranked (:439); link_merge record (:1192) and unmerge (:1276-1280); a split_plan loop labelled by type (:610-614); carve items and tables (:799, :802); the _move_allocation revision tuple (:758); the forget $.followup_id undo purge (:1108-1112); the create-undo contributions tuple (:2860). server.py: people_followup and app-only people_card_followup mirroring people_note/_note (:943-1009); a people_card followups=true flag; followup_types in people_card_suggestions; `followup` in the _allocation grammar (:373); build_app registration and visibility. views.py: FOLLOWUPS beside NOTES (:395), rows in card after the notes block (:935-943), and a followups list in card_suggestions. card.html: followupItem/showFollowup/submitFollowup mirroring noteItem/showNote/submitNote (:122-139, :298-325). Open sends ui/open-link only on a click and only when ui/initialize advertises hostCapabilities.openLinks, so host policy decides. README paragraph plus the Schema 21 sentence. Six design forks (D1–D6) are unruled and carried as gate decisions, following the #101/#112 SVD-gate precedent. **Files:** `src/people_mind_mcp/store.py` · `src/people_mind_mcp/actions.py` · `src/people_mind_mcp/graph.py` · `src/people_mind_mcp/server.py` · `src/people_mind_mcp/views.py` · `src/people_mind_mcp/card.html` · `README.md` · `tests/test_followups.py` · `tests/test_actions.py` · `tests/test_card_app.py` **Decision:** accept the 9 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`): - add label `svd:go` — approve; Half-B dispatch accepts exactly this spec (open risks accepted) - add label `svd:fire` **beside** `svd:go` — approve AND authorise the Half-B fire from the phone; never on its own - add label `svd:skip` — park it; dispatch refuses it and the issue stays for a human - add label `svd:respec` — discard this spec; the next Half-A run re-produces it with this record as prior-attempt context <sub>Spec: `/Users/piers/.local/state/exhaust/groupthink/specs/2026-11-07-link-an-external-follow-up-task-or-calendar-item-to-a-person.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-07-link-an-external-follow-up-task-or-calendar-item-to-a-person.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/people-mind-mcp#119 link-an-external-follow-up-task-or-calendar-item-to-a-person completed integration verify.

  • PR: #160
  • Branch: feat/svd-dev-people-mind-mcp-119-link-an-external-follow-up-t-c47fdf37
  • Commit: b1f5ddd0ca
  • Build: none
  • Test: green
  • Reader audit clean: True
  • Spec fidelity: True
  • Ready for merge: True
  • Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/73/pipeline/139/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: Real MCP Apps host verification of the Card ui/open-link bridge is assigned to #120 by the architect amendment; only mocked-host checks ran.
  • Warning: Subagent saw one transient failure of tests/test_mailpeer.py::test_c02_kill_around_derivation_commit_repeats_only_unfinished_unit[after] in a first full run; it passed in isolation and in my full make check run (819 passed).
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261107T222932Z-c47fdf37 --confirm-merge)
spec-verify-dispatch Half B for dev/people-mind-mcp#119 link-an-external-follow-up-task-or-calendar-item-to-a-person completed integration verify. - PR: https://git.groupthink.asia/dev/people-mind-mcp/pulls/160 - Branch: feat/svd-dev-people-mind-mcp-119-link-an-external-follow-up-t-c47fdf37 - Commit: b1f5ddd0ca148809225c340c58103233f681a162 - Build: none - Test: green - Reader audit clean: True - Spec fidelity: True - Ready for merge: True - Check ci/woodpecker/pr/validation: green https://ci.groupthink.asia/repos/73/pipeline/139/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: Real MCP Apps host verification of the Card ui/open-link bridge is assigned to #120 by the architect amendment; only mocked-host checks ran. - Warning: Subagent saw one transient failure of tests/test_mailpeer.py::test_c02_kill_around_derivation_commit_repeats_only_unfinished_unit[after] in a first full run; it passed in isolation and in my full make check run (819 passed). - CI wait: ci/woodpecker/pr/validation -> pass - Decision: review the PR and merge? (`codex-svd ship --run-id 20261107T222932Z-c47fdf37 --confirm-merge`)
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
dev/people-mind-mcp#119
No description provided.