WeKnora/internal
chenrui 9d67a0eb4d
fix: clean up wiki data when deleting knowledge base (#3109)
* fix: clean up wiki data when deleting knowledge base

ProcessKBDelete async task cleaned up vector indices, chunks, files,
graph data and knowledge rows, but left wiki data untouched because
knowledgeBaseService had no wiki repository dependency. Add four
KB-scoped delete methods to WikiPageRepository and invoke them at the
end of ProcessKBDelete: soft-delete wiki_pages/wiki_folders/
wiki_page_issues (they carry DeletedAt), hard-delete wiki_page_revisions
(no DeletedAt column — immutable snapshots).

* fix: scope wiki KB cleanup by tenant and run it on every delete path

Wiki rows do not depend on the vector engine, so ProcessKBDelete now
cleans them in a defer (including SkipRetry). Deletes are keyed by
tenant_id plus knowledge_base_id so a tampered queue payload cannot
wipe another tenant's wiki.

---------

Co-authored-by: wizardchen <wizardchen@tencent.com>
2026-09-14 21:02:31 +08:00
..
agent fix(agent): stop emitting terminal answer events for retryable empty stops 2026-09-14 21:02:15 +08:00
application fix: clean up wiki data when deleting knowledge base (#3109) 2026-09-14 21:02:31 +08:00
assets feat(assets): add ASR test audio file and embed it in the application 2026-04-02 21:27:27 +08:00
browserskill fix(browser): complete task cancellation, screenshots, and result display (#3206) 2026-09-12 09:32:26 +08:00
common fix(markdown): sanitize invalid UTF-8 and NUL bytes 2026-08-31 12:24:35 +08:00
config feat(browser): polish connection settings, open tasks in a new window, and streamline prompts (#3193) 2026-09-11 21:28:58 +08:00
container feat(sandbox): add a graphical desktop to session sandboxes (#3245) 2026-09-14 20:37:37 +08:00
database fix(memory): rank memories by the query, not by importance 2026-09-13 11:43:17 +08:00
datasource feat(datasource): add DingTalk Docs integration with safe sync and localization (#2313) 2026-09-14 19:53:29 +08:00
embedpolicy fix(embed): enforce host origin allowlists on framed pages 2026-09-14 18:03:57 +08:00
errors feat(agent): keep long sandbox turns from truncating, overflowing, or rewriting files 2026-09-02 22:09:09 +08:00
event feat(sandbox): stream live shell and install command output 2026-09-12 10:16:39 +08:00
filetransport refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
handler fix(agent): PUT no longer erases the avatar, and driver errors stay server-side (#3230) 2026-09-14 20:50:15 +08:00
im fix(im): recover stale Yunzhijia WebSocket connections 2026-09-14 19:59:03 +08:00
infrastructure fix(graph): feed OCR chunks to graph extraction instead of image-link placeholders (#3092) 2026-09-08 19:23:13 +08:00
ipclass fix: share IP classification between SSRF and sandbox URL guards 2026-09-01 15:35:14 +08:00
logger fix(sandbox): record product-level Langfuse spans and detach idle sweeps 2026-08-31 19:42:32 +08:00
mcp feat(mcp)!: persist tool catalogs and add guided configuration (#3118) 2026-09-09 13:34:56 +08:00
middleware fix(embed): enforce host origin allowlists on framed pages 2026-09-14 18:03:57 +08:00
modelcontext feat(browser): polish connection settings, open tasks in a new window, and streamline prompts (#3193) 2026-09-11 21:28:58 +08:00
models feat(mcp)!: persist tool catalogs and add guided configuration (#3118) 2026-09-09 13:34:56 +08:00
ratelimit feat(embed): add backend embed channels with auth and rate limiting (#1657) 2026-06-12 23:10:39 +08:00
router feat(sandbox): add a graphical desktop to session sandboxes (#3245) 2026-09-14 20:37:37 +08:00
runtime fix(redis): harden TLS tests and surface TLS config at startup 2026-07-06 23:04:52 +08:00
sandbox feat(sandbox): add a graphical desktop to session sandboxes (#3245) 2026-09-14 20:37:37 +08:00
searchutil fix(chat): keep OCR/caption text of scanned-page image hits in merge (#3064) 2026-09-07 11:38:47 +08:00
storageallowlist fix(storage): align default provider fallback with STORAGE_ALLOW_LIST 2026-07-15 11:05:00 +08:00
storageurl refactor(resource-access): unify scoped authorization and transfer recovery (#3097) 2026-09-08 15:36:33 +08:00
stream fix(chat): preserve steering continuity and composer focus 2026-09-09 20:15:23 +08:00
textconv fix: remove GPL converter and bundle third-party license sources 2026-09-08 15:19:10 +08:00
tracing/langfuse fix(tracing): keep sandbox RPC spans under their owning operations 2026-09-12 10:15:54 +08:00
types fix: clean up wiki data when deleting knowledge base (#3109) 2026-09-14 21:02:31 +08:00
utils fix(security): reject traversal in local prefixes, task IDs, and wiki sort 2026-09-07 11:23:45 +08:00