Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

docs(rekey): explain recovery purge lock trade-off (#7715)

Chanhyo Jung375d04047316
diff --git a/src/local_deep_research/database/backup/backup_service.py b/src/local_deep_research/database/backup/backup_service.py
index 6b2e2ef5fc..8814763e1e 100644
--- a/src/local_deep_research/database/backup/backup_service.py
+++ b/src/local_deep_research/database/backup/backup_service.py
@@ -1309,6 +1309,14 @@ class BackupService:
stable epoch, through the entire purge. The per-user backup lock
below does not exclude a password change.
+ Classification can require walking all pages of a backup for HMAC
+ verification to establish that its key is superseded. The caller
+ holds the database's rekey sidecar across classification and deletion
+ so a concurrent password change cannot invalidate that key proof
+ before removal. During recovery cleanup, same-user requests requiring
+ that sidecar can exhaust their lock-wait budget and receive HTTP 503.
+ This is an intentional correctness trade-off.
+
Returns:
The number of backups deleted.
"""