Skip to content

Delete a saved document and its owned retrieval chunks #55

Closed

Description

@johnnyhuy

Part of #5.

Add DELETE /api/documents/{document_id} for saved-document management. Remove only Chroma chunks carrying that document_id, then remove the saved database row. Return 404 for a missing record. If vector deletion fails, retain the row and return a safe retryable 503; if database removal fails after vector deletion, retain the row through rollback and allow retry.

Acceptance criteria

  • Other saved documents with identical titles and sources, Slack chunks, and historical chunks without an owner are preserved.
  • Missing and invalid IDs, empty/unindexed documents, vector failure, and database commit failure have offline coverage.
  • A local SQLite and Chroma fixture transcript demonstrates retrieval before and after deletion, including raw distances, plus curl request/response evidence.
  • Add the tests to the backend mise gate and document the separate-store and concurrent-operation limitations. No dashboard UI change, migration, live Slack, remote database, or paid provider call is in scope.

Activity

  1. johnnyhuy commented on Nov 16, 2026

    @johnnyhuy
    ContributorAuthor

    agent claim: agent/issue-55-delete-saved-document @ 4a2ce4b

  2. johnnyhuy commented on Nov 16, 2026

    @johnnyhuy
    ContributorAuthor

    Implemented in #56 and pushed at 7b01d01. Offline checks passed: 221 backend tests, 35 frontend tests, 7 runtime tests, plus local backend startup and curl verification. Proof of failed deletion, retry, and retrieval before and after: https://github.com/echohello-dev/wingman/blob/7b01d01f0a4efdae150a0fe7c42cf0da6b276bca/.tmp/proof/document-delete-api.txt. The child remains open until the PR merges; no live Slack connection was used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentclaimed by the Wingman work loop

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions