Record and correct calls and meetings #105

Closed
opened 2026-11-05 07:52:56 +00:00 by svc-agent-writer · 3 comments

Parent

#96

What to build

Log a manual Interaction and optional separately attributed note, then correct or retract it from the same Person context.

Acceptance criteria

  • Apply the decided channel/direction contract and preserve event date, participant, reference and author.
  • Recent/last-interaction reads update after addition, correction or retraction; note text is not stored in Interaction rows.
  • Retries create one event and Mail peer rebuild leaves manual events intact.
  • The manual command cannot edit imported mail events; MCP and card tests cover note separation and undo.
  • 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 Log a manual Interaction and optional separately attributed note, then correct or retract it from the same Person context. ## Acceptance criteria - [ ] Apply the decided channel/direction contract and preserve event date, participant, reference and author. - [ ] Recent/last-interaction reads update after addition, correction or retraction; note text is not stored in Interaction rows. - [ ] Retries create one event and Mail peer rebuild leaves manual events intact. - [ ] The manual command cannot edit imported mail events; MCP and card tests cover note separation and undo. - [ ] 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/98 - https://git.groupthink.asia/dev/people-mind-mcp/issues/104 Filed under: operator word "ok" sha256:2689367b205c
Collaborator

⏸ SVD architect gate: dev/people-mind-mcp#105 record-and-correct-calls-and-meetings

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: 20261106T211923Z-46bc7b34

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

Open risks:

  1. D1: the storage model. The lean is an events entity table (AUTOINCREMENT, revision, Author) plus one interactions row per participant (ref event:, source 'action', source_record NULL, event_id, copied date, channel and direction). Schema 17 rebuilds interactions (manual channels, nullable direction with a pairing CHECK, AUTOINCREMENT ids) and adds notes.event_id, which needs open_writer to run TABLES before UPGRADES. Question: accept the rebuild, the copied values and the reorder? The alternative is separate tables UNIONed into every reader. [decision]
  2. D2: the tool surface. The lean is people_interaction plus the app-only people_card_interaction. add takes the context person_id (always a participant and the note's holder) plus up to 19 participants, each a Person id or a shared Endpoint value; no Endpoint-only events; the Owner is refused with reason owner. correct replaces the whole date, channel and direction triple and never changes participants. Dates are YYYY-MM-DD or YYYY-MM-DDTHH:MM[:SS]Z, with 'today' as the UTC date; the tool answers code=future and the worker fails with reason=future. The App logs single-participant events. Question: rule on the names, the participant forms and limit, the fixed participants and the date forms. [decision]
  3. D3: retracting an event that carries a note. Am. 3 ruling 6 covers only the undo of an add. The lean: interaction.retract removes the event and its note as one Action, and undo restores both under their original ids. An add-undo after the note was retracted alone conflicts, naming the note. Question: should retract remove the note, or keep it with event_id cleared? [decision]
  4. D4: one link per Person outside a merge. The lean: merges fold to one link (recorded and restored on merge undo), and interaction.attribute onto a Person already on the event fails with participant-present. endpoint.unshare, share undo and handle.move can still leave two links for one Person, which people_recent collapses on read. Question: is collapsing on read enough, or should there be a unique (event_id, person_id) index with a guard on every relocation path? [decision]
  5. D5: the read shape. The lean: people_recent manual rows are date | channel | direction (empty for meeting and other) | event:<id> | author=<label> | revision=<n>, and mail rows are unchanged; an event note on the Card (notes=true) ends with event=; the text Card gains no events section; the App JSON carries events with revisions. Question: accept this shape? [decision]
  6. D6: ruling 6 says a manual row's source is never a Source name. Manual rows use source 'action', as every local row does, yet config.py:165,172 would accept a Source named 'action'. The lean makes no config change, because the event: ref, the NULL source_record and the message: scope keep every Source-keyed delete away from manual rows. Question: should a later slice reserve 'action' and 'config' as Source names? [decision]
  7. S1: #105 is blocked by #98 and #104. Both deliverables are on base 9535f60: 726d113 (#132) and 64df4fe (#126). Their forge issue states cannot be read here because gh is denied. The drain should confirm both issues are closed before dispatch. [sequencing — blocked by #98, #104]
  8. V1: physical erasure after merge. On a scratch copy of the store: add a call with note 'Kelp contract' for A with participant B; correct it; retract a second event; merge A, then forget the survivor; run sqlite3 pm.db 'PRAGMA wal_checkpoint(TRUNCATE)'. Then grep -c Kelp pm.db must return 0, the undo_records count for those Actions must be 0, and B's people_recent must still show the event once. [verification]
  9. V2: the Card App in a real MCP Apps host. Open a Card, log a meeting with a note, and confirm the event and the separate note both show. Correct the date from a second view, then submit Correct from the first view and confirm it shows stale-view. [verification]

Change: Store each manual event as one events row (AUTOINCREMENT id, revision, Author), plus one interactions row per participant. A participant row has ref event:<id>, source 'action', source_record NULL and an event_id. It copies the event's date, channel and direction, so LAST_INTERACTION, RECENT, default_row and people_find read manual events unchanged, and no mail delete reaches them, because every mail path is scoped to message: refs and the mail Source name (sync.py:30-46).

Schema 17 rebuilds interactions through a new UPGRADES entry keyed on (interactions, event_id), placed right after the schema-15 rebuild at store.py:55-72 and mirroring it. The rebuild adds the manual channels, a nullable direction with a pairing CHECK, AUTOINCREMENT ids and event_id. Schema 17 also adds the events table, a notes.event_id column (with TABLES moved before UPGRADES in open_writer) and an interactions_event index.

The new kinds interaction.add, interaction.correct and interaction.retract (interactions bucket, undoable) go through _apply_interaction and _undo_interaction, which follow the shape of _apply_fact and _undo_fact (graph.py:1280-1508) and are dispatched beside FACT_KINDS (graph.py:1965, 2158). An optional note is a normal Note row carrying event_id. Merges fold a duplicate participant link (_fold_events in _merge_ranked); link_merge records the folded link and unmerge restores it. Forget sweeps events left with no participant and purges $.participants undo records, beside the $.holders purge at graph.py:1089-1094. interaction.attribute refuses a holder already on the event. RECENT joins events, collapses duplicate links and keeps its outer table unaliased so the index-guard test still holds.

The tools are people_interaction and the app-only people_card_interaction, mirroring people_note and _note (server.py:623-689). The App view gains an eventItem, a Log interaction form and submitInteraction, mirroring noteItem and submitFact (card.html:119-238).

Files: src/people_mind_mcp/store.py · src/people_mind_mcp/actions.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 · README.md · tests/test_interactions.py · tests/test_actions.py · tests/test_card_app.py · tests/test_shared.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-06-record-and-correct-calls-and-meetings.md — next: codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-06-record-and-correct-calls-and-meetings.md

### ⏸ SVD architect gate: dev/people-mind-mcp#105 record-and-correct-calls-and-meetings **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:** `20261106T211923Z-46bc7b34` **Held because:** CLEAN but 9 open risk(s) (1 sequencing · 2 verification · 6 decision) — HOLD-ALL parks everything. The risks, verbatim: **Open risks:** 1. D1: the storage model. The lean is an `events` entity table (AUTOINCREMENT, revision, Author) plus one `interactions` row per participant (ref event:<id>, source 'action', source_record NULL, event_id, copied date, channel and direction). Schema 17 rebuilds interactions (manual channels, nullable direction with a pairing CHECK, AUTOINCREMENT ids) and adds notes.event_id, which needs open_writer to run TABLES before UPGRADES. Question: accept the rebuild, the copied values and the reorder? The alternative is separate tables UNIONed into every reader. [decision] 2. D2: the tool surface. The lean is people_interaction plus the app-only people_card_interaction. add takes the context person_id (always a participant and the note's holder) plus up to 19 participants, each a Person id or a shared Endpoint value; no Endpoint-only events; the Owner is refused with reason owner. correct replaces the whole date, channel and direction triple and never changes participants. Dates are YYYY-MM-DD or YYYY-MM-DDTHH:MM[:SS]Z, with 'today' as the UTC date; the tool answers code=future and the worker fails with reason=future. The App logs single-participant events. Question: rule on the names, the participant forms and limit, the fixed participants and the date forms. [decision] 3. D3: retracting an event that carries a note. Am. 3 ruling 6 covers only the undo of an add. The lean: interaction.retract removes the event and its note as one Action, and undo restores both under their original ids. An add-undo after the note was retracted alone conflicts, naming the note. Question: should retract remove the note, or keep it with event_id cleared? [decision] 4. D4: one link per Person outside a merge. The lean: merges fold to one link (recorded and restored on merge undo), and interaction.attribute onto a Person already on the event fails with participant-present. endpoint.unshare, share undo and handle.move can still leave two links for one Person, which people_recent collapses on read. Question: is collapsing on read enough, or should there be a unique (event_id, person_id) index with a guard on every relocation path? [decision] 5. D5: the read shape. The lean: people_recent manual rows are `date | channel | direction (empty for meeting and other) | event:<id> | author=<label> | revision=<n>`, and mail rows are unchanged; an event note on the Card (notes=true) ends with event=<id>; the text Card gains no events section; the App JSON carries events with revisions. Question: accept this shape? [decision] 6. D6: ruling 6 says a manual row's source is never a Source name. Manual rows use source 'action', as every local row does, yet config.py:165,172 would accept a Source named 'action'. The lean makes no config change, because the event: ref, the NULL source_record and the message: scope keep every Source-keyed delete away from manual rows. Question: should a later slice reserve 'action' and 'config' as Source names? [decision] 7. S1: #105 is blocked by #98 and #104. Both deliverables are on base 9535f60: 726d113 (#132) and 64df4fe (#126). Their forge issue states cannot be read here because gh is denied. The drain should confirm both issues are closed before dispatch. [sequencing — blocked by #98, #104] 8. V1: physical erasure after merge. On a scratch copy of the store: add a call with note 'Kelp contract' for A with participant B; correct it; retract a second event; merge A, then forget the survivor; run `sqlite3 pm.db 'PRAGMA wal_checkpoint(TRUNCATE)'`. Then `grep -c Kelp pm.db` must return 0, the undo_records count for those Actions must be 0, and B's people_recent must still show the event once. [verification] 9. V2: the Card App in a real MCP Apps host. Open a Card, log a meeting with a note, and confirm the event and the separate note both show. Correct the date from a second view, then submit Correct from the first view and confirm it shows stale-view. [verification] **Change:** Store each manual event as one `events` row (AUTOINCREMENT id, revision, Author), plus one `interactions` row per participant. A participant row has ref `event:<id>`, source 'action', source_record NULL and an event_id. It copies the event's date, channel and direction, so LAST_INTERACTION, RECENT, default_row and people_find read manual events unchanged, and no mail delete reaches them, because every mail path is scoped to `message:` refs and the mail Source name (sync.py:30-46). Schema 17 rebuilds `interactions` through a new UPGRADES entry keyed on (interactions, event_id), placed right after the schema-15 rebuild at store.py:55-72 and mirroring it. The rebuild adds the manual channels, a nullable direction with a pairing CHECK, AUTOINCREMENT ids and event_id. Schema 17 also adds the `events` table, a `notes.event_id` column (with TABLES moved before UPGRADES in open_writer) and an interactions_event index. The new kinds interaction.add, interaction.correct and interaction.retract (interactions bucket, undoable) go through `_apply_interaction` and `_undo_interaction`, which follow the shape of `_apply_fact` and `_undo_fact` (graph.py:1280-1508) and are dispatched beside FACT_KINDS (graph.py:1965, 2158). An optional note is a normal Note row carrying event_id. Merges fold a duplicate participant link (`_fold_events` in `_merge_ranked`); link_merge records the folded link and unmerge restores it. Forget sweeps events left with no participant and purges `$.participants` undo records, beside the `$.holders` purge at graph.py:1089-1094. `interaction.attribute` refuses a holder already on the event. RECENT joins events, collapses duplicate links and keeps its outer table unaliased so the index-guard test still holds. The tools are `people_interaction` and the app-only `people_card_interaction`, mirroring `people_note` and `_note` (server.py:623-689). The App view gains an eventItem, a Log interaction form and submitInteraction, mirroring noteItem and submitFact (card.html:119-238). **Files:** `src/people_mind_mcp/store.py` · `src/people_mind_mcp/actions.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` · `README.md` · `tests/test_interactions.py` · `tests/test_actions.py` · `tests/test_card_app.py` · `tests/test_shared.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-06-record-and-correct-calls-and-meetings.md` — next: `codex-svd dispatch --args '<same-json>' --approved-spec-path /Users/piers/.local/state/exhaust/groupthink/specs/2026-11-06-record-and-correct-calls-and-meetings.md`</sub>
Collaborator

spec-verify-dispatch Half B for dev/people-mind-mcp#105 record-and-correct-calls-and-meetings completed integration verify.

  • PR: #149
  • Branch: feat/svd-dev-people-mind-mcp-105-record-and-correct-calls-and-631d40ba
  • Commit: 76238608d7
  • 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/116/1
  • Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll
  • Warning: V1 physical-erasure and V2 real-host Card checks remain post-merge operator checks per the spec.
  • CI wait: ci/woodpecker/pr/validation -> pass
  • Decision: review the PR and merge? (codex-svd ship --run-id 20261106T215502Z-631d40ba --confirm-merge)
spec-verify-dispatch Half B for dev/people-mind-mcp#105 record-and-correct-calls-and-meetings completed integration verify. - PR: https://git.groupthink.asia/dev/people-mind-mcp/pulls/149 - Branch: feat/svd-dev-people-mind-mcp-105-record-and-correct-calls-and-631d40ba - Commit: 76238608d777420eef0b20243eb605637236c040 - 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/116/1 - Checks: required ci/woodpecker/pr/validation resolved pass by CI-wait poll - Warning: V1 physical-erasure and V2 real-host Card checks remain post-merge operator checks per the spec. - CI wait: ci/woodpecker/pr/validation -> pass - Decision: review the PR and merge? (`codex-svd ship --run-id 20261106T215502Z-631d40ba --confirm-merge`)
svc-svd-writer 2026-11-06 22:27:49 +00:00
  • closed this issue
  • removed the
    svd:go
    label
Author
Member

This was generated by AI during triage.

SVD gate and ship record: #105 (einfari gate 2026-11-07, merge 09:30 AEDT)

Measured facts

  • Half-A 20261106T211923Z-46bc7b34: CLEAN, 0 blocking defects, class substrate, 11 Primary Files, base 9535f60. Schema 17 adds an events table and notes.event_id, and rebuilds interactions for manual channels and a nullable direction.
  • The spec left six decisions open (D1 to D6). The operator accepted every lean.
  • Dispatch 20261106T215010Z-55052ee1 on codex/gpt-6.1-terra stopped after about 2 minutes with no commit.
  • Operator pick: dispatch on codex/gpt-6.1-sol. Run 20261106T215502Z-631d40ba committed 7623860 and opened PR #149.
  • Integrate: readyForMerge true, verified head equal to the dispatch commit, 0 rework rounds, CI ci/woodpecker/pr/validation pass.
  • Own execution at 7623860: make check gave 754 passed, 5 skipped, 0 failed. The base gave 719 passed. The Python 3.12 import of people_mind_mcp.cli and people_mind_mcp.server succeeds.
  • The 11 changed files are the Primary Files exactly. All spec-named tests are present. No nested .git or pytest cache. card.html adds no innerHTML, no http(s):// and no eval(.
  • Merged as b6648e6.

Buckets

  • Already decided:
    • ADR 0004 Amendment 3 section A, rulings 1 to 7.
    • ADR 0005 Amendment 1: the inventory row and rulings 3, 8 and 10.
    • Amendment 3 ruling 6.
    • Amendment 5 rulings 1 to 8 and 15.
    • Amendment 6 ruling 5.
    • ADR 0002 Amendment 2 ruling 5 and Amendment 3.
  • Decided at this gate (operator "Accept"):
    • D1: an events table with one interactions row per participant. The rebuild and the open_writer reorder are accepted, with an id-and-count migration test.
    • D2: people_interaction and people_card_interaction, with up to 20 participants and fixed participants on correct.
    • D3: retract removes the event and its note together.
    • D4: links fold on merge and collapse on read. The unique index is #147.
    • D5: the read shape.
    • D6: no configuration change. Reserved Source names are #148.
  • Verification (post-merge operator checks):
    • V1: physical erasure.
    • V2: the Card App event flow in an MCP Apps host.

Ruling

  • Migration: test_schema_17_migrates_on_writer_open seeds a mail Interaction, an unattributed and an attributed shared-Endpoint Interaction, a Note and a field. It asserts every row and id after the upgrade, a clean foreign_key_check, and a no-op second open.
  • GO, then merge.

Drafted line

codex-svd ship --run-id 20261106T215502Z-631d40ba --confirm-merge (run, exit 0).

Delegation

"this session is an einfari. you merge through 19:00", extended by "Extend grant through 14:00aedt" (gate, svd:go and merge). "Accept" (D1 to D6). "Sol" (dispatch model).

Spec: 2026-11-06-record-and-correct-calls-and-meetings.md, Agent Adjustments. Ledger: 2026-W45-arch.

> *This was generated by AI during triage.* **SVD gate and ship record: #105** (einfari gate 2026-11-07, merge 09:30 AEDT) **Measured facts** - Half-A `20261106T211923Z-46bc7b34`: CLEAN, 0 blocking defects, class `substrate`, 11 Primary Files, base `9535f60`. Schema 17 adds an `events` table and `notes.event_id`, and rebuilds `interactions` for manual channels and a nullable direction. - The spec left six decisions open (D1 to D6). The operator accepted every lean. - Dispatch `20261106T215010Z-55052ee1` on `codex/gpt-6.1-terra` stopped after about 2 minutes with no commit. - Operator pick: dispatch on `codex/gpt-6.1-sol`. Run `20261106T215502Z-631d40ba` committed `7623860` and opened PR #149. - Integrate: `readyForMerge` true, verified head equal to the dispatch commit, 0 rework rounds, CI `ci/woodpecker/pr/validation` pass. - Own execution at `7623860`: `make check` gave 754 passed, 5 skipped, 0 failed. The base gave 719 passed. The Python 3.12 import of `people_mind_mcp.cli` and `people_mind_mcp.server` succeeds. - The 11 changed files are the Primary Files exactly. All spec-named tests are present. No nested `.git` or pytest cache. `card.html` adds no `innerHTML`, no `http(s)://` and no `eval(`. - Merged as `b6648e6`. **Buckets** - Already decided: - ADR 0004 Amendment 3 section A, rulings 1 to 7. - ADR 0005 Amendment 1: the inventory row and rulings 3, 8 and 10. - Amendment 3 ruling 6. - Amendment 5 rulings 1 to 8 and 15. - Amendment 6 ruling 5. - ADR 0002 Amendment 2 ruling 5 and Amendment 3. - Decided at this gate (operator "Accept"): - D1: an `events` table with one `interactions` row per participant. The rebuild and the `open_writer` reorder are accepted, with an id-and-count migration test. - D2: `people_interaction` and `people_card_interaction`, with up to 20 participants and fixed participants on correct. - D3: retract removes the event and its note together. - D4: links fold on merge and collapse on read. The unique index is #147. - D5: the read shape. - D6: no configuration change. Reserved Source names are #148. - Verification (post-merge operator checks): - V1: physical erasure. - V2: the Card App event flow in an MCP Apps host. **Ruling** - Migration: `test_schema_17_migrates_on_writer_open` seeds a mail Interaction, an unattributed and an attributed shared-Endpoint Interaction, a Note and a field. It asserts every row and id after the upgrade, a clean `foreign_key_check`, and a no-op second open. - GO, then merge. **Drafted line** `codex-svd ship --run-id 20261106T215502Z-631d40ba --confirm-merge` (run, exit 0). **Delegation** "this session is an einfari. you merge through 19:00", extended by "Extend grant through 14:00aedt" (gate, `svd:go` and merge). "Accept" (D1 to D6). "Sol" (dispatch model). Spec: `2026-11-06-record-and-correct-calls-and-meetings.md`, Agent Adjustments. Ledger: `2026-W45-arch`.
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#105
No description provided.