Restore-safe Tombstones before people_forget is mounted #55
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
#114 Expose restore-safe Forget across the expanded people model
dev/people-mind-mcp
Reference
dev/people-mind-mcp#55
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?
Outcome
A restore of the People database to a point before a Forget does not bring the forgotten Person back, including a restore onto an empty volume after the host is lost.
Context
Parent: dev/people-mind-mcp#50. This is a child of that issue, not a blocker of it.
ADR 0003 Amendment 1, rule 3 (the #50 grill, 2026-11-04). Today the Tombstones and the Forget audit row live in the same database (
src/people_mind_mcp/store.py:65-67), so a restore from before a Forget undoes it, and no record outside the database lets an operator redo it. In Kubernetes the salt is a read-only Secret copied into memory (README.md:152), so no durable writable place exists beside it.The grill's design lean (Q13): a separate
tombstones.dbon the data volume, replicated by the same Litestream sidecar as its own database entry. The restore runbook always restores it to its latest point, whatever pointpeople.dbreturns to. On start, People re-applies every Tombstone the people database lacks. It holds only salted hashes, so its retention can be long.This issue must close before the Phase B slice mounts
people_forget(ADR 0005).Scope
compose.yaml,deploy/litestream.example.ymland the Kubernetes overlay, and the restore runbook inREADME.md:167-177.people.dbfrom before the Forget, start, and assert the Person is absent and its Handles stay suppressed.Ruling (2026-11-05)
The operator confirms the design lean: a separate
tombstones.dbon the data volume, replicated by the same Litestream sidecar as its own database entry, and always restored to its latest point. Four amendments bind the implementation:tombstones.dbis the authority and is written first. Litestream needs WAL mode, and in WAL mode a transaction across ATTACHed databases is atomic per file, not as a set. Forget commits the hashes totombstones.db, then applies the Forget topeople.db. The start-up re-apply repairs a crash between the two commits.secure_deletescrub (#54). Inserting the hash alone is not enough.people.dbholds is copied totombstones.db, and the reverse. The union also migrates today'speople.dbTombstones on first deploy. The Forget audit row (store.py:78) moves totombstones.db.Write the rule into ADR 0003 Amendment 1 rule 3 as part of this issue.
Human act
T4 merge: the operator reviews and merges the change, because it alters Litestream replication and the restore runbook (CONV-40)
Filed under: operator word "accept/agree. yes. go" sha256:f76d6cac557a (#49 #50 grill)
Ruling recorded
The operator confirmed the design lean with four amendments. The issue body now carries them under
## Ruling (2026-11-05):tombstones.dbis the authority and is written first.tombstones.db.The label stays
ready-for-human. The change alters Litestream replication, so CONV-40 rule 3 keeps it with a human. The remaining human act is the T4 merge.Filed under: operator word "I accept 55 ruling" sha256:98451e190c26
From the 2026-11-05 grill (Q-B1, Q33): no wait on this issue. ADR 0003 Amendment 2 rule 3 (merged in #126,
64df4fe) restates rule 2 here as "on every start, re-apply Forget for each Person that holds a matching exclusive Handle or a matching source link". A shared Endpoint is never tombstoned, so the other holder of a shared phone is not forgotten at start.tombstones.dbstill holds hashes only. Please quote that rule when the T4 lands.