feat: retain explicit deletion tombstones - #44
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad72b81892
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| string(deletion.Source), deletion.Reason); err != nil { | ||
| return fmt.Errorf("tombstone note %s: %w", documentID, err) | ||
| } | ||
| for _, table := range []string{"transcript_chunks", "document_panels", "source_objects"} { |
There was a problem hiding this comment.
Restrict document tombstones to document-scoped source rows
When a deleted document has people, including source_objects in this document-wide cascade also tombstones kind="person" rows: retainPeople stores those rows with the meeting's document_id but keys them by global person id. A later sync of the same person from another live document hits UpsertSourceObject and preserves the existing deleted_at, so the person remains marked deleted even though only one document was deleted; restrict the cascade to document-scoped kinds or use per-document person keys, and apply the same rule in reconciliation.
Useful? React with 👍 / 👎.
Summary
Deleted []stringfeed and retain stable note tombstones with deletion source/reason--replaceVISION.mddoes not exist in this repository, so there was no vision file to update.Regression coverage
--replaceremoves themdeleted_atcascades through retained children/source rowsProof
make checkmake smokedeadcode -test ./...git diff --check/Users/steipete/Projects/agent-skills/skills/autoreview/scripts/autoreview --mode local --stream-engine-output— clean, no accepted/actionable findingsReal binaries, same portable fixture:
origin/main, default legacy importmerge--replaceReal binary deletion fixture:
origin/mainSource-blind behavior validation also confirmed persisted merge output, local conflict preservation, exact replace behavior, note/transcript/source tombstone queries, and non-zero errors for missing paths and unknown import flags.