WeKnora/internal
wizardchen 9cb9505114 fix(knowledge): unstick summary and isolate manual re-index trace attempts
Manually uploaded text documents could get stuck showing "generating
summary" forever, and editing/re-saving a document mixed its trace into
the previous attempt.

Three related fixes:

1. finalizeIndexedKnowledgeState no longer marks a text document
   completed the moment chunks are indexed. Doing so made
   KnowledgePostProcess hit its non-processing guard and skip the
   summary/question/graph fan-out, stranding summary_status on
   "pending". The row now stays "processing" (still retrievable via
   enable_status=enabled) and post-process remains the sole authority
   that drives processing -> finalizing -> completed.

2. ProcessManualUpdate now allocates a fresh span-tracking attempt via
   OpenAttempt. Previously it ran with attempt 0, so processChunks
   dropped every stage span and KnowledgePostProcess fell back to
   LatestAttempt, piling the new run's summary/wiki subspans onto the
   prior attempt's trace.

3. Enrichment workers (summary, question, graph extract) skip when a
   newer attempt has superseded theirs. A stale subtask from a previous
   upload/edit/reparse must not read deleted chunks or decrement the new
   attempt's pending_subtasks_count, which would race-promote the row to
   completed before the new attempt finishes.

Updated TestFinalizeIndexedKnowledgeState to expect the deferred
completion for text documents.
2026-05-29 17:52:01 +08:00
..
agent fix(agent): harden tool parameter parsing against LLM type mismatches (#1505) 2026-05-28 07:50:26 +08:00
application fix(knowledge): unstick summary and isolate manual re-index trace attempts 2026-05-29 17:52:01 +08:00
assets feat(assets): add ASR test audio file and embed it in the application 2026-04-02 21:27:27 +08:00
common feat: Implement deadlock retry mechanism for chunk creation 2026-04-22 21:17:21 +08:00
config test: add document process task options tests 2026-05-28 20:27:53 +08:00
container feat(retriever): activate OpenSearch k-NN driver (PR 3 of 3) 2026-05-29 16:32:27 +08:00
database feat(system-info): surface DB migration errors with troubleshooting links 2026-05-14 16:34:50 +08:00
datasource fix(datasource): support Yuque team token in connector 2026-05-26 20:46:22 +08:00
errors feat(knowledge): track per-stage parsing progress with /stages API 2026-05-28 15:14:45 +08:00
event feat(agent): human-in-the-loop approval for MCP tool calls (#1173) 2026-05-10 22:57:12 +08:00
handler feat: add knowledge parse cancellation with finalizing post-process state 2026-05-28 20:16:02 +08:00
im feat: enhance IM file service tests and refactor storage URL handling 2026-05-29 13:47:32 +08:00
infrastructure feat(retriever): add OpenSearch driver skeleton + interface stubs (PR 2a of 3) 2026-05-26 20:54:58 +08:00
logger refactor(logger): support LOG_FORMAT template and harden level coloring 2026-05-22 20:31:54 +08:00
mcp feat(mcp): implement reconnection logic for MCP tool calls and tool listing 2026-03-31 11:57:15 +08:00
middleware fix(knowledge): prevent documents from getting stuck in "processing" 2026-05-28 15:14:45 +08:00
models docs(chat): clarify cached-token semantics for explicit-cache providers 2026-05-25 16:47:14 +08:00
router feat: implement tenant validation for file access and enhance related tests 2026-05-29 13:47:32 +08:00
runtime chore(runtime): silence gin per-route logs and emit env config banner at startup 2026-05-17 15:27:52 +08:00
sandbox 增加sandbox对windows编译支持,现在默认是linux的实现,windows直接编译报错 2026-05-25 16:57:56 +08:00
searchutil fix(summary): preserve image caption/OCR text in document summaries 2026-05-22 17:25:39 +08:00
stream feat(redis): add REDIS_USERNAME support for Redis ACL 2026-02-04 19:38:40 +08:00
tracing feat(observability): extend Langfuse tracing across asynq pipeline 2026-04-24 13:16:47 +08:00
types feat(retriever): activate OpenSearch k-NN driver (PR 3 of 3) 2026-05-29 16:32:27 +08:00
utils feat: implement tenant validation for file access and enhance related tests 2026-05-29 13:47:32 +08:00