Skip to content

feat(api): expose logical document deletion through Service API - #44970

Merged
FFXN merged 5 commits into
mainfrom
codex/service-logical-document-delete
Oct 28, 2026
Merged

FFXN merged 5 commits into
mainfrom
codex/service-logical-document-delete

Conversation

@FFXN

@FFXN FFXN commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Expose logical document deletion through DELETE /v1/knowledge-fs/spaces/{control_space_id}/logical-documents/{document_id}. The operation deletes the logical document with its historical revisions through the existing asynchronous deletion job.
  • Require expectedRevision from the logical document's rowVersion and an Idempotency-Key; return the public deletion-job status URL.
  • Publish the Service API OpenAPI and generated TypeScript/Zod/oRPC contracts, with controller and contract tests.

Branch scope

This branch was created from main and contains only the Service API change. Opening the PR directly from deploy/konwledge would include history already merged in #44165.

Verification

  • Service API KnowledgeFS controller tests: 44 passed
  • Generated contract smoke tests: 2 passed
  • ruff format --check and ruff check on changed Python files
  • tsrs --noEmit for @dify/contracts
  • generate_knowledge_fs_contract.py --check

@github-actions github-actions Bot added size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Oct 28, 2026
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Pyrefly Type Coverage

Metric Base PR Delta
Type coverage 79.91% 79.91% +0.00%
Strict coverage 79.60% 79.60% +0.00%
Typed symbols 76,743 76,748 +5
Untyped symbols 19,371 19,372 +1
Modules 3984 3984 0

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.54%. Comparing base (e3644de) to head (038b5d9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #44970   +/-   ##
=======================================
  Coverage   89.54%   89.54%           
=======================================
  Files        6010     6010           
  Lines      377018   377028   +10     
  Branches    76333    76335    +2     
=======================================
+ Hits       337597   337608   +11     
+ Misses      33424    33423    -1     
  Partials     5997     5997           
Flag Coverage Δ
api 89.39% <100.00%> (+<0.01%) ⬆️
cli 94.28% <ø> (ø)
dify-ui 92.65% <ø> (ø)
web 89.51% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

hyoban
hyoban previously approved these changes Oct 28, 2026
@github-actions github-actions Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 28, 2026
@FFXN
FFXN requested a review from hyoban October 28, 2026 15:09
@FFXN
FFXN added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 4bd3120 Oct 28, 2026
62 checks passed
@FFXN
FFXN deleted the codex/service-logical-document-delete branch October 28, 2026 15:37
hyoban pushed a commit that referenced this pull request Oct 29, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
(cherry picked from commit 4bd3120)
hyoban pushed a commit that referenced this pull request Oct 29, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
(cherry picked from commit 4bd3120)
hyoban pushed a commit that referenced this pull request Oct 29, 2026
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
(cherry picked from commit 4bd3120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants