3 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
df1615778a fix(logs): deliver a retrieval progress event logged off the event loop
A record logged from a worker thread reaches the handler with no running
loop in that thread. `ProcessLogHandler.emit` asked for one, caught the
`RuntimeError`, and returned — dropping the coroutine an async sink had
already created. The reader lost the event and the only trace was
`RuntimeWarning: coroutine 'RAGService._emit_tool_event' was never
awaited` (#1435). Retrieval does its heavy work off-loop, so this is
where its progress lines come from: the turn sat on a generic
"reasoning…" for a minute or two with nothing to say what stage it was
in, which is what the reporter actually felt.

`rag/service.py` already knew the answer — its own raw-log handler falls
back to `run_coroutine_threadsafe` on the loop it captured at setup. That
is the same decision stated twice, and the generic handler, which every
other caller goes through, had the wrong half of it. The rule moves into
`ProcessLogHandler` and the RAG copy becomes one of its users; the
duplicate handler class goes away.

An event with nowhere left to go is closed explicitly rather than
abandoned, so "the capture outlived its loop" no longer surfaces as a
never-awaited warning pointing at a coroutine the reader cannot place.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 20:38:42 +08:00
Lan-zk
3f1894e0c4 fix(knowledge): harden GraphRAG model and embedding compatibility (#747)
* fix(knowledge): add GraphRAG model compatibility layer

* fix(graphrag): harden compatibility preflight

* fix: align GraphRAG compatibility with current dev

* test: skip GraphRAG config test without optional extra

---------

Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-08-17 01:12:05 +08:00
Bingxi Zhao (Frank)
824bf778df fix: lint & logging system 2026-05-01 01:39:08 +08:00