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: fix inaccurate credential sweep wording and inconsistent file paths (#2614)

LearningCircuit19c1777e97f8
diff --git a/docs/architecture.md b/docs/architecture.md
index 2318a983a5..5acd88a620 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -478,7 +478,7 @@ Cleanup is defense-in-depth with multiple layers:
|-------|---------|----------------|
| `@thread_cleanup` decorator | Thread function exit (normal or exception) | DB session, thread engine, settings context, search context |
| `finally` blocks | Per-research in `run_research_process()` | Search engine HTTP sessions, strategy thread pool executors |
-| `teardown_appcontext` | After each HTTP request | QueuePool session, thread-local session, triggers dead-thread engine sweep (rate-limited to 60s) and credential sweep (every request) |
+| `teardown_appcontext` | After each HTTP request | QueuePool session, thread-local session, triggers dead-thread engine sweep (rate-limited to 60s) and dead-thread credential tracking cleanup (every request) |
| Dead-thread engine sweep | Every ~60s (rate-limited) | Disposes NullPool engines for threads no longer in `threading.enumerate()` |
| Logout cascade | User logout | Scheduler unregister (removes password) → DB close (`engine.dispose()`) → session destroy |
| Stale session cleanup | `before_request` (~1% of requests, sampled) | Clears Flask sessions for users whose DB connection is gone |
@@ -528,11 +528,11 @@ For more on diagnosing FD exhaustion, see [Troubleshooting - Resource Exhaustion
| File | Role |
|------|------|
-| `database/encrypted_db.py` | `DatabaseManager`, engine lifecycle, dead-thread sweep |
-| `database/thread_local_session.py` | `@thread_cleanup` decorator, thread-local sessions, credential cleanup |
-| `web/app_factory.py` | `teardown_appcontext` handler, cleanup orchestration |
-| `web/services/research_service.py` | Research thread creation, `run_research_process()` |
-| `web/queue/processor_v2.py` | Queue processing, dead-thread sweep trigger |
+| `src/local_deep_research/database/encrypted_db.py` | `DatabaseManager`, engine lifecycle, dead-thread sweep |
+| `src/local_deep_research/database/thread_local_session.py` | `@thread_cleanup` decorator, thread-local sessions, credential cleanup |
+| `src/local_deep_research/web/app_factory.py` | `teardown_appcontext` handler, cleanup orchestration |
+| `src/local_deep_research/web/services/research_service.py` | Research thread creation, `run_research_process()` |
+| `src/local_deep_research/web/queue/processor_v2.py` | Queue processing, dead-thread sweep trigger |
### Areas for Improvement