mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix: note-tool timeout (background RAG indexing) + feature-flag raw-key display (#252)
- note timeout: JournalService.add_entry awaited RAG indexing inline (despite its "non-blocking" comment); indexing embeds via Ollama, which is CPU-bound, so under concurrent load it slowed enough to time the `note` gateway tool out. The entry is already committed before indexing, so it's best-effort — schedule it fire-and-forget (_schedule_rag_index) so the write returns immediately. A new drain_rag_index_tasks() helper lets tests await the pending index. - feature flags: the "Gateway-health recovery" toggle rendered its raw key `gateway_health_enabled` (the only flag with no human description). Added the blurb and changed the fallback to render nothing rather than leak a raw key. Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
@@ -35,7 +35,7 @@ from roboco.models.journal import (
|
||||
StruggleEntryParams,
|
||||
TaskReflectionParams,
|
||||
)
|
||||
from roboco.services.journal import JournalService
|
||||
from roboco.services.journal import JournalService, drain_rag_index_tasks
|
||||
from sqlalchemy import select, update
|
||||
from sqlalchemy.exc import IntegrityError as _IE
|
||||
|
||||
@@ -505,6 +505,7 @@ async def test_create_entry_learning_calls_record_learning(
|
||||
)
|
||||
)
|
||||
assert entry is not None
|
||||
await drain_rag_index_tasks() # indexing is fire-and-forget; let it run
|
||||
mock_optimal.record_learning.assert_awaited()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user