File: backend/app/cache_manager.py:73-142 (get_semantic/add_semantic)
Read-modify-write on the semantic_registry list (disk_cache.get -> mutate -> disk_cache.set) has no lock.
Failure scenario: Two concurrent requests both read the same registry snapshot, each append their own entry, and the second set silently overwrites the first's addition, losing a semantic-cache entry under concurrent load.
See docs/rag-audit-findings.md (item 6).
File:
backend/app/cache_manager.py:73-142(get_semantic/add_semantic)Read-modify-write on the
semantic_registrylist (disk_cache.get-> mutate ->disk_cache.set) has no lock.Failure scenario: Two concurrent requests both read the same registry snapshot, each append their own entry, and the second
setsilently overwrites the first's addition, losing a semantic-cache entry under concurrent load.See
docs/rag-audit-findings.md(item 6).