mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-24 06:37:07 +08:00
* fix(rag): allow deleting a knowledge base whose only unsettled files are interrupted A Core restart marks in-flight ingestions `interrupted`. Whole-KB deletion refused any interrupted file and raised a bare RuntimeError, so those knowledge bases became permanently undeletable and the API returned 500 (seen on Cloud 2026-11-23; 26 interrupted files across 6 KBs). - Whole-KB deletion now proceeds when files are only interrupted: dropping the engine collection settles their unknown remote outcome. Pending or processing files still block deletion. - The remaining refusal raises KnowledgeIngestionInProgressError, mapped to HTTP 409 instead of an unhandled 500. - Host VECTOR_UPSERT refuses knowledge bases marked `deleting`, so an ingestion that outlived its Core cannot repopulate a dropped collection. Reads and deletes still resolve so the engine can tear down. Per-file deletion of interrupted files is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai> * test(rag): interrupted-only KB deletion succeeds; active ingestion is a typed 409 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>