feat(store,api): soft-delete endpoint — DELETE /conversations/{id} (HT-30) - #27
Merged
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthroughAdds soft-delete storage semantics and exposes them through authenticated ChangesConversation deletion
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant matchRoute
participant handleDeleteConversation
participant ConversationStore
Client->>matchRoute: DELETE /api/v1/conversations/{id}
matchRoute->>handleDeleteConversation: conversation-delete with id
handleDeleteConversation->>ConversationStore: deleteConversation(id)
ConversationStore-->>handleDeleteConversation: true or false
handleDeleteConversation-->>Client: 204 No Content or 404 not_found
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
…T-30) Store: deleteConversation() — a single UPDATE to status 'deleted', scoped to exclude already-deleted rows so a second delete reports a miss. No updated_at bump (never surfaced again; the row stays an exact record of its last live activity). Soft, permanently: rows and threads survive in storage (charter invariant #1) — every public path already treats 'deleted' as nonexistent, so only the flag flips. API: DELETE joins GET/PATCH on the item route (Allow header updated); 204 with an empty body via a new noContent() helper (still no-store); missing, already-deleted, and non-UUID ids are one identical 404 (§5 no-existence-leak). Per specs/api/agent-inbox-v1.md §4d (v1.1, HT-25). 349/349 tests, including post-delete invisibility across every endpoint, the §4a replay-vs-delete rule (a keyed replay of a successful send 404s after the delete), and proof the mail itself stays in storage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
zaridan
force-pushed
the
feat/ht-30-soft-delete
branch
from
July 12, 2026 16:33
ec302d4 to
12a38b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Third v1.1 increment (HT-30) — the designed UI's two-step-arm delete needs its endpoint. Spec:
agent-inbox-v1.md§4d (v1.1, merged in #24).What
Store —
deleteConversation(id): Promise<boolean>UPDATE ... SET status = 'deleted' WHERE id = $1 AND status <> 'deleted' RETURNING id— a repeat delete is a miss, matching the API's already-deleted → 404.updated_atbump: the row is never surfaced again, and it stays an exact record of its last live activity.'deleted'as nonexistent (reads, list, append, PATCH), so the method is just the flag flip.API
DELETEjoins the item route (Allow: GET, PATCH, DELETEnow); newnoContent()helper →204, empty body, stillCache-Control: no-store.Evidence
Note
Sibling PR #26 (HT-27) branches from the same main and touches neighboring test regions — whichever merges second may need a trivial rebase; no semantic overlap.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
204 No ContentwithCache-Control: no-store; subsequent deletes, missing, or non-UUID ids return404.Security & Compatibility
GET,PATCH,DELETE).