Expose restore-safe Forget across the expanded people model #114

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

Parent

#96

What to build

Forget a Person through an explicitly confirmed tool/card action while preserving other people and preventing revival.

Acceptance criteria

  • Require confirm=true, retain existing caps, provide no undo and disclose People Mind/backup-residue scope.
  • Apply full physical erasure to all person-associated data present, including review decisions, notes, manual events, undo payloads and publication payloads as those features land.
  • Use #55’s latest Tombstone authority and test restore-before-Forget plus re-sync; do not implement a competing recovery mechanism.
  • Exercise the approved shared-endpoint case: forgetting one Person preserves the other and prevents the forgotten identity from returning.
  • Every subsequent data-adding slice extends this erasure contract; mounting Forget does not wait for unrelated publication work.
  • 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 Forget a Person through an explicitly confirmed tool/card action while preserving other people and preventing revival. ## Acceptance criteria - [ ] Require confirm=true, retain existing caps, provide no undo and disclose People Mind/backup-residue scope. - [ ] Apply full physical erasure to all person-associated data present, including review decisions, notes, manual events, undo payloads and publication payloads as those features land. - [ ] Use #55’s latest Tombstone authority and test restore-before-Forget plus re-sync; do not implement a competing recovery mechanism. - [ ] Exercise the approved shared-endpoint case: forgetting one Person preserves the other and prevents the forgotten identity from returning. - [ ] Every subsequent data-adding slice extends this erasure contract; mounting Forget does not wait for unrelated publication work. - [ ] 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/110 - https://git.groupthink.asia/dev/people-mind-mcp/issues/111 - https://git.groupthink.asia/dev/people-mind-mcp/issues/55 Filed under: operator word "ok" sha256:2689367b205c
Author
Member

This was generated by AI during an SVD gate.

Forget residue: actions.payload_digest is an unsalted hash of a personal payload.

actions.enqueue stores payload_digest = sha256(json.dumps(payload, sort_keys=True)) for every Action (src/people_mind_mcp/actions.py:81-82, :99). The worker nulls payload on apply, but the digest stays for the life of the Action row, and Forget does not touch the actions table. The digest has no salt, so anyone who can read the store and guess the payload can confirm it. ADR 0003 Amendment 1 rule 7 accepts salted hashes only (Tombstones and the audit row).

First recorded at the #103 gate for three kinds. Since then, every slice that carries a personal value in its payload adds to the residue. Measured at main = f616f5a (schema 18) on a scratch store: one Action of each kind below, then graph.forget on the Person. Every Action row stays, payload is NULL, and payload_digest equals the sha256 of the guessed payload.

Kind Personal value that the digest covers Landed in
link.alias the attached Handle #78 (3099b59)
review.edit the edited value #98 (726d113)
person.create the name, organisation and title #103 (2ba707e)
note.add, note.correct, preference.set the note or preference text #100 (d9e4df2)
fact.add, fact.correct, fact.supersede the fact value #101 (c1a5db5)
interaction.add, interaction.correct the event note, date and participants #105 (b6648e6)
relation.add the Relation label and type #102 (f616f5a)

Measured directly: note.add, fact.add, relation.add and interaction.add. The other rows follow from the same enqueue path.

The digest exists for ruling 9 of ADR 0005 Amendment 1: the same key with a different payload answers idempotency-conflict. After Forget, no retry of those Actions can succeed in any useful way, so the digest serves no purpose on a forgotten Person's Actions.

Question for this issue (and the restore-safe Tombstone work): should Forget clear payload_digest, or re-key it with the Tombstone salt, on every Action that targeted the forgotten Person? Or is it accepted residue, with an amendment to ADR 0003 that says so?

Three facts for the decision:

  • actions has no person_id column. Finding a forgotten Person's Actions needs the undo_records.person_id link, which Forget deletes, or the detail ids. detail holds ids only (ADR 0005 Amendment 1 ruling 17), and after Forget it still names the forgotten Person's id, for example person=p_… note=1.
  • Forget must therefore find the Actions before it deletes the undo records, or match on detail.
  • The #98 undo record also holds an unsalted value_digest (graph.py:2305), but Forget already deletes undo records (graph.py:1073-1085), so that one is erased.

Recorded at the #103 SVD gate, ruling D4 (spec 2026-11-05-create-a-person-before-a-contact-or-email-exists.md), which kept the residue out of that slice. Refreshed at the #102 gate on 2026-11-07.

> *This was generated by AI during an SVD gate.* **Forget residue: `actions.payload_digest` is an unsalted hash of a personal payload.** `actions.enqueue` stores `payload_digest = sha256(json.dumps(payload, sort_keys=True))` for every Action (`src/people_mind_mcp/actions.py:81-82`, `:99`). The worker nulls `payload` on apply, but the digest stays for the life of the Action row, and Forget does not touch the `actions` table. The digest has no salt, so anyone who can read the store and guess the payload can confirm it. ADR 0003 Amendment 1 rule 7 accepts salted hashes only (Tombstones and the audit row). First recorded at the #103 gate for three kinds. Since then, every slice that carries a personal value in its payload adds to the residue. Measured at `main` = `f616f5a` (schema 18) on a scratch store: one Action of each kind below, then `graph.forget` on the Person. Every Action row stays, `payload` is NULL, and `payload_digest` equals the sha256 of the guessed payload. | Kind | Personal value that the digest covers | Landed in | | --- | --- | --- | | `link.alias` | the attached Handle | #78 (`3099b59`) | | `review.edit` | the edited value | #98 (`726d113`) | | `person.create` | the name, organisation and title | #103 (`2ba707e`) | | `note.add`, `note.correct`, `preference.set` | the note or preference text | #100 (`d9e4df2`) | | `fact.add`, `fact.correct`, `fact.supersede` | the fact value | #101 (`c1a5db5`) | | `interaction.add`, `interaction.correct` | the event note, date and participants | #105 (`b6648e6`) | | `relation.add` | the Relation label and type | #102 (`f616f5a`) | Measured directly: `note.add`, `fact.add`, `relation.add` and `interaction.add`. The other rows follow from the same `enqueue` path. The digest exists for ruling 9 of ADR 0005 Amendment 1: the same key with a different payload answers `idempotency-conflict`. After Forget, no retry of those Actions can succeed in any useful way, so the digest serves no purpose on a forgotten Person's Actions. Question for this issue (and the restore-safe Tombstone work): should Forget clear `payload_digest`, or re-key it with the Tombstone salt, on every Action that targeted the forgotten Person? Or is it accepted residue, with an amendment to ADR 0003 that says so? Three facts for the decision: - `actions` has no `person_id` column. Finding a forgotten Person's Actions needs the `undo_records.person_id` link, which Forget deletes, or the `detail` ids. `detail` holds ids only (ADR 0005 Amendment 1 ruling 17), and after Forget it still names the forgotten Person's id, for example `person=p_… note=1`. - Forget must therefore find the Actions before it deletes the undo records, or match on `detail`. - The #98 undo record also holds an unsalted `value_digest` (`graph.py:2305`), but Forget already deletes undo records (`graph.py:1073-1085`), so that one is erased. Recorded at the #103 SVD gate, ruling D4 (spec `2026-11-05-create-a-person-before-a-contact-or-email-exists.md`), which kept the residue out of that slice. Refreshed at the #102 gate on 2026-11-07.
Author
Member

This was generated by AI during an SVD gate.

Forget residue: derived domains on an Organisation that survives Forget.

When Forget removes a Person, it erases a derived Organisation only when nothing else keeps it (ADR 0003 Amendment 1 ruling 5). An Organisation survives when another Person relates to it or it has an asserted field. A surviving Organisation keeps every derived domain in org_domains, including a domain that only the forgotten Person's email carried.

Example: Ann (ann@smithplumbing.example) and Bob (bob@gmail.example) both have works_at Relations to the Organisation derived from smithplumbing.example. Forget on Ann leaves the Organisation, because Bob relates to it, and it still lists smithplumbing.example. Ruling 5's own reason applies: a non-public email domain identifies its owner nearly as well as the address does.

The #106 gate (2026-11-07, ruling D5) kept this out of #106, because it changes Forget behaviour that predates the slice. #106 does extend the orphan rule: an asserted name, an asserted domain, any alias or any rejection keeps an Organisation, and a rejection whose domain no remaining Handle carries is erased.

Question for this issue: should Forget also strip a derived domain from a surviving Organisation when no remaining Handle carries that domain? Or is it accepted residue, with an amendment to ADR 0003 that says so?

Facts for the decision:

  • Current code: ORPHAN_DERIVED_ORGANISATION (src/people_mind_mcp/graph.py:49-55) decides survival. Forget deletes no org_domains row from an Organisation that survives.
  • An asserted domain (org.domain.assign, #106) is the Owner's own claim and would stay under either answer.
> *This was generated by AI during an SVD gate.* **Forget residue: derived domains on an Organisation that survives Forget.** When Forget removes a Person, it erases a derived Organisation only when nothing else keeps it (ADR 0003 Amendment 1 ruling 5). An Organisation survives when another Person relates to it or it has an asserted field. A surviving Organisation keeps every derived domain in `org_domains`, including a domain that only the forgotten Person's email carried. Example: Ann (`ann@smithplumbing.example`) and Bob (`bob@gmail.example`) both have `works_at` Relations to the Organisation derived from `smithplumbing.example`. Forget on Ann leaves the Organisation, because Bob relates to it, and it still lists `smithplumbing.example`. Ruling 5's own reason applies: a non-public email domain identifies its owner nearly as well as the address does. The #106 gate (2026-11-07, ruling D5) kept this out of #106, because it changes Forget behaviour that predates the slice. #106 does extend the orphan rule: an asserted name, an asserted domain, any alias or any rejection keeps an Organisation, and a rejection whose domain no remaining Handle carries is erased. Question for this issue: should Forget also strip a derived domain from a surviving Organisation when no remaining Handle carries that domain? Or is it accepted residue, with an amendment to ADR 0003 that says so? Facts for the decision: - Current code: `ORPHAN_DERIVED_ORGANISATION` (`src/people_mind_mcp/graph.py:49-55`) decides survival. Forget deletes no `org_domains` row from an Organisation that survives. - An asserted domain (`org.domain.assign`, #106) is the Owner's own claim and would stay under either answer.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#114
No description provided.