[integrations] delete-thought-mcp: audit trail before hard delete - #449
[integrations] delete-thought-mcp: audit trail before hard delete#449eazene wants to merge 1 commit into
Conversation
Wire delete-thought-mcp into the thought_audit schema. Before each hard delete, insert an append-only audit row preserving the prior content and metadata under diff.previous_content / diff.previous_metadata, so a deleted thought is recoverable from the audit trail alone. The audit write is fire-and-forget by contract: a failure is logged via console.warn but never blocks the delete (matches schemas/thought-audit). The pre-flight fetch now also selects metadata so source / author_session_id and previous_metadata can be preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LxP7M99m4EF5Ve7rn3SNKH
OB1 PR Gate✅ Folder structure — All files are in allowed directories Result: All 15 checks passed! Ready for human review. Post-Merge TasksThese don't block merge — they're reminders for admins after this PR lands.
|
Contribution Type
/integrations)What does this do?
Wires the existing
delete-thought-mcpintegration into thethought_auditschema. Before each hard delete, it writes an append-only audit row preserving the prior content and metadata (diff.previous_content/diff.previous_metadata), so a deleted thought is recoverable from the audit trail alone. This implements the "Extension hook" that the integration's header comment previously described but left unbuilt.Requirements
thought_auditschema (schemas/thought-audit) must be installed. The audit write targetspublic.thought_audit(service_role needs the SELECT/INSERT grants that schema provides).Behavior notes
console.warnbut never blocks the delete, matching the guarantee documented inschemas/thought-audit.metadata, used to populatesource/author_session_idanddiff.previous_metadata.Checklist
🤖 Generated with Claude Code